Christmas time is over…
… and so its time to publish something. The last weeks ware filled with hard and intensive work to make my OSGI Enterprise Application run. Main work at the moment is the design of the Userinterface(GUI).
One part of the GUI – development I’ll present at EclipseCon 2009, together with Florian, the Plug-In developer of redView. (redView = Riena – EMF – Dynamic Views)
The idea to create the redView project was born some months ago, as I was discussing with Florian the problems to design a GUI for a complex ERP Enterprise solution. Such an Enterprise Application with hundreds of Entities and high quality and comfort for the users to work with should be designed using a GUI Designer.
I decided to use SWTDesigner from Instantiations as GUI Designer tool – from my experiences a really great application.
An ERP Enterprise Application has many high specialized windows (views), but also hundreds of standard – views. Standard views are looking same and most parts of the views can be generated from the Entity – data model.
Because my ERP Application is model-driven (using openArchitectureWare) the first idea was to generate the Java code of those views.
But if you generate Views there will be always usecases where the business user wants to change “only something”. If you do this using SWTDesigner then the Java code will be changed and cannot be generated again. So its difficult to manage this, if the model changes, attributes were added or so. Of course its a good idea to generate the first version of the views to make it easier to start designing.
My OSGI Enterprise Application already uses Eclipse Riena for Remote OSGI Services. Riena also has some nice things if you’re devloping a GUI.
Riena makes the programming of UI easier and uses Ridgets (encapsulated SWT Widgets). You dont lose flexibility because if you need it, you can access the SWT widgets, too.
Riena Ridgets also separate UI and Controller and make configuring Eclipse Databinding much easier.
In Enterprise Businessapplications you always have to decide:
- should this element be displayed ? (depends on Usecase or Data)
- is this element required ? (the user must enter data)
- is it a read-only element ?
- are there validation rules for this field ? (Phonenumber, email, from-to value, date, …)
Riena provides the concept of Marker and Validation making programming these things also much easier- and you’re sure that it will always look the same in your whole application.
If the code was generated you’ll get some informations for Markers and Validation already from the Entity model or Business-Process model. (An attribute marked as Businesskey or Index should be a required field) So you’ll get many defaults generated.
If you’re using Riena there are some problems designing with SWTDesigner, because the code generated from SWT Designer doesnt know the Riena – concept of splitting Controller und UI - but hopefully in the future the integration will become better.
Riena also includes a complete UI concept with own LookAndFeel, navigation and nice designed perspectives, where a perspective can be a subapplication of the enterprise application.
The Riena UI is clear, easy-to-use and doesn’t confuse a business user with all the functionality of Eclipse RCP. But (for me) there’s a downside of this concept: Riena always has only one View open at a fix position. There are many UseCases in an ERP Application where I need more then one View opened including Drag’n'Drop between the Views. I’ll see if there will be ways in the future to combine this, because I would like to use some of the cool things Riena provides for UI – development.
But all of this is no answer how to design Views of Enterprise Applications in model-driven frameworks: what can be generated without losing flexibility in design ?
So we’re back at my discussions with Florian last autumn. Our vision:
Wouldn’t it be great to have a GUI including all the comfort from Riena, dynamically created at runtime depending on an EMF Metamodel ?
… and these EMF models for each View itself are generated using openArchitectureWare from UML Entity- and Businessprocess – models ?
… and having a graphical designer – editor, where a business user or – programmer can easyli change the generated Views ? (Drag and Drop to change the order / position of elements, add or change validation rules, add or change Riena Markers, Fonts, Colors,….)
… and wouldn’t it be great to combine these changed EMF models with changes from UML models next time generating the Views again ?
This was a vision in october 2008 – now we’re knowing that it works ( I already generated some hundred Views for the ERP project successfully) and we’ll present it at EclipseCon 2009:
an Entity in UML class diagram (MagicDraw)
oAW Xtend creates EMF elements using UML model with JPA Persistence Profile
redView Designer with generated elements – the yellow marked entry field indicates a Riena Marker „required“
EMF Outline View with generated elements
The Properties View of one GUI element.
Its still some work to finish all aspects of databinding, I18N, Platform – independence (at the moment tested on OSX and Windows), and using Styles and Themes.
Hard weeks, short nights, bit it’s fun to work with Florian and to make a vision reality.
Now these are the ways to design the GUI of my ERP Enterprise Application:
- Standard Views will be generated using oAW as EMF models
- redView creates dynamic Views from these EMF models
- Spezial Views can be generated first times from oAW
- Standard Views can be designed using redView Designer
- Spezial Views will be designed using SWTDesigner
- Riena Ridgets, Marker and Validation is used
The last years I was using EMF only indirectly and all my generation of code and artifacts using oAW was based on UML. No I reached the EMF world as so many others, too
The flexibility of EMF and the good integration into oAW is really great – it is so easy to work with UML and EMF together.
I’ll report in detail about all different aspects of designing UI in Enterprise Applications from my point of view. Because its a complex story, I started a new blog series “UI in OSGI Enterprise Applications”. Of course I’ll also compare the pros and cons using some of the other great UI projects or how to combine them.
… stay tuned.
… the other blog series about Logging, Server, Declarative Services will also be continued – all belongs together.