SlideShare a Scribd company logo
1 of 98
Download to read offline
Play with Play!


                                       Anton Naumov
                             email: anton.naumow@gmail.com
                     linkedin: http://ua.linkedin.com/in/antonnaumov




Monday, May 21, 12
Who am I?

                     Java Engineer

                     11+ years in Java
                     development

                     Photographer

                     Sci-Fi addicted



Monday, May 21, 12
RIA Frameworks



                          ?
Monday, May 21, 12
RIA Frameworks


                     Ruby -> Rails


Monday, May 21, 12
RIA Frameworks


       Python -> Django


Monday, May 21, 12
RIA Frameworks


                     Scala -> Play!


Monday, May 21, 12
RIA Frameworks


                      PHP -> PHP


Monday, May 21, 12
RIA Frameworks


                     Java ->


Monday, May 21, 12
RIA Frameworks


                     Java -> ?


Monday, May 21, 12
RIA Frameworks


                     Java -> JSF?


Monday, May 21, 12
RIA Frameworks
                       JSF?


                     Java -> GWT?


Monday, May 21, 12
RIA Frameworks
                       JSF?       GWT?


                     Java -> Play!


Monday, May 21, 12
Play! Features




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box

                     Unit & Functional test infrastructure




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box

                     Unit & Functional test infrastructure

                     Dependency management




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box

                     Unit & Functional test infrastructure

                     Dependency management

                     Simple text and YAML configuration




Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box

                     Unit & Functional test infrastructure

                     Dependency management

                     Simple text and YAML configuration

                     Modules


Monday, May 21, 12
Play! Features
                     NO compiling, NO redeployment

                     MVC out of the box

                     Unit & Functional test infrastructure

                     Dependency management

                     Simple text and YAML configuration

                     Modules

                     Cloud hosting support
Monday, May 21, 12
Play! Anatomy




Monday, May 21, 12
What You Save Is
                      What You Get




Monday, May 21, 12
What You Save Is
                      What You Get

                     Eclipse Java Compiler




Monday, May 21, 12
What You Save Is
                      What You Get

                     Eclipse Java Compiler

                     Custom ClassLoader




Monday, May 21, 12
What You Save Is
                      What You Get

                     Eclipse Java Compiler

                     Custom ClassLoader

                     Javassist




Monday, May 21, 12
What You Save Is
                      What You Get

                     Eclipse Java Compiler

                     Custom ClassLoader

                     Javassist

                     Netty




Monday, May 21, 12
Model
                      package	
  models;

                      import	
  play.db.jpa.Model;

                      import	
  
                      javax.persistence.Entity;

                      @Entity
                      public	
  class	
  User	
  extends	
  
                      Model	
  {
                      	
  	
  	
  	
  @Required
                      	
  	
  	
  	
  public	
  String	
  firstName;
                      }



Monday, May 21, 12
Model
                                package	
  models;

                                import	
  play.db.jpa.Model;

                     JPA 2.0    import	
  
                                javax.persistence.Entity;

                                @Entity
                                public	
  class	
  User	
  extends	
  
                                Model	
  {
                                	
  	
  	
  	
  @Required
                                	
  	
  	
  	
  public	
  String	
  firstName;
                                }



Monday, May 21, 12
Model
                                       package	
  models;

                                       import	
  play.db.jpa.Model;

                     JPA 2.0           import	
  
                                       javax.persistence.Entity;
                     play.db.jpa.Model @Entity
                                       public	
  class	
  User	
  extends	
  
                                       Model	
  {
                                       	
  	
  	
  	
  @Required
                                       	
  	
  	
  	
  public	
  String	
  firstName;
                                       }



Monday, May 21, 12
Model
                                       package	
  models;

                                       import	
  play.db.jpa.Model;

                     JPA 2.0           import	
  
                                       javax.persistence.Entity;
                     play.db.jpa.Model @Entity
                                       public	
  class	
  User	
  extends	
  
                     Public fields     Model	
  {
                                       	
  	
  	
  	
  @Required
                                       	
  	
  	
  	
  public	
  String	
  firstName;
                                       }



Monday, May 21, 12
Model
   Simplified Queries

  User.find("byEmailAndPassword",	
  
  	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   "vpupkin@gmail.com",	
  "s3cr#t");


             JPQL Queries

   User.find("SELECT	
  u	
  FROM	
  User	
  u	
  WHERE	
  u.email	
  LIKE	
  ?1",	
  
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "vpupkin%");



Monday, May 21, 12
Controller
                         package	
  controllers;

                         import	
  play.*;
                         import	
  play.mvc.*;
                         import	
  java.util.*;
                         import	
  models.*;

                         public	
  class	
  Application	
  
                         extends	
  Controller	
  {

                         	
  	
  	
  	
  public	
  static	
  void	
  index()	
  
                         {
                         	
  	
  	
  	
  	
  	
  	
  	
  render();
                         	
  	
  	
  	
  }

                         }

