Presentation Comparing JVM Web Frameworks
The rise of Java Web Frameworks has come and gone, yet many are still widely used today. This session looks at the top JVM web frameworks and compares their pros and cons.
Published on: 2010-11-29T09:34:58.000Z
Channel: Devoxx'10 (all)
Tags: rails tapestry wicket frameworks gwt struts struts2 grails jvm jsf
Speakers:
Matt Raible
Matt Raible has been building web applications for most of his adult life. He started tinkering with the web before Netscape 1.0 was even released. For the last 11 years, Matt has helped companies adopt open source technologies (Spring, Hibernate, Apache, Struts, Tapestry, Grails) and use them effectively. Matt has been a speaker at many conferences worldwide, including ApacheCon, JavaZone, Colorado Software Summit, No Fluff Just Stuff, and a host of others.
Matt is an author (Spring Live and Pro JSP), and an active "kick-ass technology" evangelist on http://raibledesigns.com. He is the founder of AppFuse, a project which allows you to get started quickly with Java frameworks, as well as a committer on the Apache Roller and Apache Struts projects.
For the last few years, Matt has served as the UI Architect for high-traffic web sites such as LinkedIn and Evite. He currently serves as the Chief Architect of Web Development at Time Warner Cable.
PDF: slides.pdf
Slides:
untitled
COMPARING JVM WEB FRAMEWORKS
COMPARING JVM WEB FRAMEWORKS
Matt Raible http://raibledesigns.com
Images by Stuck in Customs - http://www.flickr.com/photos/stuckincustoms
© 2010 Raible Designs
© 2010, Raible Designs
Introductions
Introductions
Your experience with web development? Your experience with Java EE development? What do you want to get from this session? Experience with Spring MVC, GWT, Rails, Grails, Wicket or Struts 2?
2
Blogger on raibledesigns.com
Blogger on raibledesigns.com
Father, Skier, Cyclist
Montana Native
Web Framework Connoisseur
Founder of AppFuse
Who is Matt Raible?
© 2010, Raible Designs
Session Agenda
Session Agenda
The Problem with Web Frameworks The Candidates Comparison Points The Matrix Conclusion Q and A
4
The Problem
The Problem
5
E L I M I N AT E , D O N ’ T I N C L U D E
E L I M I N AT E , D O N ’ T I N C L U D E
How do you choose?
How do you choose?
... while I'd *love* to see life made simpler for Java web developers, and a lot of the things happening in Struts2 are going that way -- it won't be me doing it.
... while I'd *love* to see life made simpler for Java web developers, and a lot of the things happening in Struts2 are going that way -- it won't be me doing it.
I've gone over to the dark side :-) and much prefer to develop in Rails -- for the conciseness mentioned above, but also because I don't ever have to do a "build" or "deploy" step during my development cycle any more. But you guys and gals need to be reminded that *this* is the kind of thing you are competing against if you expect to attract Rails developers ... or to avoid even more "previously Java web developer" defectors like me :-). -- Craig McClanahan, 10/23/2007
h%p://markmail.org/thread/q65sekad33eobh2
10
Choosing a Framework
Choosing a Framework
Choose a short list of frameworks to prototype with. Create an application prototype with each framework. Document findings and create a matrix with important criteria. Create presentation to summarize document. Deliver document, presentation and recommendation.
11
2007: 6 Important Factors
2007: 6 Important Factors
Request, Component or RIA Framework Ease of Development Project Community Project Future and Roadmap Maintenance Technical Features
12
Request, Component or RIA
Request, Component or RIA
Are you developing...
– ... a consumer facing site? – ... a desktop-like, application? – ... a media-rich site?
If the framework is built for state-fulness, should you use it in a stateless architecture?
13
Types of Applications
Types of Applications
High-traffic, internet facing, infinite scalability Intranet-based, behind the firewall, few users Products, to be maintained for 5-10 years Legacy Backend Others?
14
Do they matchup?
Do they matchup?
High-traffic, internet facing, infinite scalability – Request-based frameworks Intranet-based, behind the firewall, few users – Component-based frameworks Products, to be maintained for 5-10 years – Largest Community, Most Vendor Support Legacy Backend – Same Language as backend
16
Types of Frameworks
Types of Frameworks
Request Based Frameworks
– Struts 2, Spring MVC, Rails, Stripes
Component Based Frameworks
– JSF, Tapestry, GWT
Rich Internet Applications
– Flex
One Size Fits All
– Grails
15
2010: Now There’s 20
2010: Now There’s 20
1. Developer Productivity 2. Developer Perception 3. Learning Curve 4. Project Health 5. Developer Availability 6. Job Trends
17
2010: Comparison Points
2010: Comparison Points
7. Templating 8. Components 9. Ajax 10.Plugins or Add-Ons 11.Scalability 12.Testing Support
18
2010: Comparison Points
2010: Comparison Points
i18n and l10n Validation Multi-language Support (Groovy / Scala) Quality of Documentation/Tutorials Books Published REST Support (client and server)
19
2010: Comparison Points
2010: Comparison Points
Mobile / iPhone Support Degree of Risk
20
Comparison Matrix
Comparison Matrix
http://bit.ly/jvm-frameworks-matrix
Matrix Results
Matrix Results
Spring MVC Struts 2 JSF Rails Stripes Vaadin GWT Tapestry Lift Grails Flex Wicket Play
17 12.75 8.5 4.25 0 Rating
22
Comparison Matrix
Comparison Matrix
http://bit.ly/jvm-frameworks-matrix
Spring MVC
Spring MVC
Pros
– Easy Configuration with Annotations and Conventions – Integrates with many view options seamlessly: JSP/ JSTL, Tiles, FreeMarker, Excel, PDF, JSON – Excellent REST Support
Cons
– Instant reload not built-in, need JRebel or Spring Roo – No open development process, need to be SpringSource – Ajax requires 3rd-party library (can be a good thing!)
25
GWT
GWT
Pros Write Java => Produces Optimized JavaScript Easy to learn and develop with standard Java Tools Vibrant Community Cons You have to know Java Slow to compile, difficult to test More like a JSP Tag Library than a web framework
26
Ruby on Rails
Ruby on Rails
Pros Easy to learn and understand for Web Developers Lots and lots of documentation Passionate Community Cons Slightly less performant by default Dynamic language means more tests Development Tools and Debugging
27
Grails
Grails
Pros Easy dynamic language transition for Java Developers Groovy Plugins for all types of applications Cons Groovy learning targets Java Developers Stack traces are horrendous Knowledge of underlying frameworks not required, but helpful
28
Wicket
Wicket
Pros Great for Java Developers Tight binding between pages and views Active community - support from creators Cons No Jobs or Developers Stateful by default HTML Templates live next to Java code by default
29
Rails vs. Grails
Rails vs. Grails
http://grails.org/Grails+vs+Rails+Benchmark – Grails: 40 requests per second, Rails: 32
30
Language Performance
Language Performance
Time (ms) per iteration
600 400 200 0 Java C++ JRuby PythonGroovy PHP
h%p://blog.dhananjaynene.com/2008/07/performance-‐comparison-‐c-‐java-‐python-‐ruby-‐jython-‐jruby-‐ groovy/ 31
Jobs in 2010 (US)
Jobs in 2010 (US)
Spring MVC GWT Rails Grails Wicket
600 450 300 150 0 Dice
32
Developer Skills (US)
Developer Skills (US)
Spring MVC GWT Rails Grails Wicket
11,000 8,250 5,500 2,750 0 LinkedIn
33
Developer Skills (World)
Developer Skills (World)
Spring MVC GWT Rails Grails Wicket
11,000 8,250 5,500 2,750 0 LinkedIn
34
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Pretty Graphs
Mailing List Traffic
Mailing List Traffic
Rails Grails GWT Play Wicket
September 2010
0
1000
2000
3000
4000
* Spring MVC uses Forums, which don’t provide this data.
Books on Amazon
Books on Amazon
Spring MVC Rails GWT Grails Wicket
October 2010
0
50
100
150
200
2010 Releases
2010 Releases
As of October 28, 2010
0 Spring MVC GWT Rails Grails Wicket 4 8 12
StackOverflow
StackOverflow
Tagged Questions (October 26, 2010)
30,000
22,500 15,000 7,500 Spring MVC Grails Rails 0
StackOverflow
StackOverflow
Tagged Questions (October 26, 2010)
25,000
18,750 12,500 6,250 Spring GWT 0 Wicket Rails
Grails
StackOverflow
StackOverflow
Tagged Questions (October 28, 2010)
80000
60000 40000 20000 Java Scala 0 Clojure Groovy
JRuby
StackOverflow
StackOverflow
Tagged Questions (October 28, 2010)
3000
2250 1500 750
Tomcat JBoss
Glassfish
0
WebSphere Jetty
StackOverflow
StackOverflow
Tagged Questions (October 28, 2010)
80000
60000 40000 20000 Java PHP 0 Python Ruby
.NET
Spring MVC
Spring MVC
http://www.springsource.org Apache 2.0 License Active Community @ http:// forum.springsource.org/forumdisplay.php?f=25 Recommended Books:
– Expert Spring MVC – Spring in Action – Pro Spring
49
Ruby on Rails
Ruby on Rails
http://rubyonrails.org MIT License Active Community @ http://rubyonrails.org/community Recommended Books:
– Agile Web Development with Rails – Rails for Java Developers
51
Google Web Toolkit
Google Web Toolkit
http://code.google.com/webtoolkit Apache 2.0 License Active Community @ http://groups.google.com/ group/Google-Web-Toolkit Recommended Books:
– GWT in Action – GWT in Practice – Google Web Toolkit Solutions
50
Grails
Grails
http://grails.org Apache 2.0 License Active Community @ http://grails.org/Community Recommended Books:
– Getting Started with Grails – Grails: A Quick-Start Guide – Programming Groovy
52
Apache Wicket
Apache Wicket
http://wicket.apache.org Apache 2.0 License Active Community @ http://wicket.apache.org/ help/email.html Recommended Books:
– Wicket in Action – Pro Wicket
53
CONCLUSION
CONCLUSION
What if there is no “best” web framework?
How to Choose?
How to Choose?
Prioritize a list of features that are important to your application. Pick 3-4 frameworks and do a 1-week spike with each, developing the same application. Document and rank each framework against your list of features. Calculate and choose!
55
Questions?
Questions?
Contact Information
http://raibledesigns.com http://twitter.com/mraible
Download Presentation
http://slideshare.net/mraible
56