Slide 1

Slide 1 text

Why do I recommend the Spring Framework to my customers ?

Slide 2

Slide 2 text

Michael Plöd Partner and Principal Architect at Senacor Technologies AG Author Java Magazin @bitboss http://speakerdeck.com/mploed

Slide 3

Slide 3 text

100% independent

Slide 4

Slide 4 text

2005 Java EE Developer Spring Developer

Slide 5

Slide 5 text

2012 Java EE Developer Spring Developer

Slide 6

Slide 6 text

Java EE vs Spring

Slide 7

Slide 7 text

Java EE with or without Spring !

Slide 8

Slide 8 text

You‘ll get your projects delivered with both stacks

Slide 9

Slide 9 text

I will discuss the topic on an architectural decision-maker level

Slide 10

Slide 10 text

Myths and Legends

Slide 11

Slide 11 text

Spring is an XML Hell

Slide 12

Slide 12 text

0lines of XML for a Spring based Web Application

Slide 13

Slide 13 text

Spring is complex

Slide 14

Slide 14 text

You don‘t need the force to use Spring!

Slide 15

Slide 15 text

Spring has too many dependencies and makes WAR Files huge

Slide 16

Slide 16 text

Is this your runtime environment?

Slide 17

Slide 17 text

Spring is proprietary and not portable

Slide 18

Slide 18 text

Who has ported a usual JEE enterprise application as a drop-in?

Slide 19

Slide 19 text

A holistic examination is important

Slide 20

Slide 20 text

Ops Road-Map Code

Slide 21

Slide 21 text

Operational Aspects

Slide 22

Slide 22 text

Infrastructure

Slide 23

Slide 23 text

Infrastructure App Server Servlet Container Operations Team

Slide 24

Slide 24 text

Update Volume App Server Servlet Container Server Runtime Libraries like CDI, Servlet, JPA, JSF, ... Eventually JVM A lot of planning and testing is required Integration in Monitoring ...

Slide 25

Slide 25 text

Project Libs

Slide 26

Slide 26 text

Project Libs Hibernate ... Spring Development Team

Slide 27

Slide 27 text

Update Volume Hibernate ... Spring Dedicated, only single Libraries Ad Hoc Reduced test effort

Slide 28

Slide 28 text

Roundtrips Hibernate ... Spring App Server Servlet Container 2-4 Months 2-3 Years

Slide 29

Slide 29 text

DEV OPS

Slide 30

Slide 30 text

DEV OPS vs ?

Slide 31

Slide 31 text

With Spring I achieve an increased flexibility by loosely coupling the infrastructure to the runtime

Slide 32

Slide 32 text

Coding

Slide 33

Slide 33 text

? Are Dependency Injection and Testing game changers

Slide 34

Slide 34 text

Free your mind: we are in 2012 and not in 2005 anymore

Slide 35

Slide 35 text

Dependency Injection and Testing are commodity

Slide 36

Slide 36 text

More important is the overall ecosystem

Slide 37

Slide 37 text

Spring builds upon Java EE Scheduling MVC REST JMX Testing Caching Profiles DI AOP TX JMS AOP JDBC ORM OXM Expression JSR-250 JSR-330 JTA JDBC 4.1 JPA 2.0 JSF 2.0 JSR-303 JMX 1.0

Slide 38

Slide 38 text

WebServices AMQP Roo Security OAuth Data JPA MongoDB Neo4j GemFire HBase Redis JDBC Splunk Querydsl HDFS MapReduce Hive Pig Cascading SI/Batch Social Twitter LinkedIn Facebook WebFlow Scheduling MVC REST JMX Testing Caching Profiles DI AOP TX JMS AOP JDBC ORM OXM Expression Batch Integration Mobile

Slide 39

Slide 39 text

Spring Data by example Data JPA MongoDB Neo4j GemFire HBase Redis JDBC Splunk Querydsl HDFS MapReduce Hive Pig Cascading SI/Batch

Slide 40

Slide 40 text

