Orquestra

../_images/orquestra.jpg

Orquestra is an application layout responsible for rendering applications’ layout.

Note

The HTML generated by Orquestra is already prepared to be responsive, thanks to the SemanticUI framework.

Configure an app layout

The Orquestra layout has predefined the next menus and apps rendering sections:

../_images/orquestra-layout.png

The apps may contain Orquestra flags to configure their behavior on the layout.

The flags are configured in the app class as it is exemplified bellow:

class SiteCrawlApp(BaseWidget):

    ...

    LAYOUT_POSITION      = conf.ORQUESTRA_HOME

    ORQUESTRA_MENU       = 'left'
    ORQUESTRA_MENU_ICON  = 'browser'
    ORQUESTRA_MENU_ORDER = 0


Available flags

UID

The flag besides being used to define the unique identifier of the application it is also used by Orquestra to define the url of the app, therefore if an app has the UID=’something’ the url of the app will be /app/something

LAYOUT_POSITION

This flags is used to configure where the application should be rendered within the layout. It can has the next values:

VALUE

Description

ORQUESTRA_HOME

The app should be rendered in the home position.

ORQUESTRA_HOME_FULL

The app should be rendered in the home position but should occupy all the available space.

ORQUESTRA_NEW_TAB

The app should be rendered in the home position, but in a new tab.

ORQUESTRA_NEW_TAB_FULL

The app should be rendered in the home position, but in a new tab and should occupy all the available space.

ORQUESTRA_APPEND_HOME

The app should be appended to the end of the home position. This configuration can be used to stack several apps on the home.

ORQUESTRA_NEW_WINDOW

The app should be rendered in a popup window.

ORQUESTRA_NEW_BIGWINDOW

The app should be rendered in a wider popup window.


How Orquestra works

This module composed by the next layers.

../_images/orquestra-layers.png

Apps manager layer

The apps manager is the module responsible for finding and selecting the apps that are going to used in the construction of the layout menus. Orquestra use the apps manager to find

Django view layer

Orquestra has a django’s view to generate the default html page. This view search for all the available apps to render the menus and apps according to the defined environment configurations.

HTML templates layer

The templates layer is where the html is configured. Here is where the layout is defined.

Javascript & CSS layer

CSS

This layer includes all the css used to render the layout.

Javascript

This layer includes all the js required to render the layout and set its behaviour. It is here also that the rendered sections are defined, so for each LAYOUT_POSITION flag value, there is a corresponding javascript function that render the app for the specific section.



Why such architecture?

The reason why the Orquestra application layer was create, was because like that the layout is separated from the apps execution. Having the exact same apps without touching any code I can refactor all the layout without just by switching the Orquestra layer by another.

Example:

This is a representation of where the Orquestra layer is positioned in relation to the pyforms framework.

../_images/orquestra.svg

Now if we switch the Orquestra layer by another layer called Kuloneco which implements rearranges the layout, the result will be the next:

../_images/kunoleco.svg