Presentation Comparing JVM Web Frameworks

One question developers often ask is "What web framework should I use to build my application?" High-traffic sites (e.g. eBay, LinkedIn, Twitter, Overstock) have proven that the JVM is a great platform for web scaling. This session takes a look at the top web frameworks for the JVM and discusses various methodologies for choosing one. It describes different techniques (a ratings matrix, performance testing, surveys) for comparing and uses these to choose the top 5.

Speakers


PDF: slides.pdf

Slides

COMPARING JVM WEB

COMPARING JVM WEB FRAMEWORKS Matt Raible http://raibledesigns.com @mraible Photos by Trish McGinity © 2013 Raible Designs

Matt

Matt Raible © 2013 Raible Designs

Grew up in Montana

© 2013 Raible Designs

Matt

© 2013 Raible Designs

Matt

http://flickr.com/photos/leecullivan/122271605/ © 2013 Raible Designs

Matt

http://flickr.com/photos/crowleymr/2530170585/ © 2013 Raible Designs

Matt

http://www.flickr.com/photos/mraible/2644737051/ © 2013 Raible Designs

Matt

http://www.travelblog.org/Photos/1597321.html © 2013 Raible Designs

Bus project

© 2013 Raible Designs

Matt and Paris

© 2013 Raible Designs

Introductions

Introductions ‣ Are you currently developing web applications for the JVM? ‣ Have you written web apps with Servlets or JSF? ‣ Experience with Grails, GWT, Rails, Spring MVC, Wicket, Tapestry or Play? ‣ Does anyone hate a framework? Love a framework? © 2013 Raible Designs 11

Session Agenda

Session Agenda ‣ History of JVM Web Frameworks ‣ The Paradox of Choice ‣ Methods and Metrics ‣ Conclusion ‣ Q and A © 2013 Raible Designs 12

History of Web Frameworks

History of Web Frameworks © 2013 Raible Designs 13

History of Web Frameworks

History of Web Frameworks © 2013 Raible Designs 14

History of Web Frameworks

History of Web Frameworks © 2013 Raible Designs 15

First "Comparing Web Frameworks" talk

Comparing Web Frameworks © 2013 Raible Designs 16

History of Web Frameworks : 2004

History of Web Frameworks © 2013 Raible Designs 17

History of Web Frameworks

History of Web Frameworks © 2013 Raible Designs 18

2007 : Comparing Web Framework again

2007 © 2013 Raible Designs 19

History of Web Frameworks : 2010

History of Web Frameworks © 2013 Raible Designs 20

Devoxx for the first time and people are angry

© 2013 Raible Designs

Today : html5 and IPad

Today © 2013 Raible Designs 22

Too many web frameworks?

Too many web frameworks? © 2013 Raible Designs 23

Remember SOFEA?

Remember SOFEA? © 2013 Raible Designs

SOFEA became a Reality

SOFEA became a Reality © 2013 Raible Designs

SOFEA Performance Issues

SOFEA Performance Issues © 2013 Raible Designs 26

traditional web frameworks are still relevant

traditional web frameworks are still relevant © 2013 Raible Designs 27

The Paradox of Choice

The Paradox of Choice © 2013 Raible Designs 28

Good Decisions Involve

Good Decisions Involve 1. Figure out your goal or goals 2. Evaluate the importance of each goal 3. Array the options 4. Evaluate how likely each of the options is to meet your goals 5. Pick the winning option 6. Modify goals © 2013 Raible Designs 29

Maximizer vs. Satisficer

Maximizer vs. Satisficer ‣ maximizer - tries to make best possible choice ‣ satisficer - tries to find first suitable choice (Photo: Tori Cat at Flickr) © 2013 Raible Designs 30

How do you choose?

How do you choose? © 2013 Raible Designs 31

The Real Problem

The Real Problem © 2013 Raible Designs 34

The easiest thing is Don't choose Struts

© 2013 Raible Designs

How to Constrain Choices

How to Constrain Choices ‣ 2006: Choose based on the type of app you’re developing ‣ 2010: Choose based on 20 different criteria (the Matrix) ‣ 2013: Narrowed it to 5 - Community / Support - HTML5 - REST - Mobile - Performance - Page Speed © 2013 Raible Designs 36