JPA 2 Query ... public class PersonDAO ... { private EntityManager em; public List findByFirstname(String firstname) { Query q = em.createQuery(“from Person p where p.firstname = :name “) .setParameter(“name“, firstname) return q.getResultList(); } }

Slide 41

Slide 41 text

JPA 2 Query ... public class PersonDAO ... { private EntityManager em; public List findByFirstname(String firstname) { Query q = em.createQuery(“from Person p where p.firstname = :name “) .setParameter(“name“, firstname) return q.getResultList(); } } You end up writing many simple queries

Slide 42

Slide 42 text

Spring Data @Repository public interface PersonRepository extends JpaRepository { List findByFirstname(String firstname); }

Slide 43

Slide 43 text

Spring Data with QueryDSL @Repository public interface PersonRepository extends JpaRepository, QueryDslPredicateExecutor { List findByFirstname(String firstname); } QPerson P = QPerson.person; BooleanExpression hasBirthday = p.birthday.eq(...); BooleanExpression livesInLinz = p.adress.city.eq("Linz"); Person result = personRepository.findAll(hasBirthday.and(livesInLinz));

Slide 44

Slide 44 text

Spring Data also adresses NoSQL, Big Data and Data Grids Data JPA MongoDB Neo4j GemFire HBase Redis JDBC Splunk Querydsl HDFS MapReduce Hive Pig Cascading SI/Batch

Slide 45

Slide 45 text

Where are the Java EE Answers to NoSQL, Mobile, Social, ...?

Slide 46

Slide 46 text

Keep in mind App Server Servlet Container Server Runtime Libraries like CDI, Servlet, JPA, JSF, ... Eventuell JVM A lot of planning and testing is required ! Ususal Roundtrip is 2-3 years !

Slide 47

Slide 47 text

Spring offers a consistent programming model and many helpful abstractions and utilities besides the basics

Slide 48

Slide 48 text

Road-Maps

Slide 49

Slide 49 text

Java EE 6 12 / 2009 Mid 2011 12 / 2010 01 / 2012 02 / 2012 12 / 2009 Final Spec Release (GlassFish, no support) 12 / 2010 JBoss 6 (Web Profile, no support) Mid 2011 WebSphere 8 01 / 2012 WebLogic 12c 02 / 2012 JBoss 7.1

Slide 50

Slide 50 text

!The Java EE venors took 1,5 years for the first fully professionally supported container

Slide 51

Slide 51 text

Java EE 7: 3,5 years later 12 / 2009 Final Spec Release JEE 6 Q2 / 2013 Final Spec Release JEE 7

Slide 52

Slide 52 text

News around Java EE 7 Cloud Plattform will be delayed to Java EE 8 Social API is on a halt JCache won‘t make it in Java EE 7

Slide 53

Slide 53 text

What is left?

Slide 54

Slide 54 text

JAX-WS 2.0 CDI 1.1 JMS 2.0 after 11 years JPA 2.1 Servlet 3.1 JSF 2.2 .... Java EE 7

Slide 55

Slide 55 text

12 / 2009 Spring 3.0 12 / 2011 Spring 3.1 12 / 2012 Spring 3.2 Spring since 2009 12 / 2009 12 / 2011 End 2012 Full professional support Available on all containers right away

Slide 56

Slide 56 text

Some math Java EE API Release 12 / 2009 0 months Server Mid 2011 18 months Available in organisations Mid 2013 18 + 24 months API is available in production API is available in production 42 months 3,5 years

Slide 57

Slide 57 text

The same math Spring 3.0 API Release 12 / 2009 0 months Available in organisations 3 / 2010 3 months API is available in production API is available in production 3 months

Slide 58

Slide 58 text

Spring offers an innovative and reliable Road-Map with immediate availability and support

Slide 59

Slide 59 text

Ops Road-Map Code

Slide 60

Slide 60 text

Thank you! Photos / Graphics (c) Michael Plöd / Senacor Technologies AG Exceptions: Photos on Slides 2, 9 (c) Matthias Heyde; Photo on Slide 34 is licensed from istockphoto Pointy Font licensed from Bitfoundry Senacor is hiring Software Developers and -Architects [email protected] @bitboss http://www.senacor.com