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

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

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