Predetermined Constraints

Predetermined Constraints ‣ Language ‣ Platform ‣ Application Type © 2013 Raible Designs 37

Choose the JVM

Choose the JVM © 2013 Raible Designs 38

Get Fast Hardware

Get Fast Hardware © 2013 Raible Designs 39

IntelliJ

IntelliJ © 2013 Raible Designs 40

Goals

Goals ‣ Pure Web Frameworks ‣ Full Stack Frameworks ‣ SOFEA Frameworks - API Frameworks - JavaScript MVC Frameworks © 2013 Raible Designs 41

Full Stack Frameworks

Full Stack Frameworks © 2013 Raible Designs 42

API Frameworks

API Frameworks © 2013 Raible Designs 43

JavaScript MVC Frameworks

JavaScript MVC Frameworks © 2013 Raible Designs 44

JavaScript MVC Frameworks

JavaScript MVC Frameworks © 2013 Raible Designs 45

Pure JVM Web Frameworks

Pure JVM Web Frameworks ‣ Apache: Wicket, Struts, Sling, Tapestry, Click ‣ GWT: SmartGWT, GXT, Vaadin, Errai ‣ JSF: Mojarra (RI), MyFaces, Tomahawk, IceFaces, RichFaces, PrimeFaces ‣ Spring MVC, Stripes, RIFE, ZK http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java © 2013 Raible Designs 46

Frameworks I’ve Used

Frameworks I’ve Used ‣ Apache: Wicket, Struts, Sling, Tapestry, Click ‣ GWT: SmartGWT, GXT, Vaadin, Errai ‣ JSF: Mojarra, MyFaces, Tomahawk, IceFaces, RichFaces, PrimeFaces ‣ Spring MVC, Stripes, RIFE, ZK © 2013 Raible Designs 47

Comparison Matrix

Comparison Matrix http://bit.ly/jvm-frameworks-matrix © 2013 Raible Designs 48

Matrix Results

Matrix Results 18 17.5 17 17 17 13.5 15.5 15.5 15 14.5 14.5 14 14 13.5 11.5 9 4.5 © 2013 Raible Designs Lift x Fle F JS s ipe Str y Pla 2 uts Str ck et Wi est ry Tap in Va ad T GW Ra ils g rin Sp Gr ails 0 49

Matrix Results

Matrix Results ‣ Grails (17.5) ‣ GWT (17) ‣ Ruby on Rails (17) ‣ Spring MVC (17) ‣ Vaadin and Tapestry (15.5) ‣ Wicket (15) © 2013 Raible Designs 50

Weighted Matrix

Weighted Matrix © 2013 Raible Designs 51

Weighted Results

Weighted Results ‣ Grails (90) ‣ Play (87.5) ‣ Spring MVC (85) ‣ Ruby on Rails (82.5) ‣ Vaadin (82.5) ‣ GWT (80) © 2013 Raible Designs 52

David Pollack’s Lift Ratings

David Pollack’s Lift Ratings ‣ Developer Productivity: Lift gets a 11, Rails gets a 5, most Javabased frameworks get a 1 or less. ‣ Developer Perception: Every web framework gets a 1.  ‣ Learning Curve: Lift gets a 2. ‣ Job Trends, yep, it's zero. * Matt's scale is 0-1 and my ratings are on Matt's scale, except mine goes to 11. http://lift.la/my-take-on-matt-raibles-spreadsheet © 2013 Raible Designs 53

Peter Thomas’s Perfbench

Peter Thomas’s Perfbench ‣ Seam / JSF vs. Wicket Performance Comparison - January 2009: Seam 2.1.1 and Wicket 1.3.5 - Average page response time in milliseconds © 2013 Raible Designs 54

Peter Thomas’s Perfbench

Peter Thomas’s Perfbench ‣ On the Seam / JSF side, the 20 sessions each take up about 800 KB adding up to around 16 MB total. On the Wicket side the 20 sessions add up to around 1.5 MB. ‣ + Lots of banter between Peter and Seam developers @ http://bit.ly/3X50Gc © 2013 Raible Designs 55

Peter Thomas’s Perfbench

