0

I'm planning a project which will use Primefaces to generate its UI.

I understand that PrimeFaces as JSF library is somewhat more at home with Java EE than Spring, although there seems to be a lot of examples of using it together with Spring.

Are there any notable disadvantages of using Spring instead of Java EE for the DAO and service layer in a PrimeFaces project?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
user75
  • 3
  • 1

1 Answers1

0

It complicates the things, Java EE is complex enough for application developers(you need time to open dark parts and see the lights or i hope it:)) so my opinion if you don't have a requirement about it, don't use Spring and JSF together to better understand your bean lifecycle. You can find good dicussion in this source. I prefer to use HTML+Bootstrap and Spring MVC or use Seam Framework for JSF or no framework just use pure Java EE support with primafaces(JSF) can be good.

Community
  • 1
  • 1
erhun
  • 3,549
  • 2
  • 35
  • 44
  • 2
    The seam framework is dead as can be read on the [homepage](http://www.seamframework.org). It has been superseeded by [deltaspike](http://deltaspike.apace.org). That, withJEE, PrimeFaces, combined with [OmniFaces](http://www.omnifaces.org) and [picketlink](http://www.picketlink.org) instead of spring security or apache shiro, you have a powerful set of frameworks. But still this question is to much subject to opinion. – Kukeltje Feb 16 '15 at 19:11
  • @KukeltjeThanks for information about Seam, i didn't know it. You are also right about question cover a lot of thing but main subject as i understand is it a good idea to use Spring with JSF(Primafaces in here) and to me it is not a good solution to clearly understand Java EE ecosystem. Because Spring and JSF has different lifecycle. – erhun Feb 16 '15 at 19:20
  • I have no (fairly recent) spring experience and am not a fan, but from reading I do think that you can combine the two in a decent way as long as you do not try to combine parts of spring and parts of JEE, but even that may not be true anymore – Kukeltje Feb 16 '15 at 19:56
  • Good points! You seem to confirm what I had read in articles: Spring + JSF can be done, but is not ideal. – user75 Feb 17 '15 at 07:04
  • @user75Thanks, please share article link in here for further reading about this subject. – erhun Feb 17 '15 at 07:12
  • 1
    This is the most informative: http://www.beyondjava.net/blog/integrate-jsf-2-spring-3-nicely/ It's partly outdated, but there are updates at the bottom. – user75 Feb 17 '15 at 07:15