Lessons Learned From Java EE’s Evolution

62
Java Enterprise Application Standards and Why the Industry Moved to Lightweight Open Source Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Lightweight Open Source Rod Johnson CEO, SpringSource

description

Rod Johnson talks about Java’s evolution, in particular J2EE, presenting the lessons to be learned from its failures, like committee-led standards and container-managed frameworks, preparing to avoid such mistakes in the future. Watch a video at http://www.bestechvideos.com/2009/12/06/lessons-learned-from-java-ee-s-evolution

Transcript of Lessons Learned From Java EE’s Evolution

Page 1: Lessons Learned From Java EE’s Evolution

Java Enterprise Application Standards and Why the Industry Moved to

Lightweight Open Source

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Lightweight Open Source

Rod Johnson

CEO, SpringSource

Page 2: Lessons Learned From Java EE’s Evolution

Topic

• Not a talk about particular technologies

• An attempt to explain how bad ideas can flourish (with examples), and how to avoid repeating the mistakes of history

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 2

avoid repeating the mistakes of history

Page 3: Lessons Learned From Java EE’s Evolution

A reference model

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 3

Page 4: Lessons Learned From Java EE’s Evolution

A Dangerous Myth

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 4

Page 5: Lessons Learned From Java EE’s Evolution

The long-term narrative

• Two major factors help us to understand the history of enterprise Java

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 5

–Developer empowerment

–Economic fluctuations

Page 6: Lessons Learned From Java EE’s Evolution

Java started out simple

• Java started off as a simple language

–C++ --

• Even today, Java is not particularly

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 6

• Even today, Java is not particularly complex

Page 7: Lessons Learned From Java EE’s Evolution

Where did it all go wrong?

• Excessive complexity was introduced along the way– “Enterprise” Java lost touch with its roots

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 7

Page 8: Lessons Learned From Java EE’s Evolution

The growth of the Complexity Industry

• The “E” word

– “Enterprise”

• Ex CORBA architects who wanted to have any shot at some of their fetishes

