Archive Ensembl HomeArchive Ensembl Home

Web Code Changelog - Release 60

Page infrastructure

In this release we refactored the code which is used to construct pages. These changes are unlikely to impact customised versions of Ensembl, unless you have added entirely new object types. A diagram of the new module structure is available in our page documentation.

These changes are designed to support future code developments and allow more flexible building of pages from a selection of components.

  • EnsEMBL::Web::Magic has been replaced by EnsEMBL::Web::Controller and its children. Each child controller handles a specific request type, as implied by the module name.
  • The scripts in /perl/defaults which were previously used to call functions in EnsEMBL::Web::Magic have been removed.
    Additionally, /perl/defaults/psychic has been moved to EnsEMBL::Web::Controller::Psychic.
  • $OBJECT_TO_SCRIPT in SiteDefs has been changed so that the values of the hash are module names of the required controller.
  • EnsEMBL::Web::Apache::SendDecPage has been renamed EnsEMBL::Web::Apache::SSI.
    The template_INCLUDE function has been moved to EnsEMBL::Web::Controller::SSI and should be called from there.
  • EnsEMBL::Web::Model has been renamed to EnsEMBL::Web::Builder, and all function calls like $self->model have been replaced by $self->builder.
  • The EnsEMBL::Web::Session is now initialized in the constructor of EnsEMBL::Web::Hub, removing the need to store it in EnsEMBL::Web::Registry.
    Many other functions from EnsEMBL::Web::Registry were also unused and have been deleted.
  • ViewConfigs and ImageConfigs are now obtained through EnsEMBL::Web::Hub->viewconfig (cacheable version), EnsEMBL::Web::Hub->get_viewconfig (uncached) and
    , rather than from the EnsEMBL::Web::Object or the EnsEMBL::Web::Session.
  • EnsEMBL::Web::Proxiable has been removed. Much of the functionality it performed has been moved to EnsEMBL::Web::Hub, with wrapper functions left on EnsEMBL::Web::Object and
    where necessary.
    Deprecation warnings will appear in the error log for any wrapper functions which are due to be removed in release 61.
  • The global_context, local_context etc. functions from EnsEMBL::Web::Configuration have been removed. The functions they performed have been moved into a new set of modules -
    and children.
    Most of these modules previously existed as EnsEMBL::Web::Document::HTML children, and where this is the case their content generation functions have been retained.
    Where necessary, an init function has been added to perform the functions previously in the Configuration modules.
  • The following modules have been renamed while being moved from EnsEMBL::Web::Document::HTML to EnsEMBL::Web::Document::Element:
    • GlobalContext -> Tabs
    • LocalContext  -> Navigation
    • LocalTools    -> ToolButtons
    • ModalContext  -> Modal
  • The equivalent functions called on $page have also been changed, so $page->global_context is now $page->tabs etc. (where $page is a EnsEMBL::Web::Document::Page).
  • The function modify_page_elements has been added to EnsEMBL::Web::Configuration modules, to allow changes from the default page layout.
    Where previously a Configuration module would have the function

    sub local_context { return undef; }

    it now has the function

    sub modify_page_elements { $_[0]->page->remove_body_element('local_context'); }
  • EnsEMBL::Web::Document::Page and EnsEMBL::Web::Document::Panel modules have also been changed. Panels now contain content functions (returning HTML), while Pages have render functions (printing HTML).
    Note: the Panels' content functions are $self->content, NOT $self->_content as previously.
  • EnsEMBL::Web::Document::Page has a new html_template function which is used to print the HTML for dynamic pages.
  • EnsEMBL::Web::Document::Page child modules' initialization functions have been renamed from (for example) _initialize_HTML to initialize_HTML and so on.
  • EnsEMBL::Web::Document::Page::Common has been removed, with the functionality it provided moving into EnsEMBL::Web::Document::Element modules.
  • EnsEMBL::Web::Hub->_set_core_params has been renamed set_core_params, and EnsEMBL::Web::Hub->parent has been renamed EnsEMBL::Web::Hub->referer.
  • EnsEMBL::Web::Configuration->_get_valid_action has been renamed EnsEMBL::Web::Configuration->get_valid_action.

Other changes

  • EnsEMBL::Web::Component::Location::MarkerDetails has been renamed EnsEMBL::Web::Component::Location::MarkerList
  • Links for zmenus are now /ZMenu rather than /Zmenu, to bring them inline with the page names of the modules and avoid confusion.