简体   繁体   中英

Seam with JSF v. Seam with GWT

Would anyone be able to compare and contrast the two solutions? I don't know much about Seam 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 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).

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 or ScopeType.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.

通过在客户端的内存中存储长期持续交易(如购物车),Seam提供的会话范围可以很容易地在GWT中替换。

Neither! dont use seam (or jsf for that matter) if you absolutely dont have to! There are so many better web techs on java.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM