Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Large sites powered by Java web frameworks and Tiles + WebWork

Yesterday, I delivered a Comparing Web Frameworks seminar that included Struts, Spring MVC, WebWork, JSF and Tapestry. This was for a client that's in the process of re-working an extremely high traffic site (50+ servers currently) from Servlets + JSPs to a web framework. They love the idea of Tiles (and know how to use it) as well as plan on integrating many Ajax features.

We quickly eliminated Struts because of ActionForms since they're planning on moving to persisted POJOs. Spring MVC and JSF had a notch up because they work with Tiles. However, JSF has reportedly had scalability issues. Furthermore, it's the most-complained about framework out there. One attendee noted how she was impressed with the low number of complaints about WebWork.

WebWork doesn't integrate with Tiles (but probably will soon) and they were concerned about SiteMesh performance with large pages (1MB + of text). While I believe SiteMesh can do almost everything that Tiles can do, I also agree that Tiles is a good technology. Furthermore, the "advanced features" of SiteMesh to be largely undocumented, which can be a barrier for adopting it as a "development standard".

Spring MVC was dinged because it doesn't have built-in Ajax support like WebWork and Tapestry (via Tacos). However, it's support for Tiles might just make it the one they choose - especially since they plan on using Spring in the middle-tier/backend. While they loved the idea of Tapestry, they didn't think they could afford the learning curve and I don't know enough about the @Border component to verify if it has all of Tile's functionality.

One interesting thing that came up was the list of high-volume sites using these various web frameworks. Tapestry seems to come out on top when you look at the list of well-known sites. However, I'm sure there are plenty I don't know about. If you know of high-volume sites using any of these five frameworks, please let me know. I'm looking for major sites with millions of hits per day. Here's my current list (extra points for fancy templating with SiteMesh/Tiles + Ajax widgets):

  • Struts: None that I know of off the top of my head, but I'm sure there are plenty.
  • Spring MVC: None that I know of.
  • WebWork: JavaBlogs (don't know if this exactly qualifies as high-volume, there aren't that many Java developers). WebWork also has a few products based on it (i.e. Jive, JIRA, Confluence), but these companies also employ WebWork committers.
  • JSF: None that I know of.
  • Tapestry: NHL.com, TheServerSide.com (similar comments to JavaBlogs) and Zillow.com.

Thanks!

Related: How To use Tiles like SiteMesh and SourceLab's Web application technologies comparison (with performance numbers!).

Update: FWIW, I figured out How to use Tiles with WebWork and wrote a short howto for doing dependency injection with SiteMesh.

Posted in Java at Feb 15 2006, 11:55:57 AM MST 30 Comments
Comments:

Here are some struts examples.... http://wiki.apache.org/struts/PoweredBy

Posted by Jeff Sheets on February 15, 2006 at 01:17 PM MST #

Matt, how does WebWork have trouble working with Tiles? I used them together at Spoke without any problems, but I didn't do a lot with Tiles.

Posted by Patrick Lightbody on February 15, 2006 at 01:31 PM MST #

www.MensHealth.com which gets upward of 3,000,000 page views a day uses both Struts and Tiles.

Posted by Bob Hardner on February 15, 2006 at 01:52 PM MST #

How about Google? Is that high traffic? Google uses WebWork in several apps, at least 2 that I know of are public. See the speakers list for TSSS. Bob Lee is doing a case study on using WebWork. Bob works at... you guessed it... Google. Oh, and with Jive, Jira, Confluence, etc. you can count a lot of companies as using WebWork :-)

Posted by Jason Carreira on February 15, 2006 at 02:23 PM MST #

Patrick: the Tiles tag library will work, because it's essentially JSPs loading other JSPs at that point. Creating a tiles-config.xml file is a much better solution IMO - then you don't need to create JSP-loading JSPs. ;-)

I tried to get WebWork + Tiles working (using a nightly build), but no dice. The TilesFilter doesn't seem to load the definitions, so I tried using both the TilesServlet and the TilesFilter. TilesFilter is mapped to *.tile and all my view names in xwork.xml map to <em>viewname</em>.tile. I'm guessing the problem is WebWork communicating the name of the tiles definition to the filter.

Posted by Matt Raible on February 15, 2006 at 02:34 PM MST #

www.businesslink.gov.uk is dynamic content managed website based on Struts & tiles. It receives approximately 300,000 page views a day.

Posted by Matt Lewis on February 15, 2006 at 04:28 PM MST #

All the gap / banana republic / old navy sites look to be powered by struts: http://www.gap.com/browse/home.do http://www.bananarepublic.com/browse/home.do http://www.oldnavy.com/browse/home.do

Posted by AJ on February 15, 2006 at 06:57 PM MST #

You also want to look at the number of present and future developers and talent pool available on the market that will develop, maintain and improve on the site. Struts and Tiles is the most used and proven technolofy so far. Not to dismiss others but this is just a point of view.

Posted by CB on February 15, 2006 at 07:43 PM MST #