Monday, May 21, 12
Controller
                                 package	
  controllers;

                                 import	
  play.*;
                                 import	
  play.mvc.*;
                                 import	
  java.util.*;
                 public static   import	
  models.*;
                 methods
                                 public	
  class	
  Application	
  
                                 extends	
  Controller	
  {

                                 	
  	
  	
  	
  public	
  static	
  void	
  index()	
  
                                 {
                                 	
  	
  	
  	
  	
  	
  	
  	
  render();
                                 	
  	
  	
  	
  }

                                 }

Monday, May 21, 12
Controller
                                       package	
  controllers;

                                       import	
  play.*;
                                       import	
  play.mvc.*;
                                       import	
  java.util.*;
                 public static         import	
  models.*;
                 methods
                                       public	
  class	
  Application	
  
                                       extends	
  Controller	
  {
                 play.mvc.Controller
                                       	
  	
  	
  	
  public	
  static	
  void	
  index()	
  
                                       {
                                       	
  	
  	
  	
  	
  	
  	
  	
  render();
                                       	
  	
  	
  	
  }

                                       }

Monday, May 21, 12
Controller
                                       package	
  controllers;

                                       import	
  play.*;
                                       import	
  play.mvc.*;
                                       import	
  java.util.*;
                 public static         import	
  models.*;
                 methods
                                       public	
  class	
  Application	
  
                                       extends	
  Controller	
  {
                 play.mvc.Controller
                                       	
  	
  	
  	
  public	
  static	
  void	
  index()	
  
                 render method         {
                                       	
  	
  	
  	
  	
  	
  	
  	
  render();
                                       	
  	
  	
  	
  }

                                       }

Monday, May 21, 12
Controller
          Binding




Monday, May 21, 12
Controller
          Binding

                     public	
  static	
  void	
  show(Long[]	
  id)	
  {
                     ...
                     }




Monday, May 21, 12
Controller
          Binding

                     public	
  static	
  void	
  show(Long[]	
  id)	
  {
                     ...
                     }

                     public	
  static	
  void	
  show(List<Long>	
  id)	
  {
                     ...
                     }




Monday, May 21, 12
Controller
          Binding




Monday, May 21, 12
Controller
          Binding
              public	
  static	
  void	
  update(@As("dd/MM/yyyy")	
  Date	
  
              updatedAt)	
  {
              ...
              }




Monday, May 21, 12
Controller
          Binding
              public	
  static	
  void	
  update(@As("dd/MM/yyyy")	
  Date	
  
              updatedAt)	
  {
              ...
              }
            public	
  static	
  void	
  update(@As(",")	
  List<String>	
  
            items)	
  {
            ...
            }




Monday, May 21, 12
Controller
          Binding
              public	
  static	
  void	
  update(@As("dd/MM/yyyy")	
  Date	
  
              updatedAt)	
  {
              ...
              }
            public	
  static	
  void	
  update(@As(",")	
  List<String>	
  
            items)	
  {
            ...
            }
            public	
  static	
  void	
  anyAction(@As(binder=Binder.class)	
  
            String	
  name)	
  {
            ...
            }
Monday, May 21, 12
Controller
       Workflow




Monday, May 21, 12
Controller
       Workflow
             	
  @Before(only={"login","logout"})
             	
  static	
  void	
  doSomething()	
  {
                   ...
             	
  }




