Posted on February 06, 2014 by Alessio Stalla

A new preview is out!

When we released Portofino 4.1.beta4, a preview of the upcoming Portofino 4.1, we were still in the summer of 2013. A few months have passed, the new year has come... many people downloaded the beta4 and started using it, some of them commented on the mailing list or directly to us, and we can happily say that the new direction we took was generally received very well. Meanwhile, we continued to improve Portofino, and we're now ready to share an updated preview, Portofino 4.1.beta6. You can download it and try it today, it is sufficiently stable.

Our goals for the beta6 were to build on the foundations established with beta4 (modules, Bootstrap, etc.), to validate our design decisions and revise them when necessary, to simplify things where possible. We also rebuilt our demo-tt app to create a modern ticket tracker which could serve as a good example of what's possible with the latest Portofino, both with built-in pages and with customizations, and that wasn't just a toy, but a real application that we plan to use ourselves. Stay tuned for more information!

Changes in 4.1.beta6

Here is a summary of the important changes from beta4 to beta6.

Changes for end users

Users of applications built with Portofino will enjoy several improvements in the user interface:

  • Safer forms: a confirmation dialog appears on page abandon if there is unsaved data. On the client side, multiple submissions of the same form are prevented.
  • New page templates that leverage the tabs and "well" components in Bootstrap
  • The new activity stream page, a component used extensively in social networks but applicable to a broad range of cases, presents a list of items (e.g. posts, comments, log entries, ...) nicely.
  • In CRUD pages, null values can be searched, users now have more powerful querying capabilities (they can ask for records where some property is not set).
  • Friendlier security with remember me functionality. Users can choose to be remembered by the system (with a cookie). Sensitive operations still require to authenticate by providing a password.
  • Pdf and Excel exports are no longer provided by default in CRUD pages. We found out that we disabled or reimplemented them on a lot of pages in our applications. We have retained the export code as generic utilities in Elements to export any Form or TableForm to pdf and Excel.
  • We fixed a couple of bugs with selection providers and autocomplete fields for an even smoother user experience.

Simpler, more coherent organization

For this release we have worked a lot "under the hood". The following changes are not directly apparent to end users and less expert developers, but they're important improvements for those who work with Portofino at a deeper level (including us at ManyDesigns!).

  • The apps directory does not exist anymore. An application is now a standard .war file with a few Portofino-specific directories in WEB-INF.
  • We have settled on the subdivision in modules.
  • We have adopted conventions (for files in modules, i18n strings, etc.) that organize resources in a coherent and predictable way, so you can find more easily what you're looking for.
  • Configuration is now unified in the file portofino.properties (without separate mail.properties and app.properties). You can optionally use a portofino-local.properties file to override configuration keys specific to your environment; that file should remain untracked by the version control system.

Maven

We continued to invest on Maven as a tool to work with Portofino. As always, you are not required to use Maven - you can use the "PHP-like" approach of directly modifying a deployed webapp. However, for Maven users, there are some important news:

  • Portofino is on Maven Central! Excerpt from an actual pom.xml of a project based on Portofino:
    <dependency>
      <groupId>com.manydesigns</groupId>
      <artifactId>portofino-database</artifactId>
    </dependency>
    <dependency>
      <groupId>com.manydesigns</groupId>
      <artifactId>portofino-mysql</artifactId>
    </dependency>
    <dependency>
      <groupId>com.manydesigns</groupId>
      <artifactId>portofino-crud</artifactId>
    </dependency>
    
  • We now provide a Maven archetype to quickly create new projects with Portofino. Be sure to look at the generated pom.xml for a briefly commented list of modules that you can enable or disable in your application.

Also worth noting (and perhaps expanding in a dedicated post, if there's enough interest) is that you can get the best of both worlds - automated, repeatable builds with Maven and PHP-like live development - by combining Maven & the IDE of your choice with a tool such as Unison to keep the deployed webapp and the source code in sync without redeploys (as long as you don't write Java classes and don't change dependencies).

Theme and templates

The UI theme is now a .jar module (it was a .war). For Maven users, this means that there is no need to use overlays anymore - a Portofino webapp is a simple Maven war artifact with jar dependencies. For those who don't use Maven, nothing changes except that the theme jsp files are now hidden in portofino-theme.jar rather than expanded in the webapp directory.

The theme being a jar means that the standard Servlet 3.0 resource management can be used to override any resource file in the theme (such as jsp pages, js scripts, css files). This is a flexible mechanism that supersedes the menu system we had introduced in the beta4: menus can be configured at will (with custom logic, if necessary) by modifying /theme/header.jsp.

Page templates are simpler, they consist of just two files. The structure of templates has been simplified and rationalized. Modules can register their own templates, so if you have a nice set of templates and want to reuse them across several applications or share them with other people, you can easily package them and distribute them as a module.

Download it!

We invite you to try this preview; you can download it from SourceForge. If you have issues or suggestions, please come to our community forums.

 

comments powered by Disqus