play! framework: a revolution in the java...

40
Main sponsor Picasso Monet + Rembrandt Matejko + Canale6o Play! framework: a revolution in the Java world Nicolas Leroux What's new in Java EE 6 Sang Shin Programming Clojure Venkat Subramaniam Architecture and programming model for NOSQL web (Polish) Jarosław Pałka

Upload: others

Post on 06-Oct-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

Main sponsor

Picasso Monet  +  Rembrandt Matejko  +  Canale6o

Play! framework: a revolution in the Java world

Nicolas Leroux

What's new in Java EE 6Sang Shin

Programming ClojureVenkat Subramaniam

Architecture and programming model for

NOSQL web (Polish)Jarosław Pałka

Page 2: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

Nicolas Leroux@nicolasleroux

Text

About me

Page 3: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Play  is  a  web  framework

Page 4: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Founded  by  Guillaume  Bort  in  2007

+250K  download

+2000  members

70  e-­‐mails  per  day  

Trends++

+72  modules  and  growing

Page 5: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Play  is  made  by  web  developers  for  web  developers

Page 6: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Are  you  a  web  developer?

Page 7: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Part  of  our  daily  job

Page 8: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ You  need  laser  vision

Page 9: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

13:07:55,796 ERROR [[PersonServlet]] Servlet.service() for servlet PersonServlet threw exceptionjavax.ejb.EJBException: null; CausedByException is: null at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32)

“ ...  to  spot  the  error

Page 10: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Incredible  force  to  link  all  those  together

Page 11: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ SomeKmes  you  need  to  fight  hard  to  get  them  working  together

Page 12: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ ONen,  only  one  soluKon

Page 13: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Pray  that  all  works  out!

Page 14: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ You  need  incredible  speed  to  build  the  web  app  and  to  be  sure  it  looks  good

Page 15: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Typical  Java  web  app  in  java.  We  can  do  beSer...

Page 16: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ InternaKonalizaKon

Page 17: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Asynchronous  job

“ TDD

“ RouKng

“ Hot  deployment

“ Upload  file

“ ...

Page 18: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Being  superman  is  hard  work  for  liSle  recogniKon

Page 19: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ And  you  might  really  end  up  like  him

Page 20: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ We  should  not  need  to  be  superman  to  create  a  web  applicaKon

Page 21: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Play  focuses  on  creaKng  simplicity

Page 22: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Play  is  stateless...  like  the  web

Page 23: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

http://www.myapp.com/WarRootDirectory1/ServletsOnAMoFoPlane?sessionId=x81ndj38avngjLOLdxpanewq&action=NextPage&Mykel=Alvis&entityId=1299124&processName=UnladenSwallowComputation&role=peon&date=03%2F01%2F1999&flagSettings=010101110110&returnPage=%2FServletThatRing

HTTP Abuse

Page 24: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ h6p://www.myapp.com/items/356

You  can  read  it.

You  can  bookmark  it.

You  can  share  it.

URLs for perfectionists

Page 25: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ URLs  are  important.

Fully  realize  the  meaning  of  HTTP  as  a  protocol  not  just  a  transport  layer.

Take  care  of  side  effects  &  idempotence.

Hypermedia  as  the  engine  of  applicaKon  state  (no  server  side  navigaKon  state).

So you can be RESTful

Page 26: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

FastHTTPserver

Your codeHTTP

Map HTTP datato Java objects

Play isn’t servlet based

Page 27: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ h6p://www.myapp.com/items/{id}

public  staFc  show(String  id)  {  ...  }

public  staFc  show(Item  item)  {  ...  }

<form  acFon="/item/add"  method="POST">  Name:  <input  type="text"  name="item.name"  />Age:  <input  type="text"  name="item.age"  /></form>

HTTP parameter binding

Page 28: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ No  laser  vision

Page 29: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Good  documentaKon

Page 30: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ TDD

Page 31: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ No  incredible  power  is  needed.  Play  is  full  stack.

• Development & production server.• Incremental compiler.• MVC stack with a template system.• Persistence engine.• Complete test runner.• Powerful web services client.• Asynchronous task management.• Extension point through modules.

Page 32: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ More  in  the  Play  1.2  release

ConKnuaKons.

Dependency  management.

Websocket  support.

PaSern  matching.

New  asynchronous  features.

...

Page 33: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Any  changes  to  the  applicaKon  code  are  automaKcally  reloaded  when  you  hit  the  “reload”  buSon  of  your  browser.

Page 34: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ It  only  manages  the  server  side.  Use  any  client  technologies  you  want  (but  favor  HTML5).

“ Not  for  javascript  haters

Page 35: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Features  are  nice,  but  they  should  empower  not  distract.  

Page 36: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Start  simple.  Easy  to  learn

Page 37: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ LiSle  by  liSle  assemble  simple  pieces  together

Page 38: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ To  build  awesome  web  applicaKons

Page 39: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

“ Let’s  have  a  look

Page 40: Play! framework: a revolution in the Java world2011.33degree.org/pdf/NicolasLerouxPlayFramework.pdf · Play! framework: a revolution in the Java world Nicolas Leroux What's new in

Main sponsor

Picasso Monet  +  Rembrandt Matejko  +  Canale6o

Monitoring 10 Critical Code Quality Metrics with Sonar

Matthew McCullough

Practical Guide to using REST for SOA

Stefan Tilkov

Five years of change, no outages

Steve Freeman

So you think agile software development and building

houses have nothing in common...

Wojciech Seliga