Monday, May 21, 12
Controller
       Workflow
             	
  @Before(only={"login","logout"})
             	
  static	
  void	
  doSomething()	
  {
                   ...
             	
  }

            @After
            static	
  void	
  log()	
  {
            	
  	
  	
  	
  Logger.info("Action	
  executed	
  ...");
            }




Monday, May 21, 12
Controller
       Workflow
             	
  @Before(only={"login","logout"})
             	
  static	
  void	
  doSomething()	
  {
                   ...
             	
  }

            @After
            static	
  void	
  log()	
  {
            	
  	
  	
  	
  Logger.info("Action	
  executed	
  ...");
            }

       @Finally
       static	
  void	
  log()	
  {
       	
  	
  	
  	
  Logger.info("Response	
  contains	
  :	
  "	
  +	
  response.out);
       }
Monday, May 21, 12
Controller
       Workflow




Monday, May 21, 12
Controller
       Workflow

       	
  @Catch(value	
  =	
  Throwable.class,	
  priority	
  =	
  1)
       	
  public	
  static	
  void	
  logThrowable(Throwable	
  t)	
  {
       ...
       	
  }




Monday, May 21, 12
Controller
       Workflow

       	
  @Catch(value	
  =	
  Throwable.class,	
  priority	
  =	
  1)
       	
  public	
  static	
  void	
  logThrowable(Throwable	
  t)	
  {
       ...
       	
  }



                     @With(Secure.class)
                     public	
  class	
  Admin	
  extends	
  Controller	
  {
                     ...
                     }


Monday, May 21, 12
View
                              ...
                              	
  	
  	
  	
  	
  	
  	
  	
  <title>#{get	
  'title'	
  /}</
                              title>
                              ...
                              	
  	
  	
  	
  	
  	
  	
  	
  #{get	
  'moreStyles'	
  /}
                              ...
                              	
  	
  	
  	
  	
  	
  	
  	
  <script	
  src="@{'/public/
                              javascripts/jquery-­‐1.6.4.min.js'}"	
  
                     Groovy   type="text/javascript"	
  charset="$
                              {_response_encoding}"></script>
                              	
  	
  	
  	
  	
  	
  	
  	
  #{get	
  'moreScripts'	
  /}
                              	
  	
  	
  	
  </head>
                              	
  	
  	
  	
  <body>
                              	
  	
  	
  	
  	
  	
  	
  	
  #{doLayout	
  /}
                              	
  	
  	
  	
  </body>
                              ...

Monday, May 21, 12
Testing
                                    Unit Tests
                     import	
  play.test.*;
                     import	
  org.junit.*;
                     	
  
                     public	
  class	
  UsersTest	
  extends	
  UnitTest	
  {
                     	
  	
  	
  	
  @Test
                     	
  	
  	
  	
  public	
  void	
  aTest()	
  {
                     ...
                     	
  	
  	
  	
  }
                     	
  	
  	
  	
  @Test
                     	
  	
  	
  	
  public	
  void	
  testUsers()	
  {
                     ...
                     	
  	
  	
  	
  }
                     }

Monday, May 21, 12
Testing
                              Functional Tests
       import	
  play.test.*;
       import	
  play.mvc.*;
       import	
  play.mvc.Http.*;
       import	
  org.junit.*;
       	
  
       public	
  class	
  ApplicationTest	
  extends	
  FunctionalTest	
  {	
  	
  	
  
                                                                                     	
  
       	
  	
  	
  	
  @Test
       	
  	
  	
  	
  public	
  void	
  testTheHomePage()	
  {
       	
  	
  	
  	
  	
  	
  	
  	
  Response	
  response	
  =	
  GET("/");
       	
  	
  	
  	
  	
  	
  	
  	
  assertStatus(200,	
  response);
       	
  	
  	
  	
  }

       }

