What are the main disadvantages of Java Server Faces 2.0?

前端 未结 13 2382
猫巷女王i
猫巷女王i 2020-11-22 06:29

Yesterday I saw a presentation on Java Server Faces 2.0 which looked truly impressive, even though I am currently a happy ASP.NET MVC / jQuery developer. What I liked most a

13条回答
  •  独厮守ぢ
    2020-11-22 07:02

    Commenting on my last few months of Primefaces/JSF experience:

    • If you can use components "off the shelf", I guess it's not terrible.
    • However, it doesn't play well as soon as you step outside and need custom UIs. - For example, we needed to use Twitter's bootstrap for our project. (Not primefaces bootstrap).
      • Now our pages work as follows:
        • Page loads.
        • User interacts with a Primefaces that has ajax functionality
        • Bootstrap's javascript bindings break
        • We run extra javascript to rebind everything

    The promise of JSF to avoid writing javascript turned into writing more javascript than we would have if not using Primefaces--and that javascript to is fix what Primefaces breaks.

    It's a time sink--unless you again use "off the shelf" stuff. Also really ugly (Primefaces) when having to work with Selenium. It can all be done--but again--there's only so much time.

    Definitely avoid this if you're working with a UX/design team and need to rapidly iterate on the UI--you can save time by learning jquery/writing straight HTML--or looking at react/angular.

提交回复
热议问题