COMPARING JVM WEB FRAMEWORKS

Matt Raible
http://raibledesigns.com
@mraible

Photos by Trish McGinity

© 2014 Raible Designs
Who is Matt Raible?

Father, Skier, Cyclist

Web Framework Connoisseur
Founder of AppFuse
Bus Lover

Blogger on raibledesigns.com
© 2014 Raible Designs
Session Agenda
‣

History of JVM Web Frameworks

‣

The Paradox of Choice

‣

Methods and Metrics

‣

Conclusion

‣

Q and A

© 2014 Raible Designs

3
History of Web Frameworks

© 2014 Raible Designs

4
History of Web Frameworks

© 2014 Raible Designs

5
History of Web Frameworks

© 2014 Raible Designs

6
Comparing Web Frameworks

© 2014 Raible Designs

7
History of Web Frameworks

© 2014 Raible Designs

8
History of Web Frameworks

© 2014 Raible Designs

9
2007

© 2014 Raible Designs

10
History of Web Frameworks

© 2014 Raible Designs

11
© 2014 Raible Designs
Today

© 2014 Raible Designs

13
Too many web frameworks?

© 2014 Raible Designs

14
Remember SOFEA?

© 2014 Raible Designs
SOFEA became a Reality

© 2014 Raible Designs
SOFEA Performance Issues

© 2014 Raible Designs

17
traditional web frameworks are still relevant

© 2014 Raible Designs

18
The Paradox of Choice

© 2014 Raible Designs

19
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

© 2014 Raible Designs

20
Maximizer vs. Satisficer
‣

maximizer - tries to make best possible choice

‣

satisficer - tries to find first suitable choice

(Photo: Tori Cat at Flickr)
© 2014 Raible Designs

21
How do you choose?

© 2014 Raible Designs

22
The Real Problem

© 2014 Raible Designs

23
The Real Problem

© 2014 Raible Designs

24
The Real Problem

© 2014 Raible Designs

25
© 2014 Raible Designs
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 6

-

Community / Support

-

HTML5

-

REST

-

Mobile

-

Performance

-

Page Speed
© 2014 Raible Designs

27
Predetermined Constraints
‣

Language

‣

Platform

‣

Application Type

© 2014 Raible Designs

28
Choose the JVM

© 2014 Raible Designs

29
Get Fast Hardware

© 2014 Raible Designs

30
IntelliJ

© 2014 Raible Designs

31
Goals
‣

Pure Web Frameworks

‣

Full Stack Frameworks

‣

SOFEA Frameworks

-

API Frameworks

-

JavaScript MVC Frameworks

© 2014 Raible Designs

32
Full Stack Frameworks

© 2014 Raible Designs

33
API Frameworks

© 2014 Raible Designs

34
JavaScript MVC Frameworks

© 2014 Raible Designs

35
JavaScript MVC Frameworks

© 2014 Raible Designs

36
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

© 2014 Raible Designs

37
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

© 2014 Raible Designs

38
Comparison Matrix

http://bit.ly/jvm-frameworks-matrix
© 2014 Raible Designs

39
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

© 2014 Raible Designs

Lift

Fle
x

F
JS

ipe
s
Str

y
Pla

2
uts
Str

et
Wi
ck

y
est
r
Tap

in
Va
ad

T
GW

ils
Ra

rin
g
Sp

Gr

ails

0

40
Matrix Results
‣

Grails (17.5)

‣

GWT (17)

‣

Ruby on Rails (17)

‣

Spring MVC (17)

‣

Vaadin and Tapestry (15.5)

‣

Wicket (15)

© 2014 Raible Designs

41
Weighted Matrix

© 2014 Raible Designs

42
Weighted Results
‣

Grails (90)

‣

Play (87.5)

‣

Spring MVC (85)

‣

Ruby on Rails (82.5)

‣

Vaadin (82.5)

‣

GWT (80)

© 2014 Raible Designs

43
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
© 2014 Raible Designs

44
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

