Feb 8, 2024 4:03:10 PM seb leridon avatar

What's new in Lutece v7

Independence from CSS frameworks

Before Lutece v7, each version of the core was linked to a version of a CSS framework. Since Lutece v4, the core relied only on Twitter's Bootstrap framework which brings all the "Responsive Design" features to adapt to mobile consultations. Each major evolution of this framework included a complete break of compatibility with the previous version. This resulted in having to modify all the HTML templates when Lutece's core was upgrading from the Bootstrap framework. In Lutece v6, a set of macros of the Freemarker HTML template engine have been created to encapsulate the management of CSS classes depending on the version of Bootstap. This effort has been finalized in Lutece v7 so that the macros allow the creation of HTML templates that are completely independent of the CSS Framework. To reach this result and validate it, Lutece v7 aimed at supporting at least 3 frameworks simultaneously :

  • Bootstrap 3 - for compatibility with v6 plugins that do not use macros encapsulating CSS styles
  • Bootstrap 4 - to support new features
  • Bulma - to demonstrate independence from Bootstrap For each of these frameworks, Lutece v7 proposes a specific implementation of macros. To support another CSS framework, you just have to create a new implementation of the set of macros.

A new graphical look of the Back Office

The possible independence of the CSS framework allowed to choose a look and feel based on the very trendy "Material Design" charter launched by Google for Android and then Angular. https://dev.lutece.paris.fr/lutece-core/style_guide/output/Bootstrap4MaterialKit/index.html

Upward compatibility

Upward compatibility was a major concern in the design of Lutece v7. Some Freemarker macros and Java classes have been removed to clean up obsolete functions but alerts are generated by Sonar analyses in order to evaluate any corrections that need to be made to be fully compatible with Lutece v7. Beyond that, Lutece v7 offers a compatibility mode based on Bootstrap3 which keeps the deleted macros in the standard version in order to run a v6 plugin in Lutece v7.

A new organization of the technical settings

The layout of the technical settings in the Back Office has been completely redesigned to bring all these functions together in a single menu. This has allowed to reduce the number of functions appearing here and there in the Back Office menus.

Support of configuration settings by environment variable

New functions allow bookmarks to be valued from environment variables. The first application is for setting up the db.properties file in which the database server, database and connection information can be defined based on environment variables. If the name of the environment variable ends with _FILE, the value must be taken from the file named by the current value of the variable.

Example: To evaluate the string "${DB_PASSWORD_FILE}". where the file DB_PASSWORD_FILE=/run/secrets/mariadb-pwd

the method takes into account the content of the file. This feature is useful to manage Docker secrets.

The event trace

New trace functionalities are proposed by Lutece v7. They are intended for applications that wish to set up a history of certain sensitive actions for security audit purposes.

Java 11 support

The compilation version of Lutece v7 remains Java 8, however the compilation is possible in Java 11 thanks to the addition of the dependencies removed in the versions after JDK8.

Management of resource access controls extended to the Front Office

RBAC (Role Based Access Control) role management has been extended to back office users. This will allow very precise management of access rights to resources, particularly in the context of workflows. These mechanisms can also be implemented for daemons or REST web services.

PluginWizard and CodeWizard code generators updated

The PluginWizard (generation of a complete plugin) and CodeWizard (generation of unit files) code generators now produce code for Lutece v7, in particular HTML templates using the new macros.

Don't forget to use global Pom version : 5.2.0 (at least)