Would anyone be able to compare and contrast the two solutions? I don't know much about Se开发者_如何学运维am or JSF, though I am familiar with the way GWT works and very much like the theory of it.
Primary concerns:
Scalability / performance
Cross-browser compatibility
Learning curve
Productivity
WYSIWYG UI building
Capacity to code as much as possible in Java (I can touch JS/HTML/CSS if possible, but preferably not)
Concerning the server-side implementation of your app you have to take the following point into account (pro/con is subjective, so you should decide) when using GWT instead of JSF.
- As mention by @z00bs, using GWT you'll have a desktop like app. So you won't use/need page-navigation or page-action feature of Seam.
- All requests from GWT to the server are short-running. That means, most of your components will be of
ScopeType.EVENT
orScopeType.STATELESS
and you don't need/use the conversation scope. - Using GWT instead of JSF reduces the load on the server because you hold most of the state in the client.
- You cannot use the JSF/Seam-lifecycle with GWT. For instance, you lose the model validation part in the lifecycle. Model validation will only be triggered by using the entity manager or manually
- All other feature, such as security, mailing, or EL, are still working when using Seam with GWT.
Since Seam is well-known for its JSF support, you should consider another framework, such as Spring roo which is strongly related to GWT, too.
Concerning the client-side development of your app we had the same decision to make.
We decided to go for GWT for the following reasons:
- Most of the development can be done in java. Since we have a strong background in java development this will save us a lot of time.
- We could use all the well known and beloved tools for implementing since all is done in java.
- Our app was going to be a desktop like, single page web application without complete page refreshes. At this point GWT seemed to fit best for that need (and it still does).
- Pushing most of the state to the client and let him do most of the time consuming processing appealed to us. This way the server can handle lots of simultaneous request and connections to the server are only needed to sync the state on the client.
- The support for Unit Testing GWT code is good, in conjunction with the MVP pattern even better.
- Since the introduction of UiBinder creating and styling complex UIs has gotten a lot easier and faster.
To your main concerns:
- Cross-browser compatibility is mainly taken care of by GWT itself.
- WYSIWYG is possible with GWT Designer (I must say I've never used it; I like building the UI myself...)
- GWT is really fast because the rendering is all done on the client-side.
- Productivity is high when you're used to java.
- The learning curve depends mainly on the architecture you use (MVP is complex at first).
- Your application will scale since the server is freed of much costly processing.
Hope that helps.
(Some considerations concerning the choice of Seam are coming soon from @kraftan).
The conversation scope offered by Seam can readily be replaced in GWT by storing long lasting transactions (like shopping carts) in memory on the client side.
Neither! dont use seam (or jsf for that matter) if you absolutely dont have to! There are so many better web techs on java.
精彩评论