Link Details

In December 2010, I wrote a blog post entitled "Top 10 reasons why I don't like JSF", and I would guess that 50% agreed with me, the other 50% did not. No surprise, it's like religion. Now let's get to the real thing: Java Server Faces 2.2. The version that is leading me to readaption.

Posted by henk  |   Jan 11 2013 / 10:03

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Comments

User 161039 avatar

mheath replied ago:

In my opinion, if you're going forward with server side templates, you're doing it wrong.

Reply 0 votes
User 236075 avatar

henk replied ago:

Why? Because all the hipsters are riding on the wave that client-side Javascript is so cool? Wasn't twitter already going back to server side templates?

Reply 1 votes
User 161039 avatar

mheath replied ago:

Because of the hipsters? No. We're pushing templating to the client because it's a better architecture and frankly, it gives our users a better experience. Are you really advocating that reloading the same HTML over and over again because part of the UI changed is a good architecture?

Reply 0 votes
User 166389 avatar

dxxvi replied ago:

I don't know if I understand you correctly but going with JSF doesn't mean "reloading the same HTML over and over again because part of the UI changed". I have the feeling that the author wants to use some JSF component library to take care of the fancy UI. Before I liked JSF because of some great JSF component libraries like PrimeFaces, RichFaces ... and because I knew very little about javascript then, but now my javascript knowledge is improved a lot and I think I'll choose REST, jQuery and some javascript framework like knockout or angular.

Reply 2 votes
User 983885 avatar

infovation_Softwares replied ago:

so no Mobile, no browser independence, and no responsive websites.

Reply 0 votes
User 166389 avatar

dxxvi replied ago:

If I understand you correctly, did you mean "REST + jQuery + some javascript framework" is "no Mobile, no browser independence and no responsive website"? I think jQuery Mobile is the answer for "no Mobile", jQuery is the answer for "no browser independence". I don't have the answer for "no responsive websites" right now, but I think the difference between using jsf and rest + jQuery + some js framework is that with jsf the 1st time you load the page, html code is generated by your server while the dynamic html code is generated by the client machine with the other case. Then on your jsf page, when you make ajax calls to change the page content, maybe html code is again generated on your server and pushed to the client and then assigned to some element.innerHTML. I think depending on the situation it can be faster or slower than the client machine manipulating the DOM.

Reply 0 votes
User 236075 avatar

henk replied ago:

Why is pushing templating to the client supposedly a better architecture? Really, are you actually advocating that we send tons of javascript to the client, which has to plow through that to get the most basic thing rendered? Do you really think that having to wait seconds after the response is received is indicative of a good architecture?

Reply 0 votes
User 161039 avatar

mheath replied ago:

Seconds to get a basic thing rendered? Dude. It's time to upgrade the 386. Seriously, we have tens of thousands of lines of JavaScript that get plowed through in <100ms. And you only have to download the JavaScript once because it's static and can be cached. So, yes, I think that's a MUCH better architecture. Thanks for asking. It also means that we can deploy our front-end code and REST services independently. Because all our front-end code is now a set of static assets, we push it out to a CDN like Akamai so that our users outside of North America can download the front-end code much faster. It also makes it easier for us to break up our services into more discrete packages that can be deployed independently. Ok. You're right. This is a crappy architecture. I guess all the benchmarks we've been collecting over the past couple of years showing how much faster our client-side apps are compared to our JSF apps are broken. I don't know why Google and other big tech companies are moving in that direction with their web apps. What a bunch of morons. Thanks for setting me straight.

Reply 0 votes

Recommended Links

Scala
Written by: Ryan Knight
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Play
  3. Akka
  4. Debugging JavaScript
  5. Design Patterns
  1. Apache Hadoop
  2. REST
  3. Java
  4. Git
  5. Java Performance
Connect with DZone