We have a ERP application, the UI of which is defined in xml files using custom xml tags. We want to change the UI to be like an RCP application, but the caveat is that the screens or forms has to be still defined in those same custom xml tags and there should be just a renderer plugged in the system which will render a RCP UI instead of an HTML UI.
I have looked and still looking at various frameworks /toolkits like GWT, ExtGWT, ZK etc …
As I am new to Vaadin, so don’t know the intricacies, but as it is a server-side UI framework, I feel I can extend it to read the UI information from out custom xml tags and render the UI based on this information.
I am not sure, but I guess that Vaadin does’t compile all the UI stuff into a monolithic js file, bcoz as ours is an ERP application we will be having loads of screens/forms, so I just that that whenever the UI is requested it should be fetched from the server and rendered onto the client.
What I have in mind is, I would require a bootstrap code sent to the client initially and then based on the request and I can read my custom xml tags and form an UIDL obejct and sent it to the client which should render the UI using this UIDL object.
I have just download the Book of Vaadin, will be going through it, right away.
Any idea on how can I extend Vaadin or links to tutorials or some open source project using which my use case can be achieved is appreciated.
The normal Vaadin approach is to write the UI in Java. Each Vaadin component has a server side part and a client side part (widget), and the UI is constructed on the server. The client side code does not contain all the views of the application but only the code that know how to display (generic) buttons, layouts etc. as instructed by the server. Application logic is on the server side, and the client side widgets communicate events to the server, in response to which the server can update the (server side) components. This leads to a short message being returned to the client with the updated parts of the view.
The architecture chapter of the book gives an overview on how this works.
Note also that the term UIDL in the book of Vaadin refers to the messages sent on the internal communication channel between the server and the client, so don’t get confused about that having much to do with UIDL as you understand it. Your renderer would map your UIDL to Vaadin server side components.
Thanks for the detailed explanation Henri and for the links to the add-ons, will have a look at them.
“The client side code does not contain all the views of the application but only the code that know how to display (generic) buttons, layouts etc. as instructed by the server.”
By this I guess you mean, that the Vaadin application is not compiled to a single js file ? but instead have a js file which bootstraps widgets (buttons, layouts etc), based on the instructions from the server ?
So if the initially downloaded js file bootstraps other widgets, it does it using the UIDL from the server ?
Just download the Vaadin code. I think if there is already a client side code which renders the widget using some model object, then I can create that model on the server based on my custom tags definition and pass it to the client to render that model.
Also I am looking at if possible can I make the vaadin widgets not to be server sided (should I use the plain gwt widget for this), and only on client, bcoz my custom definition will be having the gwt rpc services configured using which the widget should communicate with the server and not persist it UI state on the server.