I am using the combination of spring, spring-security, struts and iBatis in my application. Now I am looking to migrate the struts UI to GWT.

The new combination must be spring, spring-security, GWT and iBatis.

I applied a layered approach to develop my application. In Controller/UI layer i am using Struts. I want to replace struts and use GWT in Controller/UI layer.

Is is possible to use GWT without affecting another layers DAO/BL/SL?

  • 1
    Why GWT as opposed to say Spring MVC? I assume because you don't want to have to deal with Javascript etc? – Martijn Verburg Aug 28 '12 at 8:55
  • Correct .. I want to handle AJAX and JavaScript related stuff in more frequent way. Also GWT provides rich client look and feel tools are very nice to work on. – Satish Pandey Aug 28 '12 at 9:07
  • Some other technologies that you may consider for the presentation layer would be JSF or Wicket, both can also integrate well into Spring. I warn though that there are always little quirks and oddities in any of these frameworks that will force you to write custom javascript from time to time. – maple_shaft Aug 30 '12 at 11:31
  • The previous answers give good advice. I'd just like to add that there is a Vaadin add-on (JSP Integration) that might help during the migration process, depending on your actual migration strategy and whether your current Struts implementation uses JSP as a view technology. – Alejandro Duarte Apr 14 '16 at 15:47
  • I'm voting to close this question as off-topic because it's not about conceptual software design. – MetaFight Apr 24 '16 at 15:47

The short answer is: Yes, you can.

The problem is how to do it, as you will probably need a rewrite of your presentation layer and I don't think there is any tool that can help you easy up the migration.

  • Do i need to edit, spring application context and spring security settings also? – Satish Pandey Aug 28 '12 at 9:16
  • Well, I haven't seen your code, but I you'll probably have to adapt them too. It depends on how tied they are to the presentation layer and how you finally decide to do the migration. – adosaiguas Aug 28 '12 at 9:23

Well, yes, sure you can. Just make sure that the classes used in your frameworks are on the GWT white list. What that means in practice is:

  • Decide on the version of GWT you'll use in your project. If no constrains exist, use the latest.

  • Decide the versions of the other frameworks as well.

  • Decide which of the classes from those frameworks will be used in the CLIENT side code of your GWT project

Finally, if you arrive in a situation where certiain classes that come from your framework(s) will not be directly usable in GWT client code, there's multiple solutions:

  • check out if there's not already a "bridge" library/framework that deals with this issue (like Gilead for Hibernate)
  • if you have to do it by hand, explore the options (by maybe doing a small proof of concept): either implement a custom serialization policy, or make a DTO layer, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.