-1

I am a student and I know to programm in JAVA SE pretty well. However I have no web development experience.

This year I am going to do my bachelor thesis and I would like to hone my skills in JAVA EE. I would like to build a simple web application - something similar to "trivago" so people come to my website and compare prices of hotels in their desired destination.

This web application should run along with hibernate and web-services (Rest) as well. Is it good choice to build core of this web application in JSF ? Does it cooperate with hibernate and Rest without any problems ?

I've read a lot of stuff on the internet people claming Spring MVC is superior. Some of them even claim you should avoid JSF if possible since it's horrible to code in and that it doesn't support MVC architecture well... However I think JSF 2.2 make a lot of progress compared to JSF 1.2. Is it a good choice for my simple web application use JSF or should I look for another framework like Spring ?

Thanks

Martin Čuka
  • 16,134
  • 4
  • 23
  • 49
  • 2
    Asking this to JSF users will give you the answer "Yes". Asking this to Spring MVC users will give you the answer "No". In other words, this question is not really constructive. Better just play around with both and conclude yourself. At least, here's some food for read: http://stackoverflow.com/questions/3623911 and http://stackoverflow.com/questions/29982657 – BalusC Sep 05 '15 at 08:16
  • Thanks, I will go through some Spring tutorial to see the difference on my own and then decide which suits me better. I am just afraid of complexity of spring. It seems to be very rich framework with a lot of features (probably I will need only few of them for now). – Martin Čuka Sep 05 '15 at 17:15
  • 1
    Java EE has many more features. Do note that Spring is essentially a competitor of Java EE. See also a.o. http://stackoverflow.com/questions/7295096/what-exactly-is-java-ee/ – BalusC Sep 06 '15 at 07:08

2 Answers2

1

I've used both JSF 2.X and Spring MVC for basic web projects. I liked JSF better, though it is newer and not as common as Spring/MVC. JSF is conceptually different from Spring MVC in that in JSF you are essentially tying a bean to a page whereas in Spring MVC you are operating within the Spring framework. If you have no web development experience I'd write a few simple JSP pages to get the hang of things first.

Also, with Spring MVC I found myself quickly steered into Thymeleaf for the client/web pages and though it was effective I didn't develop much of an affinity for it. JSF with Primefaces was effective though a little underwhelming. I was also able to use Bootstrap, and even found a demo somewhere for Angular JS within JSF. I concur with the comments that the client side framework, e.g., node JS, Angular JS, Primefaces, Richfaces, what-have-you should be something that you consider very carefully for the client side of web-development. You really need to be able to understand and talk Ajax or some kind of javascript to server communication for your webpages to be up to par.

K.Nicholas
  • 10,956
  • 4
  • 46
  • 66
0

For many years I developed applications in JSF 1.* and 2.*. Now with Jax-RS, we've switched to AngularJS for a frontend with RESTful endpoints. I would never go back to JSF.

If you're just starting off, I would start learning Node.js + Hapi.js + Aurelia. That's the future, and the entire stack is javascript. With the recent adoption of ECMAScript 6 (ES6, ie Javascript spec), and ES7 on the horizon, node.js is the way to go.

Bottom line, skip JSF. Either go node, or do Aurelia (or AngularJS) + Jax-RS.

John Manko
  • 1,828
  • 27
  • 51