Peter Thomas’s Perfbench ‣ Added Tapestry 5 and Grails in September 2009: - Grails was far more productive than Tapestry 5. - Grails still has some ways to go in terms of performance. - Overall, Wicket is fastest, with Tapestry coming a close second. - Wicket takes up the least amount of heap. - Session usage of the Seam + JSF combination is significantly higher compared to the rest. © 2013 Raible Designs 56

World Wide Wait - Devoxx

World Wide Wait - Devoxx http://www.parleys.com/d/2942 © 2013 Raible Designs 57

World Wide Wait - Devoxx

World Wide Wait - Devoxx © 2013 Raible Designs 58

World Wide Wait - Devoxx

World Wide Wait - Devoxx © 2013 Raible Designs 59

World Wide Wait - Devoxx

World Wide Wait - Devoxx © 2013 Raible Designs 60

GWT is the cheapest to run

World Wide Wait - Devoxx © 2013 Raible Designs 61

InfoQ’s Top 20

InfoQ’s Top 20 © 2013 Raible Designs 62

devrates.com - by rating

devrates.com - by rating © 2013 Raible Designs 63

devrates.com - popular

devrates.com - popular © 2013 Raible Designs 64

Top JVM Frameworks

Top JVM Frameworks ‣ Raible Matrix: Grails, GWT, Rails, Spring MVC - Weighted: Grails, Play, Spring MVC, Rails, Vaadin ‣ Peter Thomas: Wicket ‣ InfoQ: Spring MVC, Play, Grails, JSF, Struts ‣ devrates.com: - PrimeFaces, Grails, Tapestry, Vaadin, Wicket © 2013 Raible Designs 65

Raible’s Recommendations

Raible’s Recommendations ‣ Full Stack: Choose by language (JRuby, Groovy, Java or Scala) ‣ Pure Web Framework: Spring MVC, Struts 2, JSF w/ PrimeFaces, Tapestry, Wicket or Vaadin ‣ JavaScript MVC: Ember, Angular JS, Backbone - API Framework: Jackson + ? © 2013 Raible Designs 66

The Problem with GWT

The Problem with GWT © 2013 Raible Designs 67

Comparison Statistics

Comparison Statistics ‣ Elimination Criteria - At least 1 book on Amazon - At least 10 jobs on dice.com ‣ At least 1 release in 2012 At least 250 questions on Stack Overflow Remove Seam (development halted) © 2013 Raible Designs 68

Jobs on Dice.com : Full Stack Frameworks

Jobs on Dice.com Full Stack Frameworks, March 2013 300 225 150 75 o ing Ro t Lif Pl ay JR u Sp r by o n Gr a Ra ils ils 0 © 2013 Raible Designs 69

Jobs on Dice.com : Pure Web Frameworks

Jobs on Dice.com Pure Web Frameworks, March 2013 600 450 300 150 © 2013 Raible Designs din Va a es ac eF Pr im try Ta pe s W ick et 2 ts St ru Sp r ing M VC 0 70

Jobs on Dice.com : JavaScript MVC Frameworks

Jobs on Dice.com JavaScript MVC Frameworks, March 2013 300 225 150 75 © 2013 Raible Designs r ula An g r Em be Ba ck bo ne 0 71

Jobs on Dice.com : JVM API Frameworks

Jobs on Dice.com JVM API Frameworks, March 2013 500 375 250 125 © 2013 Raible Designs x rt. ve Dr op wi za rd y as ST E RE eC ch Ap a Je r se y XF 0 72

LinkedIn Skills : Full Stack Frameworks

LinkedIn Skills Full Stack Frameworks, March 2013 15,000 11,250 7,500 3,750 © 2013 Raible Designs Ra t JR u by o n Lif ils o Ro ing Sp r Pl ay Gr a ils 0 73

LinkedIn Skills : Pure Web Frameworks

LinkedIn Skills Pure Web Frameworks, March 2013 15,000 11,250 7,500 3,750 © 2013 Raible Designs try Ta pe s din Va a es ac eF W ick et 2 ts St ru Pr im Sp r ing M VC 0 74

LinkedIn Skills : JavaScript MVC Frameworks

