Perspectives, in this case, are snap-in applications that plug into the main application and share the login information, locale etc of the surrounding application. That means the subapplications don't have to worry about those issues and can be simpler. It also means you can construct a semi-dynamic workspace with plugged in apps that share a c…
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
madura-perspectives-bmi
madura-perspectives-library
madura-perspectives-manager
madura-perspectives-name
madura-perspectives-nameaddress
madura-perspectives-pizzaorder
travis
.gitignore
.project
.travis.yml
LICENSE
README.md
pom.xml

README.md

madura-perspectives

Maven Central

build_status

More detailed documentation can be found at Madura Perspectives

This provides a web based framework for sub-applications to plug into. The framework looks after logging in and assigning permissions as well as managing a window (using Vaadin) for the sub-applications to display in. It also provides a blackboard arrangement so the sub-applications can be loosely coupled.

Sub-applications can be added dynamically while the application is running. They can contribute entries to the main menu which appear dynamically when that sub-application is active.

The framework s easily customisable using Vaadin's facilities (CSS etc). The CSS definitions are, of course, shared across all of the sub-applications so you get a consistent look and feel.

If you want to try this out quickly there is an on line demo, scroll down to the demos and pick Madura Perspectives Online.

Build this using maven clean package. You will find the following sub projects:

madura-perspectives-library

This holds the code common to the perspectives manager and the sub-applications.

madura-perspectives-manager

This delivers a war file that can accept bundled sub-applications. The default is to add them to the WEB-INF/bundles directory, which at first glance makes the whole dynamic sub-applications seem a bit pointless since they are embedded in the war file. But this is a good way to set up a demo because it saves you having to configure it. See the docs for details on configuration, but you don't need to configure it to see the demo. The docs are in the pdf file in the target directory (after you've run the build).

We have tested the war file under Tomcat 8 but it should run on any JEE server.

Because it is a demo we have avoided the need to use a database etc.

madura-perspectives-name

This is the simplest of the sub-applications. It puts a single field on the screen. It also puts the field onto the blackboard.

madura-perspectives-nameaddress

This slightly more complex in that it adds address information, as well as adding an entry to the main menu.

madura-perspectives-pizzaorder

This is much more complex in that it implements the Pizza Order demo from Madura Rules Demo. This is a rules-driven pizza configuration which lets you pick different pizza bases, toppings and sizes, except that only some combinations are allowed and the rules enforce this. The rules, UI and underlying domain objects are all delivered by the sub-application.

It also contributes two entries to the main menu: Save and Cancel, and the Save option disables if there is a required field that has not been filled in. So this shows the menu can dynamically change according to the bundle selected.

madura-perspectives-bmi

The BMI calculator is a rules driven sub-application that prompts for fields as it needs them. It is the same as the BMI demo in Madura Rules Demo but packaged in a sub-application.