Comparing JVM Web Frameworks - February 2014

Post on 08-Sep-2014

53 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

My Comparing JVM Web Frameworks talk as presented at Denver's Open Source User Group (@dosug) and vJUG (@virtualjug). Covers the history of web frameworks as well as various methods for choosing one. Video on YouTube at https://www.youtube.com/watch?v=ygW8fJVlDxQ.

Transcript

COMPARING JVM WEB FRAMEWORKS

Matt Raible http://raibledesigns.com @mraible

© 2013 Raible DesignsPhotos by Trish McGinity © 2014 Raible Designs

© 2014 Raible Designs

Blogger on raibledesigns.com

Founder of AppFuse

Father, Skier, Cyclist

Web Framework Connoisseur

Who is Matt Raible?

Bus Lover

© 2014 Raible Designs

‣ History of JVM Web Frameworks ‣ The Paradox of Choice ‣ Methods and Metrics ‣ Conclusion ‣ Q and A

Session Agenda

�3

© 2014 Raible Designs �4

History of Web Frameworks

© 2014 Raible Designs �5

History of Web Frameworks

© 2014 Raible Designs �6

History of Web Frameworks

© 2014 Raible Designs �7

Comparing Web Frameworks

© 2014 Raible Designs �8

History of Web Frameworks

© 2014 Raible Designs �9

History of Web Frameworks

© 2014 Raible Designs �11

History of Web Frameworks

© 2014 Raible Designs

© 2014 Raible Designs �13

Today

© 2014 Raible Designs

Too many web frameworks?

�14

© 2014 Raible Designs

Remember SOFEA?

© 2014 Raible Designs

SOFEA became a Reality

© 2014 Raible Designs �18

traditional web frameworks are still relevant

© 2014 Raible Designs �19

The Paradox of Choice

© 2014 Raible Designs

Good Decisions Involve

�20

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

Maximizer vs. Satisficer

�21

‣ maximizer - tries to make best possible choice ‣ satisficer - tries to find first suitable choice

(Photo: Tori Cat at Flickr)

© 2014 Raible Designs

How do you choose?

�22

© 2014 Raible Designs �23

The Real Problem

© 2014 Raible Designs �24

The Real Problem

© 2014 Raible Designs �25

The Real Problem

© 2014 Raible Designs

© 2014 Raible Designs

‣ 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�27

How to Constrain Choices

© 2014 Raible Designs

‣ Language ‣ Platform ‣ Application Type

�28

Predetermined Constraints

© 2014 Raible Designs

Choose the JVM

�29

© 2014 Raible Designs

Get Fast Hardware

�30

© 2014 Raible Designs

IntelliJ

�31

© 2014 Raible Designs

Goals

‣ Pure Web Frameworks ‣ Full Stack Frameworks ‣ SOFEA Frameworks

- API Frameworks

- JavaScript MVC Frameworks

�32

© 2014 Raible Designs

Full Stack Frameworks

�33

© 2014 Raible Designs

API Frameworks

�34

© 2014 Raible Designs

JavaScript MVC Frameworks

�35

© 2014 Raible Designs

JavaScript MVC Frameworks

�36

© 2014 Raible Designs

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

�37

http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java

© 2014 Raible Designs

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

�38

© 2014 Raible Designs

http://bit.ly/jvm-frameworks-matrix

�39

Comparison Matrix

© 2014 Raible Designs

Matrix Results

0

4.5

9

13.5

18

Grail

s

Sprin

g

Rails

GWT

Vaad

inTa

pestr

yW

icket

Stru

ts 2

Play

Strip

es JSF

Flex Lift

11.513.5141414.514.51515.515.5

17171717.5

�40

© 2014 Raible Designs

Matrix Results

‣ Grails (17.5) ‣ GWT (17) ‣ Ruby on Rails (17) ‣ Spring MVC (17) ‣ Vaadin and Tapestry (15.5) ‣ Wicket (15)

�41

© 2014 Raible Designs �42

Weighted Matrix

© 2014 Raible Designs

Weighted Results

‣ Grails (90) ‣ Play (87.5) ‣ Spring MVC (85) ‣ Ruby on Rails (82.5) ‣ Vaadin (82.5) ‣ GWT (80)

�43

© 2014 Raible Designs

‣ Developer Productivity: Lift gets a 11, Rails gets a 5, most Java-based 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.

http://lift.la/my-take-on-matt-raibles-spreadsheet

* Matt's scale is 0-1 and my ratings are on Matt's scale, except mine goes to 11.

�44

David Pollack’s Lift Ratings

© 2014 Raible Designs

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

�45

© 2014 Raible Designs

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

�46

© 2014 Raible Designs

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.

�47

© 2014 Raible Designs

World Wide Wait - Devoxx

�48

http://www.parleys.com/d/2942

© 2014 Raible Designs

World Wide Wait - Devoxx

�49

© 2014 Raible Designs

World Wide Wait - Devoxx

�50

© 2014 Raible Designs

World Wide Wait - Devoxx

�51

© 2014 Raible Designs

