!!!Portofino

Portofino ist ein Anwendungs- und Content-Management-Framework in [Java] und [Groovy]. Die italienische Firma [Manydesigns S.r.l.|http://www.manydesigns.com/home-en.html] in Genua beschreibt es mit dem Slogan "Create a webapp from an existing database in 30 seconds".

!!Erste Schritte

Die Anwendung gibt es zum [Download auf Sourceforge|https://sourceforge.net/projects/portofino/]. Die 70 MB grosse ZIP-Datei enthält einen Tomcat 8 mit 
der "leeren" Portofino-Anwendung im /webapps/-Verzeichnis.

Zum Probieren lege ich eine Postgres-Datenbank "portodb" an.

Portofino unterstütz die Pflege des Datenmodells mit LiquiBase. Ich lege also 
eine Datei "portodb-public-changelog.xml" im "WEB-INF/dbs/" der Anwendung an. Das Namensschema ist "<datenbank>-<dbschema>-changelog.xml".

Erstes Beispiel:

{{{
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog 
     http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

    <changeSet id="porto-20160216-01" author="Peter">
        <createTable tableName="customer">
            <column name="id" autoIncrement="true" type="int">
                <constraints nullable="false" primaryKey="true"/>
            </column>
            <column name="company" type="varchar(255)">
                <constraints nullable="false"/>
            </column>
            <column name="section" type="text"></column>
            <column name="streetaddress" type="varchar(255)">
                <constraints nullable="false"/>
            </column>
            <column name="streetaddress" type="varchar(255)">
                <constraints nullable="false"/>
            </column>
            <column name="zipcode" type="varchar(8)">
                <constraints nullable="false"/>
            </column>
            <column name="city" type="varchar(100)">
                <constraints nullable="false"/>
            </column>
            <column name="contact" type="varchar(255)">
                <constraints nullable="false"/>
            </column>
            <column name="email" type="varchar(255)">
                <constraints nullable="false"/>
            </column>
            <column name="created" type="date">
                <constraints nullable="false"/>
            </column>
        </createTable>
   </changeSet>
 </databaseChangeLog>   
}}}

[{Tag Java Groovy Web}]