-
Notifications
You must be signed in to change notification settings - Fork 55
Migration from Portofino 4 to Portofino 5
Alessio Stalla edited this page Jan 8, 2020
·
6 revisions
This list details the changes from Portofino 4.2.x to Portofino 5.0. Please refer to the changelog for the changes from Portofino 5.0.1 onwards. In general, on the 5.x development branch, there are no breaking API changes unless otherwise noted in the changelog, and we'll strive to keep those to a minimum.
- removed Stripes
- removed own dependency injection in favor of Spring
- reduced Module interface and changed Modules so that they are registered as Spring beans
- Modules must be Java classes, not Groovy
- moved
dbs/db-schema-changelog.xml
toportofino-model/db/schema/liquibase.changelog.xml
- renamed
page.xml
toaction.xml
and<page>...</page>
to<action>...</action>
- renamed
Page
toActionDescriptor
- renamed
PageInstance
toActionInstance
- renamed
PageAction
toResourceAction
- removed
@CssClass
annotation - removed all
PageAction
s (nowResourceAction
s) except crud, many-to-many and login -
WEB-INF/pages
is nowWEB-INF/actions
-
WEB-INF/groovy
is nowWEB-INF/classes
- removed
@Button
in Groovy actions - Currently it's no longer possible to edit action.groovy from the UI
- The UI no longer uses Bootstrap and it is instead based on Angular Material
-
SessionMessages
isn't used anymore because it does not work with the REST API. Instead, useRequestMessages
which passes messages in a custom HTTP header (which the Angular UI knows about and can show to the user).
-
GET /api
returns the OpenAPI (Swagger) descriptor of the whole application's API (JSON and YAML formats) - Authentication with JWT (JSON Web Token)
- Angular UI client
-
@Operation
instead of@Button
to declare REST methods to the client - Language selector out of the box
- Configure hidden actions from the administration UI
- Standalone "Upstairs" app (for the administration of a Portofino application backend)
- Groovy
- the model
- Liquibase (except the changelog file is moved)
-
configuration.xml
and permissions inaction.xml
- Access levels and permissions
- CRUD and many-to-many pages (ported to Angular)
- the administrative interface, including the wizard (ported to Angular)
-
Security.groovy
(but moved) - Navigation and breadcrumbs
- Different page templates & possibility to include your own (although they are Angular templates, of course)
In general, a full migration requires rewriting part of the app.
- Ensure you're using at least Java 8 and Tomcat 8
- Copy the model
- Copy Groovy files from groovy to classes
- if you have Liquibase changelogs, move
dbs/db-schema-changelog.xml
toportofino-model/db/schema/liquibase.changelog.xml
- Copy
pages/
toactions/
- rename
page.xml
toaction.xml
and rename thepage
tag inside it toaction
- replace
@Inject
with@Autowired
- add
@Qualified
when more than one bean of that type is available
- add
- fix renamed packages (e.g.
pageactions
->resourceactions
) - if the class is a module, either rewrite it in Java, or arrange your build so that it compiles such class ahead of time to a Java class
- Remove all references to
Resolution
and other Stripes classes - When necessary, reimplement Stripes handler methods as JAX-RS REST methods
- Replace
@Button
with@Operation
when appropriate
Porting JSP's to Angular is a fully manual process.