JavaTWO專業技術大會
Play!Framework for JavaEE Developers
Who am IExp : JSP/Servlet , Tapestry , Spring/Hibernate/JavaEE , Wicket , Android , Grails , Play! Frameworkhttp://gplus.to/smallufohttp://twitter.com/smallufosmallufo@gmail.com
Web Framework ExperiencesJSP/Servlet
Too old , cumbersome
 Tapestry (old experience, T5 is very good)
Complicated , evolution/deprecation too fast
 Wicket
Too elaborate , fail to see the wood for the trees
May lead to over-engineered architecture for OO-purism
Spend too much time refactoring
Maybe web component reuse is just a myth
Grails (old experience, without Groovy++)
Slow
Too many inconsistent DSLs (URL-mapping , DB , logging...)
Not Java , IDE unfriendlyConventional JavaEE Stack
Conventional JavaEE StackWant standard page ?
Let's define JSP/JSTL (JSR-53)
And let Apache (or others) to implement Jakata Taglibs
 Want web components ?
Let's define Java Server Faces (JSR-127)
And let communities to implement MyFaces, PrimeFaces, ICEfaces...
Want restful ?
Let's define JAX-RS (JSR-311)
And let communities to implement CXF, Jersey, RESTEasy, Wink...Conventional JavaEE StackLots of ...
Specs
Implementations
Configurations
Tedious , Error-prone
Unless you use a full-fledged JavaEE Server (Glassfish or WebLogic ...)
Layered
Defined by Standards/Specs
Assembled by InterfacesOVER ARCHITECTED
Play’s App Looks Like ?conf/routesapp/App.javaGET    /hello    App.hellopublic class App extends Controller {  public static void hello() {    User user = User.findById(1L);    render(user);  }} views/App/hello.htmlHello World : ${user.name}http://localhost:9000/hello
And Play is ...A full stack framework (platform)
Totally independent of JavaEE environment
RESTful
No session
Stateless
Pure server side
Similar to Rails / Django
Rich domain model
Unlike JavaEE's anemic domain modelFull Stack Framework?Bundles compiler , embedded server , hibernate , logger , test runner , email , groovy template engine, scala...
Can be packaged as a WAR and deployed to servlet containersPlay! A Glued Pure Web FrameworkShallow!Most libs are directly exposed to Play! & replaceableWhere Magic Happens
Play! URLs are RESTful & SEO-friendlyUGLYGRACEFUL/car/1
/listcar/page1/count10
/listcar/page1?count=10
/listcar/page/1/count/10
/car.jsp?id=1
/listcars.jsp?page=1&count=10
http://www.facebook.com/ photo.php? fbid=2121715487568& set=o.172881386106136& type=1&theaterPlay is not based on ServletMany java server side frameworks (Spring MVC / Struts / Wicket / JSF / Tapestry ...) are based on servlets, but Play! is not!You cannot do such things :session.setAttribute("user" , user); 
Use HttpSessionListener to count sessions (online users)
ServletFilter
Servlet-related securities
 @ServletSecurity
 <auth-constraint /> , <security-role />Play! is StatelessPlay! shares nothing between each request!
The most important feature you have to keep in mind
No session!
Session is the source of all problems of the JavaEE platform!
Session replication 

Play! Framework for JavaEE Developers