English|Português|Español
UserPasswordLogin

HOME
SESSIONS
INFO
Imagen6200E

From GeneXus Olimar version: Theme Object (I)

In this edition, we will start learning more about the new Theme object introduced in the GeneXus Olimar version.

There is a new object called Theme, in the GeneXus Olimar version, that is created and updated through a new editor. Through the use of themes, GeneXus users have flexibility to create Cascading Style Sheets that may be included in their web pages. A theme in GeneXus becomes a Cascading Style Sheet (a file with css extension). Moreover, a hierarchy over the Cascading Style Sheets (CSS) standard has been implemented, which substantially improves usability.

Accomplishments resulting from the introduction of this new object:

1. Great advantages for developing web applications
From now on, individually updating control properties for each control will not be necessary. The fact of creating a "Theme" and associating it to GeneXus objects means creating a CSS and relating it to the web pages in runtime. This will enable users to make changes on the theme by using a very intuitive editor, and to save a new Cascading Style Sheet. Then, it will only be necessary to take it to production in order to see the changes reflected on the web pages.

2. Greater functionality in using GeneXus styles in the web environment
With the introduction of the new "Themes" feature, it will be possible to complement the handling of GeneXus styles in the web environment. For instance, once a Master Style has been defined, and after having associated a theme, the objects initialized with this style will be associated to the same theme.
Changes in control properties will be made through the theme classes, rather than through the style itself. As a consequence, the changes in the style (indirectly through the theme) will be reflected on the object based on the style, thus guaranteeing the expected dynamism.

3. Substantial performance improvement
Less code is generated and there is notorious improvement on performance in the web environment. The styles are incorporated in a CCS that is added as a link into the generated html.
Additionally, the CSS (which may be large) is transferred to the client only when it is strictly necessary. This means, only when there is access to a page that references it for the first time, and when the CSS is modified. If several pages make reference to the CSS, only the first one should be affected by the additional burden of transferring the CSS (through the use of catching from the user's browser).
 
4. Changes compared to previous versions
GeneXus version 7.5 already offered a file called styles.css.  The styles that used to be included in the head section of each page have not been included there, but in the  styles.css, to which all pages made reference. This has meant an improvement on performance; whereas in the past the styles of each object potentially called in the html were made reference to, now they are included.
The file was limited to defining the styles of the knowledge base, and it had not been thought for the GeneXus user to explicitly modify it. In the Olimar version, the GeneXus user can create the CSS through themes, and assign them either to an object, a model, or a knowledge base.

Related
GeneXus Olimar beta 1 version released
GeneXus Olimar Version beta 2 released
GeneXus Olimar version beta 3 has been released
From the GeneXus Olimar version: Theme Object (II)
From GeneXus' Olimar version: Theme (III) Object
Sub-types in the GeneXus Olimar version
From GeneXus Olimar version: Theme editor (II)
GeneXus Olimar version: conditional orders and filters
New TEAMS Version with GeneXus 8.0
GeneXus releases its next version