© 2014 Raible Designs

45
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

© 2014 Raible Designs

46
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.

© 2014 Raible Designs

47
World Wide Wait - Devoxx

http://www.parleys.com/d/2942
© 2014 Raible Designs

48
World Wide Wait - Devoxx

© 2014 Raible Designs

49
World Wide Wait - Devoxx

© 2014 Raible Designs

50
World Wide Wait - Devoxx

© 2014 Raible Designs

51
World Wide Wait - Devoxx

© 2014 Raible Designs

52
InfoQ’s Top 20

© 2014 Raible Designs

53
devrates.com - by rating

© 2014 Raible Designs

54
devrates.com - popular

© 2014 Raible Designs

55
developer productivity report

© 2014 Raible Designs

56
web frameworks comparison
‣

Rapid Prototyping: Grails and Play

‣

Framework Complexity: Vaadin, GWT and Struts

‣

Ease of Use: Grails and Vaadin

‣

Documentation & Community: Grails and Vaadin

‣

Throughput/Scalability: Play

‣

UX, Look and Feel: Vaadin and GWT

‣

http://bit.ly/1eP5Jgq
© 2014 Raible Designs

57
decision makers guide
“If you are going to choose one framework to rule them all, then we
recommend Vaadin, Grails or Play as our top 3 choices, but if you
want to synergize (ooh, 90s buzz word!) the benefits of multiple
frameworks, then Spring plus nearly any other framework we
covered (especially GWT, which saw the greatest gains) will yield the
best results.” — http://bit.ly/1emanaA

© 2014 Raible Designs

58
ThoughtWorks Technology Radar 2014

© 2014 Raible Designs

59
ThoughtWorks on JSF
“We continue to see teams run into trouble using JSF -- JavaServer
Faces -- and are recommending you avoid this technology.”
“We think JSF is flawed because it tries to abstract away HTML,
CSS and HTTP, exactly the reverse of what modern web frameworks
do.”
“We are aware of the improvements in JSF 2.0, but think the model
is fundamentally broken.”
http://www.thoughtworks.com/radar/#/languages-and-frameworks/683
© 2014 Raible Designs

60
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:

‣

Grails, PrimeFaces, Vaadin, Tapestry, Rails

RebelLabs: Vaadin, Play, Grails, Spring MVC

© 2014 Raible Designs

61
Raible’s Recommendations
‣

Full Stack: Choose by language (Ruby, Groovy, Java, or Scala)

‣

Pure Web Framework: Spring MVC, Struts 2, Tapestry, Wicket, or
Vaadin

‣

JavaScript MVC: Angular JS, Ember, or Backbone

‣

API Framework: Dropwizard or Spring Boot

© 2014 Raible Designs

62
The Problem with GWT

© 2014 Raible Designs

63
Comparison Statistics
‣

Elimination Criteria

-

At least 1 release in 2013

-

At least 1 book on Amazon

-

At least 10 jobs on dice.com

-

At least 250 questions on Stack Overflow

© 2014 Raible Designs

64
Jobs on Dice.com
Full Stack Frameworks, February 2014
300

225

150

75

o
g

Ro

t
Lif

ay
Pl

JR

ub

yo

Sp
rin

n

Gr

Ra

ail

ils

s

0

© 2014 Raible Designs

65
Jobs on Dice.com
Pure Web Frameworks, February 2014
600

450

300

150

© 2014 Raible Designs

try
es
Ta
p

din
Va
a

es
ac
Pr
im
eF

ick
et
W

2
ts
ru
St

Sp
rin

g

M
VC

0

66
Jobs on Dice.com
JavaScript MVC Frameworks, February 2014
500

375

250

125

© 2014 Raible Designs

be
r
Em

lar
gu
An

Ba

ck

bo
n

e

0

67
Jobs on Dice.com
JavaScript MVC Frameworks, March 2013
300

225

150

75

© 2014 Raible Designs

be
r
Em

lar
gu
An

Ba

