Portofino#
Portofino ist ein Anwendungs- und Content-Management-Framework in Java und Groovy. Die italienische Firma Manydesigns S.r.l.
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
. 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="varchar(255)"></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>
Nach dem Starten des Tomcat kann man sich auf http://localhost:8080/
mit
User "admin" und Passwort "admin" anmelden.
Dann lässt sich mit "Administration / Wizard" die Datenbank konfigurieren und eine erste Anwendung erzeugen.