JSF or MVC with servlets / JSP or other interfaces?

I am working on developing a social web application using Java. I need to develop the interface / graphical interface of my application for web browsers.

I am wondering what is the best strategy for developing frontend, be it using frameworks like JSF 2.0, and like OR, just following the MVC approach with servlets and JSP?

As I heard, JSF really simplifies development, but the learning curve is not too low either, so is it worth it to learn JSF, or should I prefer direct servlet / JSP execution?

I am new to developing web applications using Java, and I have almost finished writing business logic for the application.

Confirm your answer based on the following parameters:

  • Performance and Cost
  • Ease of development and time (taking into account training time)
  • Future code maintenance
  • Any other parameters that you consider important.

Update (07-09-2012):

Finally I went with JSF-2.0 and still have no regrets. The learning curve is not steep. It is easier and faster to develop with component libraries such as Primefaces. There are some costs associated with maintaining state, but these things can be handled reasonably. The community is large, and now everything is well documented. Let's hope that in the near future "No JSF" without accompaniment, and this will accelerate JSF with high performance.

+6
java java-ee jsp servlets jsf
source share
5 answers

For the webapp hobby, homebrewing some MVC frameworks is nice. This is a good study tour. However, this will bite you in the long run, for sure if you publish on the Internet and become popular. Most existing MVC infrastructures are very well thought out. Most unforeseen warnings are considered. A single infrastructure API is supported and documented by a third party.

In addition, whenever your webapp becomes popular, and you need more developers to work on it to meet the requirements / wishes of the end user, it is easier to find someone who is already familiar with the existing infrastructure. With a home-built and possibly erroneous MVC structure, you are more likely to find fewer developers who are willingly immersed in another learning curve before embarking on a service that they are likely to never reuse in their future work. / projects.

This does not apply specifically to JSF, but to any other existing and popular MVC environment, such as Spring MVC. As for JSF in general, well, I already wrote a lot about this before. Here are some good starting points to read one and the other about it:

  • JSF vs plain HTML / CSS / JS
  • Acceptance and popularity of JSF
  • What are the disadvantages of JSF 2.0?
+6
source share

For modern web applications like yours, and if your responsibility is the user interface, you really don't want an “abstraction layer” between you and your html / css / javascript. Do not use a "component" structure.

I heard JSF really simplifies development

Have you heard about this from real webapp developers who actually used JSF in real products? Or was it just that the JSF committee patted his back? Or some desire of old timers to think that they do not need to learn javascript darn?

If you choose JSF, report your experience to us after you shoot yourself out of frustration.

+4
source share

Better to use some MVC environment. You can use component based infrastructure:

  • JSF = mostly standard, but it's hard to recognize, and many people don't like it.
  • Tapestry = A rather large and probably good structure.
  • Wicket, GWT - frameworks based on smaller components, convenient, powerful, smart, but I have not used them yet
Or you can use a query-oriented structure.
  • Spring MVC, Struts 2 = They are very similar. Spring MVC probably has better documentation
  • Struts - I DO NOT recommend this when you can use Struts 2 or Spring MVC - you can trust me at this point

Each structure has its own pro-and-con dependence on the situation and your knowledge. I can not give a definite answer.

+1
source share

You might want to consider Tapestry 5 if you are exploring options. We have enjoyed using it for many years in a large project in the field of social networks. This is an easy-to-use component-based MVC framework. We can develop rapidly with it, especially now that we have created many of our building blocks.

Training time is likely to be on par with the increase in any new structure. I would say that it is less than JSF and more than Spring MVC, although it really depends on what you are already familiar with and how deeply you use things. I put together a very small project on github a while ago to get started with Tapestry 5 quickly if you are interested in tapstack .

Regarding the long-term use of the tapestry-based application, it serves us well. Serving the code was much better than using JSP. It is very stable. We requested billions of page views through Tapestry without any major issues.

On the other hand, it is less common than some other web frameworks. This is definitely a bit different. We believe that it is worth it and useful for work. Ultimately, this will depend on what you need and what you think is best for you. Good luck with your decision.

0
source share

Spring MVC is very easy to learn, and if you have a simple web application and want to save your time, this is better than JSF.

However, if your web application is not so simple, JSF is superior to Spring MVC. Its model is more complex, but it is much better structured and widely supported, so you do not need to reinvent the wheel in most cases. Sophisticated gui can work with JSF with less effort.

0
source share

All Articles