.

Building a Wizard

What is a wizard?

In Ensembl, a wizard is a collection of pages that guide a user through a collection of steps to perform a specific task. For example, wizards are used in registering new users. Wizards are useful when a task requires a large amount of information to be collected that may be daunting in a single page form, or that can be easily grouped together into logical chunks. Collecting and processing biological information often requires both, and so Ensembl includes a collection of modules to facilitate the building of wizards.

Wizard comprise nodes

Wizards are made up of a number of different steps, linked together to guide the user through a specific task. In Ensembl each step of this process is called a node. Nodes are linked together to form a wizard (see The wizard response chain). In general, a single node would perform one of three functions:

The wizard response chain

Nodes are arranged into a response chain, which takes the form of a directional acyclic graph. The edges of the graph indicate how a user is guided through the wizard. For example, a wizard designed to add new information to a database may have the following response chain.
        +-html node------+
        |  Instructions  |  
        +----------------+
                ↓
        +-form node------+
        |  Data entry    |  
        +----------------+
                ↓
        +-task node------+
        |  Database add  |  
        +----------------+
                ↓
        +-html node------+
        |  Response      |  
        +----------------+
    
In this wizard, a user is first presented with a set of instructions, and (typically) a 'Next' button. On clicking the button, they are taken to a form where they can enter information to insert into the database, a 'Back' button to return to the instructions, and a 'Save' button to proceed to the next stage: the task node. This node attempts to add the information from the data entry node into the database and records the response (or any other information from the database). It then forwards the user to the final response node, which displays the success (or otherwise) of the database access.

Creating a Wizard in Ensembl

Wizards in Ensembl are all subclasses of the EnsEMBL::Web::Wizard class. Typically, the Wizard's are named after the data types which are often seen elsewhere in Ensembl: EnsEMBL::Web::Wizard::Chromosome, EnsEMBL::Web::Feature, EnsEMBL::Web::Wizard::User.

Node definitions

Each node definition contains a number of key value pairs used to configure the node's behaviour and display. Commonly used keys are described below:
 

© 2024 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.

                
GermOnline based on Ensembl release 50 - Jul 2008
HELP