Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
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
add comment

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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