Just because a site has 'do' in the URL doesn't mean it's Struts-powered. I used to use Struts and got used to that convention and continue to use it now even in projects that use other frameworks, like Spring MVC.

Posted by Dan on February 15, 2006 at 07:58 PM MST #

We've got about half of http://www.greatschools.net running on SpringMVC/Hibernate/Tomcat and don't let the modperl URL's fool you, we had to keep those because they had high search rank but many now modrewrite back to java pages. On an average weekday we do around 900k page views (not including crawlers which makeup another 200k page views per day). I'm not a big fan of using the term "hits per day" because it's a little ambigious. We opted for Spring MVC because we were going to use it heavily for the rest of the insfrastructure and we found the MVC layer easy to learn and intuitive to use. I do hope they get better AJAX support but in general we've been really happy with the decision and it's nice that configuring the MVC and IoC layers are almost identical.

Posted by Todd Huss on February 15, 2006 at 08:24 PM MST #

FWIW, I figured out how to get Tiles to work with WebWork.

Posted by Matt Raible on February 16, 2006 at 02:12 AM MST #

www.premierleague.com uses Spring MVC, and regularly gets over a million page views daily.

Posted by Flan on February 16, 2006 at 05:04 AM MST #

I only really know Spring MVC and Struts well, but as you have already stated you will be using persisten POJO's I think that could work really well with the whole spring command object thing. Plus if you using spring on the backend it all integrated really nicely and makes one big happy spring family :)

Posted by Richard on February 16, 2006 at 07:54 AM MST #

Throwing the JSF hat in-- the perf charts you linked to seem to show that JSF performs quite well. I really wish I could find the slides for J1 2005's "Where's the bottleneck?" BOF which basically stated that there isn't any within MVC frameworks in a comparative analysis. The variation between Struts and JSF (for example) was only a 6% degredation. While one could slam that difference, it's something easily solved with more hardware-- if necessary. My point is that much of the performance complaints came from early adopters circ. 1.0. If anything, JSF scales UI requirements too well, easily allowing the developer to coordinate relatively complex things without thinking of penalty. I'm using webwork on a separate project right now and while the overhead is much smaller, I find myself battling to coordinate page state between multiple sorts, filters, form data, workflows, etc-- that are more easily maintained w/ component frameworks. Finally, the fact that Tapestry is also a component framework that has stateful concerns (much larger than webwork or struts) and uses reflection *and* is used on big name sites, who is anyone to say that JSF couldn't be used in the same application?

Posted by Jacob on February 16, 2006 at 08:31 AM MST #

Well, we use WebWork extensively for the portlets in our portal/CMS product, and we've got about 140 customers these days. We have some nice high-profile sites (that I won't name) that get around 5 mil. hits/week, and 16 mil. hits / day during peaks. Our portal product, which is based on Tomcat+WebWork, beat the performance record of their old solution which was based on Apache+static DreamWeaver content.

Posted by Rickard on February 16, 2006 at 08:57 AM MST #

I wonder what your "big client" is using for DAO layer? .V

Posted by Vic on February 16, 2006 at 09:30 AM MST #

hotels.com uses struts and tiles. There were some slight performance issues with deeply nested tiles that were solved by not nesting so deeply.

Posted by 144.9.8.21 on February 16, 2006 at 10:01 AM MST #

Jacob: there were a few other factors that eliminated JSF. I agree that scalability shouldn't be a concern anymore, but I still here that it is from folks. I made sure to tell my client that I hadn't deployed a JSF application into production, but that most of the scalability problems I'd heard about were from the blogosphere. Also, I remember it being mentioned in the Expert Group meeting at JavaOne last year.

The few other factors were good client-side validation and Ajax support. In other words, is it possible to configure client-side validation or work with Dojo w/o extra work. JSF doesn't have this, and if they do, it's not part of any open source implementations that I know of. I still find it surprising that this isn't part of the spec, but it probably will be soon with all the Ajax stuff going on. In addition, Ajax seems a bit harder with JSF because you have to talk to the component tree instead of merely manipulating the DOM. That being said, JSF is excellent at managing the state of different components and allowing small portions of your page to be independent, yet part of the whole page. This was definitely discussed and there were some big ASP.NET and JSF fans in the room. The consensus seemed to be that while JSF solved the problem, so did Ajax + request-based frameworks.

As far as WebWork *and* JSF - both could use a few more "non-involved" fans. Most of the big companies I know using WebWork have a WebWork committer on staff. And the JSF fans I know are committers (spec, ADF Faces, MyFaces) or they stand to directly profit from promoting it (books, training, etc.). I'm not saying this is a bad thing - companies that support committers are using open source wisely. It'd just be more believable if it had more <em>grass-roots</em> fans.

IMO, there's not a single framework that is best for *everything*. Instead, the needs for each application have to be evaluated, and then a small prototype should be done in 2-3 frameworks. If performance is a concern, these prototypes should be performance testing with tools like Grinder like there's no tomorrow.

