In Brasato, we develop code in controllers.
Each controller is normally in an own java package.
A controller represents a "business ui case" and has control over the component it generates
and the subcontrollers (normal controllers again) which it needs to do its work.
A controller has an initial component.
Have a look at the ch.goodsolutions.demo.basics Java package:
It contains all files which constitute the workflow, that is: java source code (SimpleDemoController.java), i18n files (_i18n folder), velocity templates with html-fragments (_content folder), and static files like css and images (_static folder).
Below we see the files which are needed for the code to work.
Click on the parts to see them enlarged.
|
Main HTML fragment for the "Demo A"
HTML fragment for the panel bottom-left when you click on the "a simple button" - button
|
This leads to the part of the screen marked in red.
What you have now is an independant ui workflow / controller which can be reused on and on if this makes sense.
You try to code controllers in such a way that they represent reusable flows, e.g. a user search, a group management, a forum, a wiki and so on.
Here you see an architectural overview of Brasato
Here is a whitebox of the layers of brasato.
Here is an example of a dispatch cycle.
The GUI Framework has mainly two things to do upon each browser-click from a user: