Thanks Maneesh, This one seems to be the only resource for Struts + GWT. Although the features GWT provides are amazing but then it seems we get these RIA features at the cost of loosing the clean and clear methodology adopted by the Struts 2.
1. One of the powers of struts 2 is its clean and clear presentation of the "View Component". All you need to do is use a short and sweet OGNL expression to get the data from the Value Stack.
2. Second issue is regarding the Use of Struts 2 UI tags.Struts 2 UI tags are simple and clear easy to debug.
3. Mapping of UI components with Action Property is very easy all you need to do is have the same name for the UI component as the action tag.
I have still not understood Mapping of Data, how will the data sent from the browser through AJAX will be mapped to the Action Property. lets take a scenario.
assume we have two drop down A and B menus on our form.
A contains names of Batches and B will contain its corresponding List of students
as the user selects Batch from A, GWT needs to do two Things
1. Set the Property called "batch" to the value selected by the user.
2. automatically fetch the correspoing list of Student.
This should be automatically done through ajax.
in point 1, mapping is performed Between Combo box A and User property batch in say UserAction Class. this mapping is very easy in Struts 2
and the selected value of batch will be set to the batch property in the UserAction class.
we can see the batch selected by the user is so easily mapped to the Propery in the UserAction class all we needed to do was specify the name attribute of the <s:select> tag as property name i.e. batch
i had already created the model part using the Struts 2 framework (Action classes, Beans, DAO classes). once i was done with the model part i thought of using the RIA frameworks for the front end. I had following options
1. Flex - Excellent, but difficult and not full fledged integration with Struts 2. Just a work around rather than confirmed solution
3. Dojo - has an advantage that it ships in with struts 2, But i found DOJO to have performance issue.
4. Backbase - good but no resources for integrating with Struts 2
5. GWT - Best option amongst all for following reasons
- Provides Eclipse Plugin for Struts 2
- Has amazign third party tools like the one provided by Ext GWT specifically for Struts 2
The only issue with GWT is there are very few resources available for integration of Struts 2 and GWT although the plugins and tools are available for the same.
posted 9 years ago
and yes Why Struts 2. ITs simply the best
1. Declarative mechanism for mapping requests directly to Model classes
2. XML based Validation
3. XML based Type conversion
4. XML based I18n support
5. very easy resource access (session, request, config, app context)
6. very high level abstaction using Interceptor support
7. Simplest MVC flow.
GWT follows MVC. If you have the model ready, I do not see any problem integrating with GWT. Of course it is easy for me to say so
GWT exchanges data with the server in the form of POJOs via asynchronous calls. Under the hood it is finally a servlet. Unfortunately, not being a Struts developer, I am unable to comment more, except that you can try posting the question in our Struts forum with a link to this thread for clarification of your problem.
Yes i think i should do that. I am taking this GWT-Struts 2 issue ceriously because it is a very much sought after requirement on the internet. If this integration could be provided with the same ease as Struts 2 then i think this combination will be the front runner.
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!