Posted by Matt Raible on February 16, 2006 at 10:06 AM MST #

Vic - AFAIK, they're using JDBC with a bunch of MySQL Servers and memcached. They were curious to know if memcached could be the 2nd level cache for Hibernate. They were also *very* impressed with iBATIS and may use that to rewrite their data layer.

Posted by Matt Raible on February 16, 2006 at 10:08 AM MST #

Matt: Pertaining to AJAX and JSF, we just added a really cool feature to the spec for 'invokeOnComponent' which sets up the foundation for efficiently fetching any component by clientId from the component tree, without processing the whole thing. This is, in short, HUGE for JSF. You can now, agnostically, say you want to re-render the outputText in the 20th row of some table without reprocessing or rendering the entire tree. With a proper event coordination, you can implement some cool things with observers and commands on top of components. Again, the big benefit is that because everything is encapsulated within UIComponents, there's no need to split up additional resources/endpoint/special cases, it's drag'n'drop AJAX for the masses. .NET's Atlas doesn't hold a flame to what we're working on ;-)

Posted by Jacob on February 16, 2006 at 10:20 AM MST #

As for tapestry powered websites, there is this small list http://wiki.apache.org/jakarta-tapestry/PoweredByTapestry .

I also think that http://www.shopping.com uses tapestry for a lot of their functionality and supposedly will be using it for all new functionality.

Believe that http://ebay.com also uses tapestry for some portions.

I have no idea what google is doing with tapestry, but they're hiring tapestry developers http://www.google.com.

I'm not sure which portion of the Border component you are referring to, but I know that the Shell component hasn't failed to provide all the functionality I need so far.

On a side note, I think the next release of tapestry - 4.1 - will provide a somewhat unique level of built-in AJAX integration not seen by myself in any java based web framework thus far. I'm currently still working on it but feel that if nothing else, what we're going to be able to do with AJAX in tapestry should make it fairly clear why it's such an outstanding concept.

Posted by Jesse Kuhnert on February 16, 2006 at 12:05 PM MST #

I believe http://blockbuster.com is powered by struts and they must have a pretty high traffic level.

Posted by Abdullah Jibaly on February 16, 2006 at 12:54 PM MST #

Thanks Matt on DAO answer. I asked becuase client's w/ 60 machines might want to consider the "view/UI layer" (in your case WW2) as disposable. Something that architecture could address. And no silver bullets there. Yes DAO, but ... then what, a binary SOA? ESB? yuck. .V

Posted by Vic on February 16, 2006 at 04:54 PM MST #

DCX uses Struts+Tiles for Jeep.com, Chrysler.com, Dodge.com, along with other DCX brand domains for much of application functionality with millions of pages views. No scale problems.

Posted by Edward Smithee on February 17, 2006 at 08:12 AM MST #

Struts ... Bank Of Montreal ... https://www.bmoinvestorline.com/ ... There are four servers each capable of 82 TPS (that's 328 TPS as a cluster). It can go higher with more hardware. In addition, it scales linearly and there is no memory leaks. The performance challenge is not in the web layer, its usually in the persistence layer.

Posted by George Franciscus on February 17, 2006 at 02:01 PM MST #

Matt, The one potential large scale JSF deployment that I know of (but have no statistic of) is exo portal (picocontainer, jsf) used by the military for its portal (google exo military portal). May Benjamin Mestrallet of exo can tell you.

Posted by td on February 18, 2006 at 12:12 PM MST #

IMO, there's not a single framework that is best for *everything*. Instead, the needs for each application have to be evaluated, and then a small prototype should be done in 2-3 frameworks.

Matt, short of building a small prototype in 2-3 frameworks, can you offer some rules of thumb for helping decide which framework might be most applicable to a certain application?

For example, do you see component-based frameworks and WebMVC action frameworks as being suitable for different classes of applications?

Thanks

Posted by Allen Halsey on February 22, 2006 at 09:35 PM MST #

Allen - I think each framework has a <em>sweet spot</em>. I hope to do some research into this in the next few weeks and will try to post my findings.

Posted by Matt Raible on February 22, 2006 at 10:07 PM MST #

Hi Matt/Jacob and others,

I did a Google search for our 'Where's the bottleneck...' presentation and ended up in the page.

So, answering Jacob's question ( ' I really wish I could find the slides for J1 2005's'), you can find the slides at one of my sites:

http://www.falcon.inf.br/java


Please notice that this site is a mess at the moment, as I'm playing around with Google tools. Once I feel comfortable to create a 'half-decent-ass' web site, I will migrate this stuff to http://felipeal.net

Regards,

-- Felipe

Posted by Felipe Leme on December 08, 2006 at 12:22 PM MST #

Little out of date but I'd like to throw one in the ring for JSF: zavvi.co.uk (New brand name for Virgin Megastores in the UK) uses JSF and I would expect it's built to pretty scalable...

Posted by Ben on April 01, 2008 at 05:20 AM MDT #

Post a Comment:
Comments are closed for this entry.