ManyDesigns logo

Portofino 4.0.7 released!

Posted on September 28, 2012 by Alessio Stalla

We’re proud to announce the release of the latest & greatest version of Portofino, 4.0.7. This release focuses on new administration tools to customize the mapping of database schemas to the Portofino model: names of tables and columns, types and formatting, relationships, annotations, etc. - no more manual editing of portofino-model.xml!

Additionally, this release fixes a number of bugs and contains several improvements, in the areas of performance, technology upgrades and stabilization.

Want to know more? Read on.

New administrative section: “tables”

If you look at the administration section, you’ll find a new link under Connection Providers:


A partial view of the Tables section

The Tables section allows you to edit several types of information that Portofino uses to determine how to render, validate and persist data to the database - either using the built-in CRUD page, or your own custom pages. Especially important is the ability to customize the names of the properties in your persistent entities, that you’ll use throughout your Groovy code whenever you want to access persistent data programmatically.

Next to each schema name in this section you can see if there’s a Liquibase script associated to it: the Liquibase droplet icon will appear in that case. Clicking on a table allows you to see and edit its details, and those of its columns and relationships.


The detailed view of a table

As you can see, a table has an entity name that is used in queries (as exemplified by the Hql query field) and in Groovy code to save or load an instance of that entity. If you have advanced requirements, you can map a table to a Java class using Hibernate. And finally, when rows from your table are presented in a selection list (using a selection provider), you can choose how to display them by providing a short name expression (in OGNL).

You can inspect each column to view and edit its details:

You can also customize relationships, both native ones (foreign keys) and artificial ones (selection providers which exist only in Portofino and are used to offer selection lists or autocomplete fields).

Digging into all those details is outside the scope of this post; experiment with the new feature and tell us what you think! We’ll return to this topic if there’s enough demand, or if something turns out to be unclear.

Important note: we have changed how the order of the properties displayed by CRUD pages is computed. Previously, each CRUD got to decide the ordering based on its configuration.xml (this aspect wasn’t editable via the web UI). Now, the order is controlled by table elements in the Portofino model, and you can change it from the new tables section. This is both easier to edit, and more consistent across the application: if you change the order, each CRUD will reflect your modification instantly. Of course, as every other user-defined setting, the order of columns is preserved across database-model synchronizations.

Improvements

We have also implemented several improvements:

  • Always on the cutting edge - Groovy has been updated to version 1.8.8 and Tuckey UrlRewriteFilter to version 4.0.4. Unfortunately, the Groovy reload bug is still present.
  • Better caching - the overall web cache support has been rationalized and improved to work well with both browsers and caching proxies. Specifically, attachments of text pages are now always cached. NoCacheStreamingResolution is no longer necessary and has been eliminated; you can use the plain StreamingResolution instead. You now have complete control over cache-related headers in your custom actions - look at the built-in TextAction for an example.
  • Better OpenID support with Google (Gmail) authentication.
  • Easier extensibility of text pages, so you can easily store the content where you prefer (on a database, on a content repository, etc.)

Bug fixes

We’ve also been busy squashing bugs (no DDT involved). Here’s a sample:

  • Dispatcher fixes: embedding of non-existing child pages no longer causes infinite recursion; jsessionid in URLs no longer breaks the dispatcher.
  • Persistence and CRUD fixes: the names of foreign keys are now properly normalized as with columns; searching and sorting in CRUD pages with complex queries no longer break due to failure to use aliases; integer types are mapped to Java types according to the precision reported by the database, choosing the best-matching type and using BigInteger as a fallback.
  • ...and other minor things.

Try it!

We invite you to try the new version and give us feedback! As a reminder, you can download it from here. If you have issues or suggestions, please come to our community forums and we’ll be happy to help you! Finally, if you need commercial support, we offer several options.

 

comments powered by Disqus