Posted on May 31, 2013 by Paolo Predonzani

In many real life projects, some important design decisions have already been taken by others before we even start to work. This is the case, for example, when we are asked to write a new webapp on top of an existing (legacy) database. The table schema is fixed and cannot be changed. In these situations we have to start from what we have and build the best possible webapp.
In this video I consider a simple, practical example. The given database is Openbravo, the web application framework is Portofino 4. Step by step, I create a functional and pleasant application. In this video I explore the CRUD on a single table: "m_product". In future videos I will tackle workflows and on-line reports.

Some highlights from the video

In square brackets is the minute/second which I refer to:

[1:03] I connect to the existing database and extract the metadata

[2:21] I change the order of columns through drag-and-drop

[3:28] I define the CRUD in terms of an HQL query

[3:43] I set the properties as visible, writable and searchable

[4:30] I define the "short name" of an object as an OGNL expression

[5:10] I decode a foreign key into more readable names

[6:00] I decode a Y/N text field as a real boolean

[6:58] I change the labels of the CRUD and of some columns

[7:48] With a few lines of Groovy I make the "created" and "updated" fields set automatically by the system

[9:15] I change the date format


comments powered by Disqus