TL;DR This post talks about a SEMAT pet project I created using Apache Isis and deployed to OpenShift Online here http://semat.ofbizian.com
Apache Isis
As a Java developer who is working primarily on backend systems, IThere is much more to Apache Isis than only creating user interfaces, it is a full stack rapid application development framework focused on domain driven design. But rather than talking about it, let's see a complete application created with Apache Isis.
SEMAT Essence Kernel
To learn Apache Isis, I decided to implement the SEMAT model and deploy it to OpenShift Online asa Docker container. Simply said, SEMAT (Software Engineering Method and Theory) Essence Kernel is a OMG Standard that helps define among other things a framework for describing the state of software projects from multiple perspectives (called alphas).SEMAT Alpa States |
Stakeholders, Opportunity, Requirements, Software System, Work, Team, Way-of-Working. And each Alpha can be in one or multiple states, for example, the Stakeholders can be: Recognized, Represented, Involved, In Agreement, Satisfied, etc. In addition, each state has certain items to be satisfied before an Alpha can be transitioned to that state.
Stakeholders Alpha's States |
The Showcase Application
Enough said, to see how much Java I had to write for this application, check the dom module of the project on github. All of the other skeleton code is generated through a maven plugin and no user interface code is required. And here is a screenshot of the Project domain entity screen rendering:Project view as Apache Wicket screen |
SEMAT REST API generated from domain model |
Some of the SEMAT Application Features implemented/enabled
- Multi tenancy
- Manage multiple projects per tenant
- Manage project Alpha states
- Custom Essence Alpha state list per tenancy
- Custom Essence Checklist items per tenancy
- Alpha state spider/radar diagram
- Automatic Apache Wicket based UI generation from domain model
- Automatic REST API generation from the same domain model
- Self Signup/Registration
- Auditing user actions
- Session logging
- Internationalization
- Breadcrumb trail
- Bookmarks
Build and Run
Check the readme for full details, but you can build and run the application locally or on OpenShift to try it out.mvn clean install
cd webapp
mvn jetty:run
or
mvn clean install
docker build --rm -t bibryam/semat .
docker run -p 8080:8080 bibryam/semat
Then go to http://localhost:8080/ and login: user/user
Deploy to OpenShift
Once you have got an OpenShift running either locally or online, and have a oc client installed, then you can deploy the already build semat docker image with the following commands:oc new-project sematIf you do not trust docker images build by others (you should not!) then you can build your own docker image as shown above with options 2 and 3 and push it your own docker registry and run the application from it:
oc new-app bibryam/semat:latest -e CATALINA_OPTS=“-Xmx300m”
oc expose service semat
oc new-app your_name/semat:latest -e CATALINA_OPTS=“-Xmx300m”Alternatively, you could avoid installing and running docker all together, and have the source code and the docker image build on OpenShift. That is called OpenShift Source-to-Image approach. You can do this from OpenShift UI by using for example "Red Hat JBoss Web Server 3.1 Tomcat 8 1.0" template and pointing to the SEMAT github repo. Or use the template provided in the project itself:
oc create -f semat-openshift-template.jsonUsing source to image approach allows setting up github webhooks, have a Red Hat base image, have jolokia added, Java memory configurations done, etc.
oc process semat
Live demo on OpenShift
See try out the application, check live demo running on a OpenShift Online http://semat.ofbizian.comIn summary, if you have a domain model that changes often, and the agility in changing the domain logic is more important than how the user user interface looks like, check out Apache Isis. It is an incredible productive and fast business application development framework.
Follow me @bibryam for future blog posts on related topics.
0 comments:
Post a Comment