JSF and Spring vs poor JSP performance

I saw several JSF projects developed by my colleagues, and these projects seemed to me very slow. Does anyone have the same opinion?

I am currently using jsp + jstl and jQuery for a rich client.

I wonder what advantages and disadvantages have a modern framework (jsf, wicket, tapestry ...) according to the old simple jsp.

It would be great if people who used all these technologies answered.

I am also interested in what the most interesting functions made you leave jsp and use the “massive” structure (I mean, for example, AOP in Spring or something else that you may notice).

Thanks for all the comments.

+4
source share
5 answers

I used CGI, PHP, JSP, Struts, Spring MVC (1.2), the Bea workshop, JSF, JBoss Seam, Spring MVC (2.5), and Wicket (in that order). I noticed a jump in productivity and quality for every new technology I worked on. It just works better, it feels better. I prefer Wicket (with spring twist, quartz, etc.) over everyone else. I can honestly say that I saw the light, and I do not want to return to the darker - or lighter;) side.

Wicket has a lot to say.

  • The default support (or the inclusion of tabs) comes by default, you no longer worry about the problems with "opening a new page" and "back".
  • It is component based, so you can reuse ala swing code.
  • Uses a lot of standard Java, such as wonders such as security.
  • Supports advanced security features such as URL encryption.
  • Clustered applications by default.
  • And most importantly, use fun .

There are many opportunities to improve JSP and JSF.

  • The only thing that bothers me the most is the stupidity of "EL", because I believe that it violates the pleasant security and strength in the style of Java.
  • Both require support for high performance tools.
  • You need another structure on top of them to really solve the problems (as you can see from the framework, which makes JSF usable).
  • Error handling is very complex, and exceptions are not useful.
  • It is difficult to make reusable components on both platforms and does not support the proper model for separating problems.
  • ... and, most importantly, long, etc. minor pains such as this or this .
+8
source

I really like to use JSP 2.0 as a template technology - I use Spring MVC to access domain objects and prepare all the data that I need for a particular view, and leave it to JSP to display it. JSP 2.0 because I like to use tag files to compose templates, which allows me to use simple JSP 2.0 where I need other layout layouts.

I intentionally avoid everything in JSP, which is mostly programming. No data, no SQL, no scripts, no methods, nothing. a simple representation of the pre-existing data provided by the controller, with some simple cases and iteration of the collections.

+4
source

Many advantages. I can list the benefits of JSF that I used in my last project.

  • Central location for navigation (e.g. in racks)
  • Components like date picker, autocomplete, paging, etc.
  • You have a render for the layout, which greatly facilitates the layout logic.
  • The availability of tiles, for example, in racks.

JSP does not provide a clear separation between business logic and layout.

In any case, although all these advantages and if you are a Java programmer, I would advise taking alook in Grails , which is much more convenient.

+2
source

JSP is extremely primitive, you basically do not have widgets and you have to build everything yourself. JSF, while improvement is not the best web environment for java - there are many others that allow you to achieve a much more impressive result - for example, GWT.

0
source

Advantages of Spring MVC:

  • The structure carelessly encourages you to write more thoughtful code: by using dependency injection and splitting the design of your application into domain objects (models), controllers, classes of service, DAO, etc.
  • As a side effect of the first marker point, your code ends extremely and is easily tested with a block.
0
source

All Articles