comparing jvm web frameworks - jfokus 2012

86
Photos by Trish McGinity - http://mcginityphoto.com Photos by Trish - http://mcginityphoto.com COMPARING JVM WEB FRAMEWORKS Matt Raible http://raibledesigns.com

Upload: matt-raible

Post on 10-May-2015

90.832 views

Category:

Technology


1 download

DESCRIPTION

Comparing JVM Web Frameworks Presentation from Jfokus Conference in Stockholm, Sweden. Compares many different JVM-based web frameworks, ranks them based on 20 different criteria and compares the Pros, Cons and other stats of the top 5. Read more about this presentation at: http://raibledesigns.com/rd/entry/comparing_web_frameworks_and_html5

TRANSCRIPT

Page 1: Comparing JVM Web Frameworks - Jfokus 2012

Photos by Trish McGinity - http://mcginityphoto.com Photos by Trish - http://mcginityphoto.com

COMPARING JVM WEB FRAMEWORKS

Matt Raiblehttp://raibledesigns.com

Page 2: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Introductions‣ Your experience with

web development?‣ Your experience with

Java EE development?‣ What do you want to get

from this session?‣ Experience with Grails,

GWT, Rails, Spring MVC, Wicket, Tapestry or Play?

2

Page 3: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Blogger on raibledesigns.com

Founder of AppFuse

Father, Skier, Cyclist

Web Framework Connoisseur

Who is Matt Raible?

Page 4: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ The Problem with Web Frameworks‣ The Candidates‣ Comparison Points‣ The Matrix‣ Conclusion‣ Q and A

Session Agenda

4

Page 5: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

The Problem

5

Page 6: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

The Real Problem

6

Page 7: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

The Real Problem

7

Page 8: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

The Real Problem

8

Page 9: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

How do you choose?

9

Page 10: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Eliminate, Don’t Include10

Page 11: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Page 12: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Page 13: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

... 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/2007http://markmail.org/thread/qfb5sekad33eobh2

Craig McClanahan on Rails

13

Page 14: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

James Gosling on JSF

http://www.youtube.com/watch?v=9ei-rbULWoA#t=47m

14

Page 15: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ Developer Productivity‣ Developer Perception‣ Learning Curve‣ Project Health‣ Developer Availability‣ Job Trends

15

2010: Comparison Points

Page 16: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

2010: Comparison Points

‣ Templating‣ Components‣ Ajax‣ Plugins or Add-Ons‣ Scalability‣ Testing Support

16

Page 17: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ i18n and l10n‣ Validation‣ Multi-language Support (Groovy / Scala)‣ Quality of Documentation/Tutorials‣ Books Published‣ REST Support (client and server)

17

2010: Comparison Points

Page 18: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ Mobile / iPhone Support‣ Degree of Risk

18

2010: Comparison Points

Page 19: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Comparison Matrix

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

19

Page 20: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Matrix Results

0

4.5

9

13.5

18Gr

ails

Sprin

gRa

ilsGW

TVa

adin

Wick

etTa

pestr

ySt

ruts

2St

ripes Play

Flex

JSF Lift

11.513.513.5141414.5151515.5

17171717.5

20

Page 21: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Matrix Results

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

21

Page 22: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Weighted Matrix

22

Page 23: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Weighted Results

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

23

Page 24: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Fighting for 5th

‣ Top at Devoxx 2010- GWT

- Rails

- Spring MVC

- Grails

- Wicket / Struts 2

24

Page 25: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Fighting for 5th

‣ Top at Rich Web Experience 2010- Grails

- GWT

- Rails

- Spring MVC

- Tapestry / Vaadin

25

Page 26: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Fighting for 5th

‣ Top at TheServerSide Java Symposium 2010- Grails

- GWT

- Rails

- Spring MVC

- Vaadin

26

Page 27: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Ratings Logic

‣ Developer Productivity‣ Developer Perception‣ Learning Curve‣ Project Health‣ Developer Availability‣ Job Trends

27

Page 28: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Ratings Logic

‣ Templating‣ Components‣ Ajax‣ Plugins or Add-Ons‣ Scalability‣ Testing Support

28

Page 29: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ i18n and l10n‣ Validation‣ Multi-language Support (Groovy / Scala)‣ Quality of Documentation/Tutorials‣ Books Published‣ REST Support (client and server)

29

Ratings Logic

Page 31: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 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.

31

David Pollack’s Lift Ratings

Page 32: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 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

32

Page 33: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 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

33

Page 34: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Peter Thomas’s Perfbench

‣ Peter’s Observations:- 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.