• Embrace by huge companies (software vendors

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 8

• Embrace by huge companies (software vendors and SIs) who helped to define platform

• Resume padding among developers and architects

• “No pain no gain” fallacy

• Economic exuberance

Page 9: Lessons Learned From Java EE’s Evolution

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 9

A BRIEF HISTORY OF J(2)EE

Page 10: Lessons Learned From Java EE’s Evolution

The Three ages of enterprise Java

• Before J2EE

• The glory days of J2EE

• The post Java EE era

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 10

Page 11: Lessons Learned From Java EE’s Evolution

Before J2EE

• Mid 1990s

– Java gradually moves to the server side

• Largely unregulated

• Many competing products in different areas

– NetDynamics

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 11

– NetDynamics

– TopLink

– Silverstream

– Persistence PowerTier

– Apple WebObjects

Page 12: Lessons Learned From Java EE’s Evolution

Before J2EE…

• Good and Bad– Innovation and choice of approaches

–Applications needed to use in-house frameworks, but many companies got

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 12

frameworks, but many companies got good results based on Servlet API

–Fragmented server-side market

–Real danger of vendor lock-in

–Many solutions very expensive• No impact from open source

Page 13: Lessons Learned From Java EE’s Evolution

The Glory Days of J2EE

• 1999-2003

– The JCP becomes dominant in the space

• TopLink and other “non-standard” technologies cannot compete with J2EE

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 13

technologies cannot compete with J2EE standards

– ORM versus EJB entity beans

– Velocity vs JSP

– WebObjects vs web tier

Page 14: Lessons Learned From Java EE’s Evolution

The Glory Days of J2EE

• Good and bad

– A market is created

– Vendor lock-in is reduced, but not eliminated

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 14

– Increasing thought control strangles innovation

– Flaws in the model take years to be resolved

Page 15: Lessons Learned From Java EE’s Evolution

The Glory Days of J2EE

• Enterprise Java gains a reputation for complexity

• Many projects fail due to flaws in the platform

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 15

platform

• Greatest offender is the programming model, based on EJB

Page 16: Lessons Learned From Java EE’s Evolution

The Glory Days of J2EE/aka The Dark Ages

• Some horrible technologies and fundamental flaws in the platform

– Idea that all business objects (EJBs) should be distributed

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 16

– Naïve ORM solution (CMP entity beans)

– Grossly excessive complexity across the platform

Page 17: Lessons Learned From Java EE’s Evolution

The decline of J2EE

• 2003-

• Move away from traditional application server towards lighter-weight

• Proportion of enterprise Java users using Tomcat

40

50

60

70

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 17

lighter-weight solutions such as Tomcat

– Tomcat now clear leader in enterprise Java deployments

0

10

20

30

40

WAS JBoss WLS Tomcat

Springframework.org

BZ Research

Page 18: Lessons Learned From Java EE’s Evolution

The Post J2EE Era

• JCP specifications now just one input

• More grass roots innovation

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 18

Page 19: Lessons Learned From Java EE’s Evolution

Major driver: The rise of open source

• Fewer and fewer organizations develop enterprise Java applications without using open source

– Those that do face increasing competitive

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 19

– Those that do face increasing competitive disadvantage

• Numerous open source projects help to shape the future

– Eclipse

– Spring

– AspectJ

Page 20: Lessons Learned From Java EE’s Evolution

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 20

SOME OF THE TRAPS THAT PRODUCED THE PROBLEMS OF “OLD J2EE”

Page 21: Lessons Learned From Java EE’s Evolution

Traps/ideas that created complexity

1. Design by committee is desirable

1. Everything has to be standardized

2. Tools can make excessive complexity acceptable

3. Lack of openness to other platforms, sources

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 21

3. Lack of openness to other platforms, sources of ideas

4. Developers are stupid and must be controlled

5. Complex solutions are better

6. “I need a solution that enables my enterprise SOA/XYZ strategy”

Page 22: Lessons Learned From Java EE’s Evolution

Myth: Design by committee can work

• You’ve heard of the Cathedral and Bazaar as sources of software

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 22

Page 23: Lessons Learned From Java EE’s Evolution

The Commissar

• Java has its own somewhat unique model

– The Commissar

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 23

• In this model, the politburo knows what’s best for the proletariat (you)

Page 24: Lessons Learned From Java EE’s Evolution

The Commissar Knows Best

• Essentially, design by committee

• JCP expert groups talk largely in private

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 24

largely in private

• Typically composed of software vendors

• Relatively slow pace of change, like Soviet 5 year plans

Page 25: Lessons Learned From Java EE’s Evolution

Why standards are needed

• Standards can create markets

• Standards can provide a base on which competing open source and commercial alternatives can flourish

– JTA

– Servlet API

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 25

– Servlet API

– JMS

• Standards can protect customers from lock in to a proprietary technology

• To ensure interoperability

– Web Services

– IIOP

Page 26: Lessons Learned From Java EE’s Evolution

How much standardization is too much?

• In the Java world we have an unhealthy obsession with standards

• Desire to standardize everything

• Failure to critically evaluate standard

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 26

• Failure to critically evaluate standard technologies

Page 27: Lessons Learned From Java EE’s Evolution

Where Standards Don’t Work

• Jim Waldo (Sun Distinguished Engineer)

– Kowtowing to the god of standards is, I believe, doing great damage to our industry, or craft, and our science. It turns technical discussions into political debates. It misunderstands the role that standards have played in the past. Worst of all, it is leading us

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 27

have played in the past. Worst of all, it is leading us down absurd technological paths in the quest to follow standards which have never been implemented and aren’t the right thing for the problems at hand.

Page 28: Lessons Learned From Java EE’s Evolution

Where standards don’t work

• CORBA history (1990s)

– Death by committee

– Attempts to innovate by committee (distributed persistent objects)

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 28

• When they’re too slow

• When they’re divorced from reality

– Ivory castle

• When they are about politics, not technology

Page 29: Lessons Learned From Java EE’s Evolution

Case study in failure

• CMP entity beans

• Grew out of CORBA

• No implementations when specification was released

• Designed by smart people with little

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 29

• Designed by smart people with little domain knowledge

• Ignored successful products like TopLink

• Inefficient, barely useable specifications

• Problems were available to anyone who wrote Hello World

Page 30: Lessons Learned From Java EE’s Evolution

The standards check list

1. Will the pace of change and innovation required by met in a standards process cycle

2. Do we benefit from competing implementations?

3. Does this affect wire protocols (in which standards are probably outside Java)

4. Is there an entrenched open source solution, in

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 30

4. Is there an entrenched open source solution, in which case competition may not occur?

5. Is the field mature and well understood

1. Has the proposal been tested in the market?

2. Do not want design by committee?

6. Is the standards committee representative of the users of the technology?

Page 31: Lessons Learned From Java EE’s Evolution

Does the standard exist to lock out newcomers?

• When standards become too complex, like J2EE, they effectively lock out new entrants and benefit existing franchisees, not consumers

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 31

Page 32: Lessons Learned From Java EE’s Evolution

Things need to become faster

• Competition and experimentation needs to occur rapidly

• Technology change and the increasing pace of business leaves 2-3 years

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 32

pace of business leaves 2-3 years committee-driven cycles looking less and less relevant

Page 33: Lessons Learned From Java EE’s Evolution

The standardization cycle

Breakdown of standards process

Breakdown of standards process

No standardsNo standards

Lack of innovationLack of innovation

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 33

StandardizationStandardization

Create coherent market

Create coherent market

Lock out new entrants /

Produce lowest common denominator

Lock out new entrants /

Produce lowest common denominator

Page 34: Lessons Learned From Java EE’s Evolution

The appropriate role of the JCP

• The JCP is unlikely to produce innovation but should focus on what it can succeed at

– Creating a market where innovators can

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 34

– Creating a market where innovators can compete above fundamental stanards

• Innovation by committee is a bad idea, and has traditionally produced poor results

Page 35: Lessons Learned From Java EE’s Evolution

Myth: Tools can conceal excessive complexity

• Belief inherent in early Java EE specifications that complexity didn’t matter as it would be hidden by tools

• CMP entity beans

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 35

• CMP entity beans

– Mammoth deployment descriptors

• JSF

Page 36: Lessons Learned From Java EE’s Evolution

The Microsoft delusion

• This was partly a response to Microsoft’s success with Visual Studio

• Failed because

– MSFT understands tools in a far deeper way

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 36

– MSFT understands tools in a far deeper way than anyone in the Java community until recently

– Fragmentation of IDE market meant that until the rise and rise of Eclipse there wasn’t enough critical mass to create a Visual Studio challenger

Page 37: Lessons Learned From Java EE’s Evolution

The appropriate role of tools

• I am not someone who works in emacsor vi (any more)

• I’m not suggesting that tools are bad

– …just that we shouldn’t use them to sweep

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 37

– …just that we shouldn’t use them to sweep complexity under the carpet, as it will still cost us in the end

Page 38: Lessons Learned From Java EE’s Evolution

Lack of openness to other ideas

• MSFT influence on tooling was an anomaly

• Java specifications have too often ignored prior art

– TopLink and real ORM (CMP)

– java.util.logging

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 38

– java.util.logging

– EJB 3.0

– Ongoing reinvention of AOP without any real domain experts involved

• May be improving, but has long been a challenge

Page 39: Lessons Learned From Java EE’s Evolution

Failed reinvention in the JCP

• History of failure when this has not happened

JCP technology Ignored existing technology

Negative consequences

Entity beans TopLink and all other ORM solutions

•Two complete failures (EJB 1.x and 2.x) •ORM in Java loses at least 6 years•Billions of dollars of wasted development effort from customers

Commons Log4J Added complexity of pointless abstraction

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 39

Commons Logging

Log4J Added complexity of pointless abstraction layers such as Commons Logging

EJB (DI) Spring, PicoContainer, Hivemind

Limited DI functionality in EJB 3 specification misses opportunity to match best practice

EJB3 (interception)

Spring, AOP Alliance, AspectJ, AspectWerkz

Lack of knowledge of AOP in the expert group produces fragile, clunky API missing central AOP concepts

JSR 277 (modularization)

OSGi •Ignoring input and experience from OSGi•May split JCP as many organizations are deeply committed to OSGi

Page 40: Lessons Learned From Java EE’s Evolution

Trap: The Myth of the Code Monkey

• Belief that developers are dumb

• Primary goal is to prevent them making decisions

• Sadly, far from unique to Java

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 40

• Sadly, far from unique to Java

Page 41: Lessons Learned From Java EE’s Evolution

Problems due to the Myth of the Code Monkey

• Belief that persists in the EJB specification that developers are incapable of using language-level concurrency features

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 41

• Aim of many old in-house frameworks to provide a straightjacket for developers

Page 42: Lessons Learned From Java EE’s Evolution

Primate Programming Inc.

• Humans and higher primates share approximately 97% of their DNA in common.

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 42

approximately 97% of their DNA in common. Recent research in primate programming suggests computing is a task that most higher primates can easily perform. Visual Basic 6.0™ was the preferred IDE for the majority of experiment primate subjects."

Page 43: Lessons Learned From Java EE’s Evolution

Primate Programming Inc.

• Great apes (hominids) do not have tails, while monkeys do. Research indicates that great

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 43

monkeys do. Research indicates that great apes are very productive in the areas of software maintenance and report writing, while most monkeys will struggle. Monkeys however are great at software testing. So the rule of thumb is, if you don’t have a tail, you can probably program.

Page 44: Lessons Learned From Java EE’s Evolution

Myth: Complexity is good for you

• Natural tendency to believe in the old adage, no pain no gain

• Leads to an Emperor’s New Clothes syndrome

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 44

syndrome

– EJB most obvious offender

• Causes people to accept the complexity resulting from the other factors

Page 45: Lessons Learned From Java EE’s Evolution

Myth: This needs to fit into our over-arching SOA/XYZ strategy

• A variant of the love of complexity

• Means that common sense is thrown out the window

• SOA is probably the most obvious case

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 45

• SOA is probably the most obvious case

– Complex term for what people already do

– Enables selling products

– Karl Marx, alienation

Page 46: Lessons Learned From Java EE’s Evolution

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 46

HOW DID THINGS BEGIN TO CHANGE?

Page 47: Lessons Learned From Java EE’s Evolution

It’s the economy, stupid

Money to spend gets spent

• Economic exuberance

• Who cares about efficiency?

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 47

Page 48: Lessons Learned From Java EE’s Evolution

Economic downturns tend to reduce complexity

• Complexity is an expensive luxury

• License cost of complex proprietary products is just one factor

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 48

products is just one factor

• Ongoing complexity throughout the software lifecycle is even more problematic

Page 49: Lessons Learned From Java EE’s Evolution

Hemline Theory

• American economist George Taylor (1926)

• “Hemline Index”

• Theory that lower

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 49

• Theory that lower hemlines mean a falling market

• Market confidence, availability of moneychanges peoples’ behaviour

Page 50: Lessons Learned From Java EE’s Evolution

A short history of enterprise Java complexity

20

25

30

Confidence/Complexity

Economic growth vs Complexity

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 50

0

5

10

15

97 98 99 0 1 2 3 4 5 6 7 8 9

Confidence/Complexity

Complexity

Economy

Page 51: Lessons Learned From Java EE’s Evolution

Developer empowerment: A key part of the solution

• We’ve seen more and more development empowerment

• Why?

– Because the previous failure was so severe

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 51

– Because the previous failure was so severe

• People got promoted for adopting open source

– Because things change quicker than in the past, and management need to rely on developers more

Page 52: Lessons Learned From Java EE’s Evolution

Developers have enormous power today

• We live in great times for developers

• Ability to make a difference in a deep way

– Much choice developers can make

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 52

– Much choice developers can make

• Compare with the mainframe days

– Open source allows participation

Page 53: Lessons Learned From Java EE’s Evolution

Innovation from the community has made decisive change

• Spring

• Hibernate

• Ruby on Rails

• Django

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 53

• Django

• Grails

Page 54: Lessons Learned From Java EE’s Evolution

Rise of agile ways of working

• Another developer-led initiative

• Helped to expose the flaws of the original J2EE programming model

– Untestable code

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 54

– Untestable code

– Slow test cycles

– Lack of immediate feedback

Page 55: Lessons Learned From Java EE’s Evolution

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 55

WHAT HAPPENS FROM HERE?

Page 56: Lessons Learned From Java EE’s Evolution

What happens from here?

• Unlikely we will go backwards

• Developer empowerment is not going to change

• Java productivity needs to improve

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 56

• Java productivity needs to improve further due to external challengers

• Complex portfolio solutions out of favor

– Push toward effective point solutions

• Likely to see the traditional application server fade away

Page 57: Lessons Learned From Java EE’s Evolution

Cloud: The coming tyrannnyof the developer

• Long-term trend is going to further strengthen power of developers at the expense of operations

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 57

Page 58: Lessons Learned From Java EE’s Evolution

Escaping the traps?

Yesterday’s Traps• Design by committee is a good

idea

• Everything has to be standardized

• Tools can make excessive complexity acceptable

Today• Innovation that gets adopted

comes largely from open source

• Solutions are simpler, even as tools are better

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 58

complexity acceptable

• Lack of openness to other platforms, sources of ideas

• Developers are stupid and must be controlled

• Complex solutions are better

• “I need a solution that enables my enterprise SOA/XYZ strategy”

tools are better

• Responsiveness to other platforms (Grails etc.)

• Successful frameworks treat developers with respect (Spring)

• Shift away from WebSphere & co to simpler solutions

• SOA buzzword is less hyped

Page 59: Lessons Learned From Java EE’s Evolution

Tomcat adoption shows a profound shift in the market

• By far the most popular application server today, in development and production

• Used by around 70% of organizations

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 59

• Used by around 70% of organizations developing Java web applications

• Represents a developer-driven switch away from complexity

Page 60: Lessons Learned From Java EE’s Evolution

Summary

• Java is in a far healthier state than for much of its history

• Developer empowerment is the dominant trend of the last few years

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 60

dominant trend of the last few years

• Present economic troubles have at least some positive results in technology

Page 61: Lessons Learned From Java EE’s Evolution

Call to action

• The key person who can make a difference is you

• Developers have brains and should think for themselves

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 61

for themselves

• Developers are highly capable of seeing through flawed solutions

– Should not accept the Emperor’s New Clothes again

Page 62: Lessons Learned From Java EE’s Evolution

Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 62

Q&A