0

What would be a good strategy(framework etc to choose) to develop the frontend(GUI) & controller parts of a moderately complex web application(social portal) developed in Java. What framework if any are recommended. I had heard a lot of good about JSF but recently came to know about lots of its shortcomings.

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
  • I won't answer this subjective and argumentative question, but I would really like to point out that this article dates at 2007, far before Facelets became mainstream as successor of JSP which lacked so much in templating/compositing capabilities and also before JSF 2.0 was introduced to provide standardized Ajax capabilities out the box. As to the UI components, this is absolute non-concern. There are plenty of rich libraries like RichFaces, PrimeFaces, IceFaces and OpenFaces. Most of which already exist long before 2007. – BalusC Mar 21 '11 at 17:24
  • You may find this related question interesting as starting point: [What are the disadvantages of JSF 2.0?](http://stackoverflow.com/questions/3623911/what-are-the-main-disadvantages-of-java-server-faces-2-0) – BalusC Mar 21 '11 at 17:27

3 Answers3

2

Well, JSF is not that bad. :) From just skimming over the link you provided, I can see that the basic problem is lack of components. Thus you might want to try component libraries like RichFaces or PrimeFaces.

One problem that we experienced though, was the sometimes limited customizability of the components' look and feel, i.e. it might get harder if you have strict requirements on layout/look and feel.

Thomas
  • 87,414
  • 12
  • 119
  • 157
  • Thank you so much Thomas! Does JSF deal only with the GUI & Does it really makes the UI development faster ? However we dont want to get limited by the limited customizability of UI. Are there any better frameworks to consider or would it work equally well if we went ahead without any framework ? – Rajat Gupta Mar 21 '11 at 17:11
  • 1
    Well, it depends on your architecture. We also use Struts2 and Tiles for our applications, but the business logic behind them is indepenent of the web framework. Thus, we normally just need to replace the classes backing up the framework (JSF Managed Beans or Struts2 Actions). Since those are mostly just glue code, it's quite easy to do. However, I'd still recommend looking for some framework now, since it makes life easier :) – Thomas Mar 21 '11 at 17:15
  • 1
    "limited customizability of UI" - The limits of customizability depend on your needs. There are quite good component libraries that provide a level of customizability (like colors, fonts, icons). If that isn't sufficient, you could write your own renderers or even components, or you could use Facelets to build simple components of your own. – Thomas Mar 21 '11 at 17:16
1

Our team has used JSF on two projects so far. It worked well using component libraries such as PrimeFaces and IceFaces for more complex components (AJAX, composite components, etc). We sat through a very boring IceFaces webinar recently discussing the benefits of JSF2. You should look into JSF2.

dseibert
  • 1,319
  • 9
  • 19
  • Are there any better frameworks to consider or would it work equally well if we went ahead without any framework ? Thanks so much! – Rajat Gupta Mar 21 '11 at 17:12
  • 1
    If you go with no framework you'll have to develop a lot of things yourself, which makes increases your UI development time. You will get CSS templates when you include the IceFaces and PrimeFaces components into your application, so you can modify look and feel that way. The issue with these libraries is the HTML they generate is sometimes not what you expect. For example, a text field could be wrapped in a
    by default and any style changes will be made to that div. This will cause much confusion when modifying style of the text field.
    – dseibert Mar 21 '11 at 17:25
0

All frameworks out there have pro's and con's. These are the ones we have used with some success:

  • GWT + SmartGWT: Upside, it is Java and the GUI editor is pretty neat. Downside, compilation time is huge.
  • Wicket: Upside, it is Java+HTML. Downside, we had to use a lot of javascript to get it to work the way we wanted.
  • Struts + YUI: Upside, it is kind of simple for simple things. Downside, things gets ugly fast.
  • JSF: It is like the Opera, either you like it or you hate it. I'm in the "hate it" part so anything I said is biased (plus, in our test prototypes developing in Wicket was faster than JSF)
Soronthar
  • 1,601
  • 10
  • 10