34

Page 36: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

World Wide Wait - Devoxx

36

Page 37: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

World Wide Wait - Devoxx

37

Page 38: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

World Wide Wait - Devoxx

38

Page 39: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

World Wide Wait - Devoxx

39

Page 40: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

World Wide Wait - Devoxx

40

HybridJava beats JSF, Wicket and Spring MVC by perfomance.

Page 41: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

HybridJava - Really?

41

Page 42: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pros and Cons

42

Page 43: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Grails

43

‣ 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

Page 44: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

GWT

44

‣ 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

Page 45: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ 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

Ruby on Rails

45

Page 46: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ 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!)

Spring MVC

46

Page 47: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

‣ Pros- Uses GWT API for developing view

- Vibrant Community and company backing

- Excellent Themes and Layouts support

‣ Cons- Large memory footprint, state stored in session

- Sketchy (?) because backed by a commercial organization

- Joonas keeps telling me my cons are wrong

Vaadin

47

Page 48: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Wicket

48

‣ 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

Page 49: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Tapestry

49

‣ Pros- Live Class Reloading

- Development emphasis on performance and scalability

- Excellent Exception Reporting

‣ Cons- No Jobs

- Prototype baked in for JS Library

- Annotations vs. Conventions

Page 50: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

50

Page 51: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

LOC in AppFuse Light

51

0

1250

2500

3750

5000

JavaScript XML CSS Java

JSF Spring Stripes Struts 2 Tapestry 5 Wicket

Page 52: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Jobs on Dice (World)

0

175

350

525

700

Sprin

gRa

ilsGWTGrai

lsW

icket

Tape

stry

Vaad

inJS

F52

Page 53: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

LinkedIn Skills (World)

0

10,000

20,000

30,000

40,000

Rails

Sprin

gGW

TGr

ails

Tape

stry

Wick

etVa

adin

JSF

53

Page 54: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

54

Page 55: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

55

Page 56: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

56

Page 57: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

57

Page 58: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

58

Page 59: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

59

Page 60: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

60

Page 61: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

61

Page 62: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Pretty Graphs

62

Page 63: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Mailing List Traffic

Wicket

GWT

Grails

Rails

Tapestry

Play

0 475 950 1425 1900

1451

1538

1604

1635

1753

1841

* Spring MVC and Vaadin use Forums, which don’t provide this data.63

Page 64: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Books on Amazon

Rails

Spring MVC

GWT

Grails

Wicket

Tapestry 5

Vaadin

0 75 150 225 300

64

Page 65: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

2011 Releases

0 4 8 12 16Grails

GWT

Rails

Spring MVCVaadin

TapestryWicket

As of August 24, 2011

65

Page 66: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

StackOverflow

0

12,500

25,000

37,500

50,000

GrailsRails

Vaadin

Tagged Questions (August 24, 2011)

66

Page 67: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

StackOverflow

0

2,500

5,000

7,500

10,000

Spring JSFGWT

GrailsWicket

Tagged Questions (August 24, 2011)

67

Page 68: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

StackOverflow

0

50000

100000

150000

200000

Java ScalaGroovy

ClojureJRuby

Tagged Questions (August 24, 2011)

68

Page 69: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

StackOverflow

0

1500

3000

4500

6000

ScalaGroovy

ClojureJRuby

Tagged Questions (August 24, 2011)

69

Page 70: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Source: ZeroTurnaround's Java EE Productivity Report 2010

Framework Popularity

70

Page 71: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

What we need is...

71

Page 72: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Innovators

72

Page 74: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Web Developers

74

Page 75: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Java Developers

75

“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/

Page 76: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

The Modern Web Developer

76

‣ ... embraces JavaScript‣ ... is learning mobile frameworks

- jQuery Mobile, Sencha Touch, PhoneGap or Native

‣ ... is using HTML5 and CSS3‣ ... is developing REST APIs with the stateless

framework that best supports their language‣ IE6 is dead, IE7 isn’t far behind...

Page 77: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

You have to decide...

77

Are you a web developer?

Page 78: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

You have to decide...

78

Or are you a services developer?

Page 82: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

There is no “best” framework

82

Just lots of awesome choices...

Page 83: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Don’t listen to me!

83

Page 84: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Choose your own!

‣ 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!‣ ... Or just pick one and get to work...

84

Page 86: Comparing JVM Web Frameworks - Jfokus 2012

© 2012 Raible Designs

Questions?

‣ Contact- http://raibledesigns.com

- @mraible

‣ Download- http://slideshare.net/mraible

86