ck

bo
n

e

0

68
Jobs on Dice.com
JVM API Frameworks, February 2014
600

450

300

150

© 2014 Raible Designs

rd
za
Dr
op
wi

x
rt.
ve

sy
Ea
ST
RE

CX
F
he
Ap
ac

Je

rse

y

0

69
LinkedIn Skills
Full Stack Frameworks, February 2014
20,000

15,000

10,000

5,000

Ra

t

JR

ub

yo

n

Lif

ils

o
Ro
g
Sp
rin

ay
Pl

Gr

ail

s

0

© 2014 Raible Designs

70
LinkedIn Skills
Pure Web Frameworks, February 2014
22,000

16,500

11,000

5,500

© 2014 Raible Designs

try
es
Ta
p

din
Va
a

ick
et
W

2
ts
ru
St

es
ac
Pr
im
eF

Sp
rin

g

M
VC

0

71
LinkedIn Skills
JavaScript MVC Frameworks, February 2014
30,000

22,500

15,000

7,500

© 2014 Raible Designs

be
r
Em

lar
gu
An

Ba

ck

bo
n

e

0

72
LinkedIn Skills
JVM API Frameworks, February 2014
50,000

37,500

25,000

12,500

© 2014 Raible Designs

x
rt.
ve

rd
za
Dr
op
wi

sy
Ea
ST
RE

CX
F
he
Ap
ac

Je

rse

y

0

73
Google Trends

© 2014 Raible Designs

74
Google Trends

© 2014 Raible Designs

75
Google Trends

© 2014 Raible Designs

76
Google Trends

© 2014 Raible Designs

77
Indeed Job Trends

© 2014 Raible Designs

78
Indeed Job Trends

© 2014 Raible Designs

79
Indeed Job Trends

© 2014 Raible Designs

80
Indeed Job Trends

© 2014 Raible Designs

81
Mailing List Traffic
January 2014

1152

AngularJS

794

Play

706

Grails

590
549

Jersey
Wicket

361
336

Lift
Apache CXF

238

Tapestry

135
Struts
107
Backbone.js 42
Dropwizard

0

300

600

900

1200

* Frameworks not listed here use Forums, which don’t provide this data.
© 2014 Raible Designs

82
StackOverflow
Tagged Questions (February 3, 2014)

16,000

12,000

8,000

4,000

0

Grails

Play

Lift
© 2014 Raible Designs

Spring Roo

JRuby on Rails
83
StackOverflow
Tagged Questions (February 3, 2014)

16,000

12,000

8,000

4,000

0

Spring MVC PrimeFaces

Struts 2
© 2014 Raible Designs

Wicket

Vaadin

Tapestry
84
StackOverflow
Tagged Questions (February 3, 2014)

24,000

18,000

12,000

6,000

0

Backbone.js

Angular JS
© 2014 Raible Designs

Ember.js
85
StackOverflow
Tagged Questions (February 3, 2014)

4,000

3,000

2,000

1,000

0

Jersey

Apache CXF

RESTEasy
© 2014 Raible Designs

Dropwizard

Spring Boot

vert.x
86
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/
© 2014 Raible Designs

87
Modern Principles

© 2014 Raible Designs

88
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
© 2014 Raible Designs

89
Developer Productivity

http://zeroturnaround.com/blog/
developer-productivity-report-part-1-developer-timesheet/

© 2014 Raible Designs

90
Developer Productivity

http://zeroturnaround.com/blog/
developer-productivity-report-part-3-developer-efficiency/

© 2014 Raible Designs

91
There is no “best” framework

Just lots of awesome choices...
© 2014 Raible Designs

92
Don’t listen to me!

© 2014 Raible Designs

93
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.

© 2014 Raible Designs

94
Questions?
Contact Me!

http://raibledesigns.com

@mraible


Presentations

http://slideshare.net/mraible


Code

http://github.com/mraible
© 2014 Raible Designs

Comparing JVM Web Frameworks - February 2014