LinkedIn Skills JavaScript MVC Frameworks, March 2013 15,000 11,250 7,500 3,750 © 2013 Raible Designs r Em be r ula An g Ba ck bo ne 0 75

LinkedIn Skills : JVM API Frameworks

LinkedIn Skills JVM API Frameworks, March 2013 15,000 11,250 7,500 3,750 © 2013 Raible Designs rd Dr op wi za x rt. ve y as ST E RE eC ch Ap a Je r se y XF 0 76

Google Trends : Full stack frameworks

Google Trends © 2013 Raible Designs 77

Google Trends : Pure Web Frameworks

Google Trends © 2013 Raible Designs 78

Google Trends : JS frameworks

Google Trends © 2013 Raible Designs 79

Google Trends : JVM API Frameworks

Google Trends © 2013 Raible Designs 80

Indeed Job Trends : Full stack frameworks

Indeed Job Trends © 2013 Raible Designs 81

Indeed Job Trends : Pure web frameworks

Indeed Job Trends © 2013 Raible Designs 82

Indeed Job Trends : javascript frameworks

Indeed Job Trends © 2013 Raible Designs 83

Indeed Job Trends : JVM API Frameworks

Indeed Job Trends © 2013 Raible Designs 84

Mailing List Traffic

Mailing List Traffic February 2013 2340 AngularJS 1623 Play 1049 Lift 828 790 730 Grails Wicket Tapestry 432 Apache CXF 157 82 68 51 Dropwizard Struts Jersey Backbone.js 0 750 1500 2250 3000 * Frameworks not listed here use Forums, which don’t provide this data. © 2013 Raible Designs 85

StackOverflow : Full stack frameworks

StackOverflow Tagged Questions (March 25, 2013) 15,000 11,250 7,500 3,750 0 Grails Play © 2013 Raible Designs Lift JRuby on Rails 86

StackOverflow : Pure web frameworks

StackOverflow Tagged Questions (March 25, 2013) 6,000 4,500 3,000 1,500 0 Struts 2 PrimeFaces Wicket © 2013 Raible Designs Vaadin Tapestry 87

StackOverflow : JS frameworks

StackOverflow Tagged Questions (March 25, 2013) 8,000 6,000 4,000 2,000 0 Backbone.js Angular JS © 2013 Raible Designs Ember.js 88

StackOverflow : JVM API Frameworks

StackOverflow Tagged Questions (March 25, 2013) 3,000 2,250 1,500 750 0 Jersey Apache CXF RESTEasy © 2013 Raible Designs Dropwizard vert.x 89

Java remains a viable, growing language

Java Developers “Java remains – in spite of the fragmented programming language landscape – a viable, growing language.” http://redmonk.com/sogrady/2012/02/08/language-rankings-2-2012/ © 2013 Raible Designs 90

Modern Principles

Modern Principles © 2013 Raible Designs 91

The Modern JVM Web Developer

The Modern JVM Web Developer ‣ Starts with Fast Hardware ‣ Uses IntelliJ IDEA ‣ Leverages JavaScript, HTML5, and CSS3 ‣ Creates High Performance Web Sites ‣ For Mobile Devices ‣ In the Cloud ‣ And cares about Security © 2013 Raible Designs 92

Developer Productivity

Developer Productivity http://zeroturnaround.com/blog/ developer-productivity-report-part-1-developer-timesheet/ © 2013 Raible Designs 93

Developer Productivity

Developer Productivity http://zeroturnaround.com/blog/ developer-productivity-report-part-3-developer-efficiency/ © 2013 Raible Designs 94

There is no “best” framework

There is no “best” framework Just lots of awesome choices... © 2013 Raible Designs 95

Don’t listen to me!

Don’t listen to me! © 2013 Raible Designs 96

Choose your own!

Choose your own! ‣ Prioritize a list of goals that are important to your application. ‣ Pick 3-4 frameworks and do a spike with each, developing the same application. ‣ Document and rank each framework against your list of goals. ‣ Calculate and choose! ‣ Don’t be a Picker. © 2013 Raible Designs 97

Questions?

Questions? Contact Information http://raibledesigns.com @mraible Presentations http://slideshare.net/mraible © 2013 Raible Designs 98