World Wide Wait - Devoxx

�52

© 2014 Raible Designs

InfoQ’s Top 20

�53

© 2014 Raible Designs

devrates.com - by rating

�54

© 2014 Raible Designs

devrates.com - popular

�55

© 2014 Raible Designs

developer productivity report

�56

© 2014 Raible Designs

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

�57

© 2014 Raible Designs

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

�58

© 2014 Raible Designs �59

ThoughtWorks Technology Radar 2014

© 2014 Raible Designs �60

ThoughtWorks on JSF

http://www.thoughtworks.com/radar/#/languages-and-frameworks/683

“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.”

© 2014 Raible Designs

Top JVM Frameworks

�61

‣ 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

Raible’s Recommendations

�62

‣ 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 �63

The Problem with GWT

© 2014 Raible Designs

Comparison Statistics

�64

‣ 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

Jobs on Dice.comFull Stack Frameworks, February 2014

0

75

150

225

300

Grails

JRub

y on R

ails Play Lift

Sprin

g Roo

�65

© 2014 Raible Designs

Jobs on Dice.comPure Web Frameworks, February 2014

0

150

300

450

600

Sprin

g MVC

Strut

s 2

Wick

et

Prim

eFac

es

Vaad

in

Tape

stry

�66

© 2014 Raible Designs

Jobs on Dice.comJavaScript MVC Frameworks, February 2014

0

125

250

375

500

Back

bone

Angu

lar

Embe

r

�67

© 2014 Raible Designs

Jobs on Dice.comJavaScript MVC Frameworks, March 2013

0

75

150

225

300

Back

bone

Angu

lar

Embe

r

�68

© 2014 Raible Designs

Jobs on Dice.comJVM API Frameworks, February 2014

0

150

300

450

600

Jerse

y

Apac

he C

XF

REST

Easy

vert.x

Dropwiza

rd

�69

© 2014 Raible Designs

LinkedIn SkillsFull Stack Frameworks, February 2014

0

5,000

10,000

15,000

20,000

Grails

Play

Sprin

g Roo

JRub

y on R

ails Lift

�70

© 2014 Raible Designs

LinkedIn SkillsPure Web Frameworks, February 2014

0

5,500

11,000

16,500

22,000

Sprin

g MVC

Prim

eFac

es

Strut

s 2

Wick

et

Vaad

in

Tape

stry

�71

© 2014 Raible Designs

LinkedIn SkillsJavaScript MVC Frameworks, February 2014

0

7,500

15,000

22,500

30,000

Back

bone

Angu

lar

Embe

r

�72

© 2014 Raible Designs

LinkedIn SkillsJVM API Frameworks, February 2014

0

12,500

25,000

37,500

50,000

Jerse

y

Apac

he C

XF

REST

Easy

Dropwiza

rd

vert.x

�73

© 2014 Raible Designs

Google Trends

�74

© 2014 Raible Designs

Google Trends

�75

© 2014 Raible Designs

Google Trends

�76

© 2014 Raible Designs

Google Trends

�77

© 2014 Raible Designs

Indeed Job Trends

�78

© 2014 Raible Designs

Indeed Job Trends

�79

© 2014 Raible Designs

Indeed Job Trends

�80

© 2014 Raible Designs

Indeed Job Trends

�81

© 2014 Raible Designs

January 2014

AngularJSPlay

GrailsJerseyWicket

LiftApache CXF

TapestryDropwizard

StrutsBackbone.js

0 300 600 900 1200

42107

135238

336361

549590

706794

1152

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

�82

Mailing List Traffic

© 2014 Raible Designs

StackOverflow

0

4,000

8,000

12,000

16,000

Grails Play Lift Spring Roo JRuby on Rails

Tagged Questions (February 3, 2014)

�83

© 2014 Raible Designs

StackOverflow

0

4,000

8,000

12,000

16,000

Spring MVC PrimeFaces Struts 2 Wicket Vaadin Tapestry

Tagged Questions (February 3, 2014)

�84

© 2014 Raible Designs

StackOverflow

0

6,000

12,000

18,000

24,000

Backbone.js Angular JS Ember.js

Tagged Questions (February 3, 2014)

�85

© 2014 Raible Designs

StackOverflow

0

1,000

2,000

3,000

4,000

Jersey Apache CXF RESTEasy Dropwizard Spring Boot vert.x

Tagged Questions (February 3, 2014)

�86

© 2014 Raible Designs

Java Developers

�87

“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

Modern Principles

�88

© 2014 Raible Designs

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

�89

© 2014 Raible Designs

Developer Productivity

�90

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

© 2014 Raible Designs

Developer Productivity

�91

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

© 2014 Raible Designs

There is no “best” framework

�92

Just lots of awesome choices...

© 2014 Raible Designs

Don’t listen to me!

�93

© 2014 Raible Designs

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.

�94

© 2014 Raible Designs

Questions?Contact Me!

http://raibledesigns.com

@mraible

Presentationshttp://slideshare.net/mraible

Codehttp://github.com/mraible

top related