Monday, May 21, 12
Testing
                                             Selenium

                     #{selenium	
  'Test	
  security'}
                     	
  	
  	
  	
  clearSession()
                     	
  	
  	
  	
  open('/admin')
                     	
  	
  	
  	
  assertTextPresent('Login')
                     	
  	
  	
  	
  type('login',	
  'admin')
                     	
  	
  	
  	
  type('password',	
  'secret')
                     	
  	
  	
  	
  clickAndWait('signin')
                     	
  
                     	
  	
  	
  	
  assertText('success',	
  'Welcom	
  admin!')
                     #{/selenium}


Monday, May 21, 12
Dependency
                     Management




Monday, May 21, 12
Dependency
                        Management
                            #	
  Application	
  dependencies
                            require:
                     YAML   	
  	
  	
  	
  -­‐	
  play	
  1.2.4
                            	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud
                            	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure

                            repositories:
                            	
  	
  	
  	
  -­‐	
  jboss:
                            	
  	
  	
  	
  	
  	
  	
  	
  type:	
  	
  	
  	
  	
  	
  	
  iBiblio
                            	
  	
  	
  	
  	
  	
  	
  	
  artifact:	
  "http://
                            repository.jboss.org/nexus/
                            content/groups/public-­‐jboss/"
                            	
  	
  	
  	
  	
  	
  	
  	
  contains:
                            	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  -­‐	
  org.drools	
  -­‐>	
  *

Monday, May 21, 12
Dependency
                         Management
                               #	
  Application	
  dependencies
                               require:
                     YAML      	
  	
  	
  	
  -­‐	
  play	
  1.2.4
                               	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud
                               	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure
                     Ant Ivy
                               repositories:
                               	
  	
  	
  	
  -­‐	
  jboss:
                               	
  	
  	
  	
  	
  	
  	
  	
  type:	
  	
  	
  	
  	
  	
  	
  iBiblio
                               	
  	
  	
  	
  	
  	
  	
  	
  artifact:	
  "http://
                               repository.jboss.org/nexus/
                               content/groups/public-­‐jboss/"
                               	
  	
  	
  	
  	
  	
  	
  	
  contains:
                               	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  -­‐	
  org.drools	
  -­‐>	
  *

Monday, May 21, 12
Dependency
                         Management
                                    #	
  Application	
  dependencies
                                    require:
                     YAML           	
  	
  	
  	
  -­‐	
  play	
  1.2.4
                                    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud
                                    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure
                     Ant Ivy
                                    repositories:
                     Repositories   	
  	
  	
  	
  -­‐	
  jboss:
                                    	
  	
  	
  	
  	
  	
  	
  	
  type:	
  	
  	
  	
  	
  	
  	
  iBiblio
                                    	
  	
  	
  	
  	
  	
  	
  	
  artifact:	
  "http://
                                    repository.jboss.org/nexus/
                                    content/groups/public-­‐jboss/"
                                    	
  	
  	
  	
  	
  	
  	
  	
  contains:
                                    	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  -­‐	
  org.drools	
  -­‐>	
  *

Monday, May 21, 12
Dependency
                         Management
                                    #	
  Application	
  dependencies
                                    require:
                     YAML           	
  	
  	
  	
  -­‐	
  play	
  1.2.4
                                    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud
                                    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure
                     Ant Ivy
                                    repositories:
                     Repositories   	
  	
  	
  	
  -­‐	
  jboss:
                                    	
  	
  	
  	
  	
  	
  	
  	
  type:	
  	
  	
  	
  	
  	
  	
  iBiblio
                                    	
  	
  	
  	
  	
  	
  	
  	
  artifact:	
  "http://
                     Deps & Sync    repository.jboss.org/nexus/
                                    content/groups/public-­‐jboss/"
                                    	
  	
  	
  	
  	
  	
  	
  	
  contains:
                                    	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  -­‐	
  org.drools	
  -­‐>	
  *

Monday, May 21, 12
Configuration




Monday, May 21, 12
Configuration

                                   application.mode=dev
                                   %prod.application.mode=prod
                                   	
  
                     Application   jpda.port=8000
                                   java.source=1.6

                                   db=mem
                                   %prod.db=postgres://user:pwd@host/
                                   database
                                   %test.db.url=jdbc:h2:mem:play;MODE=MYSQL
                                   ;LOCK_MODE=0




Monday, May 21, 12
Configuration


                                   GET	
  	
  /	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Application.index
                                   GET	
  	
  /favicon.ico	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  404
                     Application   GET	
  	
  /public/	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  staticDir:public
                                   *	
  	
  	
  	
  /admin	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  module:crud
                                   *	
  	
  	
  	
  /	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  module:secure
                     Routing       *	
  	
  	
  	
  /{controller}/{action}	
  {controller}.
                                   {action}




Monday, May 21, 12
Modules




Monday, May 21, 12
Modules
               CRUD




Monday, May 21, 12
Modules
               CRUD
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud




Monday, May 21, 12
Modules
               CRUD
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud     *	
  	
  	
  	
  /admin	
  	
  	
  	
  module:crud




Monday, May 21, 12
Modules
               CRUD
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  crud     *	
  	
  	
  	
  /admin	
  	
  	
  	
  module:crud




                     package	
  controllers;

                     public	
  class	
  Users	
  extends	
  CURD	
  {
                     }



Monday, May 21, 12
Modules
             Secure




Monday, May 21, 12
Modules
             Secure
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure




Monday, May 21, 12
Modules
             Secure
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure   *	
  	
  	
  	
  /	
  	
  	
  module:secure




Monday, May 21, 12
Modules
             Secure
    required:
    	
  	
  	
  	
  -­‐	
  play	
  -­‐>	
  secure   *	
  	
  	
  	
  /	
  	
  	
  module:secure




                     package	
  controllers;
                     import	
  play.mvc.With;

                     @With(Secure.class)
                     public	
  class	
  Users	
  extends	
  CURD	
  {
                     }

Monday, May 21, 12
Modules
       Custom Module




Monday, May 21, 12
Modules
       Custom Module

                     Routing




Monday, May 21, 12
Modules
       Custom Module

                     Routing

                     MVC classes




Monday, May 21, 12
Modules
       Custom Module

                     Routing

                     MVC classes

                     Dependencies




Monday, May 21, 12
Modules
       Custom Module

                     Routing

                     MVC classes

                     Dependencies

                     ZIP packaging




Monday, May 21, 12
Modules
       Custom Module

                     Routing

                     MVC classes

                     Dependencies

                     ZIP packaging




Monday, May 21, 12
Modules
       Custom Module

                     Routing         NO configuration

                     MVC classes

                     Dependencies

                     ZIP packaging




Monday, May 21, 12
Modules
       Custom Module

                     Routing         NO configuration

                     MVC classes     NO tests

                     Dependencies

                     ZIP packaging




Monday, May 21, 12
Modules
       Custom Module

                     Routing         NO configuration

                     MVC classes     NO tests

                     Dependencies    NO dependencies

                     ZIP packaging




Monday, May 21, 12
Let it Play!




Monday, May 21, 12
Clouds

                     Heroku

                     CloudBees

                     PlayApp

                     Google AppEngine




Monday, May 21, 12
Disadvantages




Monday, May 21, 12
Disadvantages
                 Custom Modules
                 management




Monday, May 21, 12
Disadvantages
                 Custom Modules
                 management

                 Precompiling
                 requirements




Monday, May 21, 12
Disadvantages
                 Custom Modules
                 management

                 Precompiling
                 requirements

                 Cloud deployment
                 limitations




Monday, May 21, 12
Disadvantages
                 Custom Modules     Configuration
                 management         management
                                    limitations
                 Precompiling
                 requirements

                 Cloud deployment
                 limitations




Monday, May 21, 12
Disadvantages
                 Custom Modules     Configuration
                 management         management
                                    limitations
                 Precompiling
                 requirements       Technology stack
                                    limitations
                 Cloud deployment
                 limitations




Monday, May 21, 12
Disadvantages
                 Custom Modules     Configuration
                 management         management
                                    limitations
                 Precompiling
                 requirements       Technology stack
                                    limitations
                 Cloud deployment
                 limitations        Lack of
                                    documentation



Monday, May 21, 12
Alternatives




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0

                     NamedQueries




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0

                     NamedQueries

                     Spring 3.1




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0

                     NamedQueries

                     Spring 3.1

                     Spring Security




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0      Maven

                     NamedQueries

                     Spring 3.1

                     Spring Security




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0      Maven

                     NamedQueries      TestNG

                     Spring 3.1

                     Spring Security




Monday, May 21, 12
Alternatives

                     Pure JPA 2.0      Maven

                     NamedQueries      TestNG

                     Spring 3.1        DBUnit

                     Spring Security




Monday, May 21, 12
Take Away




Monday, May 21, 12
Thanks!

                                       Anton Naumov
                             email: anton.naumow@gmail.com
                     linkedin: http://ua.linkedin.com/in/antonnaumov




Monday, May 21, 12

More Related Content

Similar to Play with play!

Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsYuichi Sakuraba
 
Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Robert Scholte
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Robert Scholte
 
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampIasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampCodecamp Romania
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Robert Scholte
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovJ On The Beach
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Robert Scholte
 
NoRedeploys: instant updates for dev and prod
NoRedeploys: instant updates for dev and prodNoRedeploys: instant updates for dev and prod
NoRedeploys: instant updates for dev and prodAnton Arhipov
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projectsVincent Massol
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPACheng Ta Yeh
 
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesJava 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesGlobalLogic Ukraine
 
Using java8 for unit testing while being backward compatible
Using java8 for unit testing while being backward compatibleUsing java8 for unit testing while being backward compatible
Using java8 for unit testing while being backward compatibleNikola Petrov
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityDanHeidinga
 
RivieraDev 2017 - Java 9 modules
RivieraDev 2017 - Java 9 modulesRivieraDev 2017 - Java 9 modules
RivieraDev 2017 - Java 9 modulesAlexis Hassler
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New FeaturesAli BAKAN
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answersKuntal Bhowmick
 

Similar to Play with play! (20)

Moving to Module: Issues & Solutions
Moving to Module: Issues & SolutionsMoving to Module: Issues & Solutions
Moving to Module: Issues & Solutions
 
Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
 
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampIasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan Krylov
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
 
NoRedeploys: instant updates for dev and prod
NoRedeploys: instant updates for dev and prodNoRedeploys: instant updates for dev and prod
NoRedeploys: instant updates for dev and prod
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
 
Gradle
GradleGradle
Gradle
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
 
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesJava 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
 
Using java8 for unit testing while being backward compatible
Using java8 for unit testing while being backward compatibleUsing java8 for unit testing while being backward compatible
Using java8 for unit testing while being backward compatible
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
 
RivieraDev 2017 - Java 9 modules
RivieraDev 2017 - Java 9 modulesRivieraDev 2017 - Java 9 modules
RivieraDev 2017 - Java 9 modules
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New Features
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answers
 
Java9
Java9Java9
Java9
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

Play with play!

  • 1. Play with Play! Anton Naumov email: anton.naumow@gmail.com linkedin: http://ua.linkedin.com/in/antonnaumov Monday, May 21, 12
  • 2. Who am I? Java Engineer 11+ years in Java development Photographer Sci-Fi addicted Monday, May 21, 12
  • 3. RIA Frameworks ? Monday, May 21, 12
  • 4. RIA Frameworks Ruby -> Rails Monday, May 21, 12
  • 5. RIA Frameworks Python -> Django Monday, May 21, 12
  • 6. RIA Frameworks Scala -> Play! Monday, May 21, 12
  • 7. RIA Frameworks PHP -> PHP Monday, May 21, 12
  • 8. RIA Frameworks Java -> Monday, May 21, 12
  • 9. RIA Frameworks Java -> ? Monday, May 21, 12
  • 10. RIA Frameworks Java -> JSF? Monday, May 21, 12
  • 11. RIA Frameworks JSF? Java -> GWT? Monday, May 21, 12
  • 12. RIA Frameworks JSF? GWT? Java -> Play! Monday, May 21, 12
  • 14. Play! Features NO compiling, NO redeployment Monday, May 21, 12
  • 15. Play! Features NO compiling, NO redeployment MVC out of the box Monday, May 21, 12
  • 16. Play! Features NO compiling, NO redeployment MVC out of the box Unit & Functional test infrastructure Monday, May 21, 12
  • 17. Play! Features NO compiling, NO redeployment MVC out of the box Unit & Functional test infrastructure Dependency management Monday, May 21, 12
  • 18. Play! Features NO compiling, NO redeployment MVC out of the box Unit & Functional test infrastructure Dependency management Simple text and YAML configuration Monday, May 21, 12
  • 19. Play! Features NO compiling, NO redeployment MVC out of the box Unit & Functional test infrastructure Dependency management Simple text and YAML configuration Modules Monday, May 21, 12
  • 20. Play! Features NO compiling, NO redeployment MVC out of the box Unit & Functional test infrastructure Dependency management Simple text and YAML configuration Modules Cloud hosting support Monday, May 21, 12
  • 22. What You Save Is What You Get Monday, May 21, 12
  • 23. What You Save Is What You Get Eclipse Java Compiler Monday, May 21, 12
  • 24. What You Save Is What You Get Eclipse Java Compiler Custom ClassLoader Monday, May 21, 12
  • 25. What You Save Is What You Get Eclipse Java Compiler Custom ClassLoader Javassist Monday, May 21, 12
  • 26. What You Save Is What You Get Eclipse Java Compiler Custom ClassLoader Javassist Netty Monday, May 21, 12
  • 27. Model package  models; import  play.db.jpa.Model; import   javax.persistence.Entity; @Entity public  class  User  extends   Model  {        @Required        public  String  firstName; } Monday, May 21, 12
  • 28. Model package  models; import  play.db.jpa.Model; JPA 2.0 import   javax.persistence.Entity; @Entity public  class  User  extends   Model  {        @Required        public  String  firstName; } Monday, May 21, 12
  • 29. Model package  models; import  play.db.jpa.Model; JPA 2.0 import   javax.persistence.Entity; play.db.jpa.Model @Entity public  class  User  extends   Model  {        @Required        public  String  firstName; } Monday, May 21, 12
  • 30. Model package  models; import  play.db.jpa.Model; JPA 2.0 import   javax.persistence.Entity; play.db.jpa.Model @Entity public  class  User  extends   Public fields Model  {        @Required        public  String  firstName; } Monday, May 21, 12
  • 31. Model Simplified Queries User.find("byEmailAndPassword",                         "vpupkin@gmail.com",  "s3cr#t"); JPQL Queries User.find("SELECT  u  FROM  User  u  WHERE  u.email  LIKE  ?1",                                                      "vpupkin%"); Monday, May 21, 12
  • 32. Controller package  controllers; import  play.*; import  play.mvc.*; import  java.util.*; import  models.*; public  class  Application   extends  Controller  {        public  static  void  index()   {                render();        } } Monday, May 21, 12
  • 33. Controller package  controllers; import  play.*; import  play.mvc.*; import  java.util.*; public static import  models.*; methods public  class  Application   extends  Controller  {        public  static  void  index()   {                render();        } } Monday, May 21, 12
  • 34. Controller package  controllers; import  play.*; import  play.mvc.*; import  java.util.*; public static import  models.*; methods public  class  Application   extends  Controller  { play.mvc.Controller        public  static  void  index()   {                render();        } } Monday, May 21, 12
  • 35. Controller package  controllers; import  play.*; import  play.mvc.*; import  java.util.*; public static import  models.*; methods public  class  Application   extends  Controller  { play.mvc.Controller        public  static  void  index()   render method {                render();        } } Monday, May 21, 12
  • 36. Controller Binding Monday, May 21, 12
  • 37. Controller Binding public  static  void  show(Long[]  id)  { ... } Monday, May 21, 12
  • 38. Controller Binding public  static  void  show(Long[]  id)  { ... } public  static  void  show(List<Long>  id)  { ... } Monday, May 21, 12
  • 39. Controller Binding Monday, May 21, 12
  • 40. Controller Binding public  static  void  update(@As("dd/MM/yyyy")  Date   updatedAt)  { ... } Monday, May 21, 12
  • 41. Controller Binding public  static  void  update(@As("dd/MM/yyyy")  Date   updatedAt)  { ... } public  static  void  update(@As(",")  List<String>   items)  { ... } Monday, May 21, 12
  • 42. Controller Binding public  static  void  update(@As("dd/MM/yyyy")  Date   updatedAt)  { ... } public  static  void  update(@As(",")  List<String>   items)  { ... } public  static  void  anyAction(@As(binder=Binder.class)   String  name)  { ... } Monday, May 21, 12
  • 43. Controller Workflow Monday, May 21, 12
  • 44. Controller Workflow  @Before(only={"login","logout"})  static  void  doSomething()  { ...  } Monday, May 21, 12
  • 45. Controller Workflow  @Before(only={"login","logout"})  static  void  doSomething()  { ...  } @After static  void  log()  {        Logger.info("Action  executed  ..."); } Monday, May 21, 12
  • 46. Controller Workflow  @Before(only={"login","logout"})  static  void  doSomething()  { ...  } @After static  void  log()  {        Logger.info("Action  executed  ..."); } @Finally static  void  log()  {        Logger.info("Response  contains  :  "  +  response.out); } Monday, May 21, 12
  • 47. Controller Workflow Monday, May 21, 12
  • 48. Controller Workflow  @Catch(value  =  Throwable.class,  priority  =  1)  public  static  void  logThrowable(Throwable  t)  { ...  } Monday, May 21, 12
  • 49. Controller Workflow  @Catch(value  =  Throwable.class,  priority  =  1)  public  static  void  logThrowable(Throwable  t)  { ...  } @With(Secure.class) public  class  Admin  extends  Controller  { ... } Monday, May 21, 12
  • 50. View ...                <title>#{get  'title'  /}</ title> ...                #{get  'moreStyles'  /} ...                <script  src="@{'/public/ javascripts/jquery-­‐1.6.4.min.js'}"   Groovy type="text/javascript"  charset="$ {_response_encoding}"></script>                #{get  'moreScripts'  /}        </head>        <body>                #{doLayout  /}        </body> ... Monday, May 21, 12
  • 51. Testing Unit Tests import  play.test.*; import  org.junit.*;   public  class  UsersTest  extends  UnitTest  {        @Test        public  void  aTest()  { ...        }        @Test        public  void  testUsers()  { ...        } } Monday, May 21, 12
  • 52. Testing Functional Tests import  play.test.*; import  play.mvc.*; import  play.mvc.Http.*; import  org.junit.*;   public  class  ApplicationTest  extends  FunctionalTest  {                @Test        public  void  testTheHomePage()  {                Response  response  =  GET("/");                assertStatus(200,  response);        } } Monday, May 21, 12
  • 53. Testing Selenium #{selenium  'Test  security'}        clearSession()        open('/admin')        assertTextPresent('Login')        type('login',  'admin')        type('password',  'secret')        clickAndWait('signin')          assertText('success',  'Welcom  admin!') #{/selenium} Monday, May 21, 12
  • 54. Dependency Management Monday, May 21, 12
  • 55. Dependency Management #  Application  dependencies require: YAML        -­‐  play  1.2.4        -­‐  play  -­‐>  crud        -­‐  play  -­‐>  secure repositories:        -­‐  jboss:                type:              iBiblio                artifact:  "http:// repository.jboss.org/nexus/ content/groups/public-­‐jboss/"                contains:                        -­‐  org.drools  -­‐>  * Monday, May 21, 12
  • 56. Dependency Management #  Application  dependencies require: YAML        -­‐  play  1.2.4        -­‐  play  -­‐>  crud        -­‐  play  -­‐>  secure Ant Ivy repositories:        -­‐  jboss:                type:              iBiblio                artifact:  "http:// repository.jboss.org/nexus/ content/groups/public-­‐jboss/"                contains:                        -­‐  org.drools  -­‐>  * Monday, May 21, 12
  • 57. Dependency Management #  Application  dependencies require: YAML        -­‐  play  1.2.4        -­‐  play  -­‐>  crud        -­‐  play  -­‐>  secure Ant Ivy repositories: Repositories        -­‐  jboss:                type:              iBiblio                artifact:  "http:// repository.jboss.org/nexus/ content/groups/public-­‐jboss/"                contains:                        -­‐  org.drools  -­‐>  * Monday, May 21, 12
  • 58. Dependency Management #  Application  dependencies require: YAML        -­‐  play  1.2.4        -­‐  play  -­‐>  crud        -­‐  play  -­‐>  secure Ant Ivy repositories: Repositories        -­‐  jboss:                type:              iBiblio                artifact:  "http:// Deps & Sync repository.jboss.org/nexus/ content/groups/public-­‐jboss/"                contains:                        -­‐  org.drools  -­‐>  * Monday, May 21, 12
  • 60. Configuration application.mode=dev %prod.application.mode=prod   Application jpda.port=8000 java.source=1.6 db=mem %prod.db=postgres://user:pwd@host/ database %test.db.url=jdbc:h2:mem:play;MODE=MYSQL ;LOCK_MODE=0 Monday, May 21, 12
  • 61. Configuration GET    /                                            Application.index GET    /favicon.ico                      404 Application GET    /public/                              staticDir:public *        /admin                                  module:crud *        /                                            module:secure Routing *        /{controller}/{action}  {controller}. {action} Monday, May 21, 12
  • 63. Modules CRUD Monday, May 21, 12
  • 64. Modules CRUD required:        -­‐  play  -­‐>  crud Monday, May 21, 12
  • 65. Modules CRUD required:        -­‐  play  -­‐>  crud *        /admin        module:crud Monday, May 21, 12
  • 66. Modules CRUD required:        -­‐  play  -­‐>  crud *        /admin        module:crud package  controllers; public  class  Users  extends  CURD  { } Monday, May 21, 12
  • 67. Modules Secure Monday, May 21, 12
  • 68. Modules Secure required:        -­‐  play  -­‐>  secure Monday, May 21, 12
  • 69. Modules Secure required:        -­‐  play  -­‐>  secure *        /      module:secure Monday, May 21, 12
  • 70. Modules Secure required:        -­‐  play  -­‐>  secure *        /      module:secure package  controllers; import  play.mvc.With; @With(Secure.class) public  class  Users  extends  CURD  { } Monday, May 21, 12
  • 71. Modules Custom Module Monday, May 21, 12
  • 72. Modules Custom Module Routing Monday, May 21, 12
  • 73. Modules Custom Module Routing MVC classes Monday, May 21, 12
  • 74. Modules Custom Module Routing MVC classes Dependencies Monday, May 21, 12
  • 75. Modules Custom Module Routing MVC classes Dependencies ZIP packaging Monday, May 21, 12
  • 76. Modules Custom Module Routing MVC classes Dependencies ZIP packaging Monday, May 21, 12
  • 77. Modules Custom Module Routing NO configuration MVC classes Dependencies ZIP packaging Monday, May 21, 12
  • 78. Modules Custom Module Routing NO configuration MVC classes NO tests Dependencies ZIP packaging Monday, May 21, 12
  • 79. Modules Custom Module Routing NO configuration MVC classes NO tests Dependencies NO dependencies ZIP packaging Monday, May 21, 12
  • 80. Let it Play! Monday, May 21, 12
  • 81. Clouds Heroku CloudBees PlayApp Google AppEngine Monday, May 21, 12
  • 83. Disadvantages Custom Modules management Monday, May 21, 12
  • 84. Disadvantages Custom Modules management Precompiling requirements Monday, May 21, 12
  • 85. Disadvantages Custom Modules management Precompiling requirements Cloud deployment limitations Monday, May 21, 12
  • 86. Disadvantages Custom Modules Configuration management management limitations Precompiling requirements Cloud deployment limitations Monday, May 21, 12
  • 87. Disadvantages Custom Modules Configuration management management limitations Precompiling requirements Technology stack limitations Cloud deployment limitations Monday, May 21, 12
  • 88. Disadvantages Custom Modules Configuration management management limitations Precompiling requirements Technology stack limitations Cloud deployment limitations Lack of documentation Monday, May 21, 12
  • 90. Alternatives Pure JPA 2.0 Monday, May 21, 12
  • 91. Alternatives Pure JPA 2.0 NamedQueries Monday, May 21, 12
  • 92. Alternatives Pure JPA 2.0 NamedQueries Spring 3.1 Monday, May 21, 12
  • 93. Alternatives Pure JPA 2.0 NamedQueries Spring 3.1 Spring Security Monday, May 21, 12
  • 94. Alternatives Pure JPA 2.0 Maven NamedQueries Spring 3.1 Spring Security Monday, May 21, 12
  • 95. Alternatives Pure JPA 2.0 Maven NamedQueries TestNG Spring 3.1 Spring Security Monday, May 21, 12
  • 96. Alternatives Pure JPA 2.0 Maven NamedQueries TestNG Spring 3.1 DBUnit Spring Security Monday, May 21, 12
  • 98. Thanks! Anton Naumov email: anton.naumow@gmail.com linkedin: http://ua.linkedin.com/in/antonnaumov Monday, May 21, 12