Your SlideShare is downloading. ×
0
Introduction to Play! Framework
About me


Rustem Suniev
Senior Developer at Autoquake.com
Technologies we use: Java,JEE,Groovy,Grails,GWT

My current int...
Why another Web framework?
 I'm tired to learn all of them
What is Play!
●   Started 2008 by Guillaume Bort, play dev team
    and Zenexity
●   A new unconventional for Java world a...
Main features
●   Stateless
●   RESTfull (Uses HTTP features not just as a
    transport)
●   No-compilation
●   Refresh a...
MVC in Play!
●   Model (not anemic)
●   Controller
●   Convention based REST routing
●   View (efficient template system)
What is Stateless exactly?
●   Share nothing architecture
●   Easy to scale and support
●   Simplifies the code
    but so...
Testing
●   Can't execute tests outside of the framework
    We have 3 types of tests:
●   Unit
●   Functional
●   Seleniu...
Jobs
●   Scheduled jobs
●   Bootstrapping
●   Suspendable requests
    Future<InputStream> task = new
    ReportAsPDFJob(r...
Modules system
    Some of the available modules:
●   CRUD
●   GAE,GWT
●   Guice, Spring
●   Stax, Playapps.net
●   Siena,...
Small but nice things in Play!
●   Framework ID's (play id, prod321.username=test)
●   Localisation and I18N
    (<h1>&{'v...
Where is Scala stuff? Enough Java
     Now onto Play! Scala
                     (created by Peter Hausel)




“I like Lif...
Why Scala?
●   Alternative implementation but same platform
●   Java enhancers (ex get,set)
●   Traits
●   Improve express...
What Scala brings to Play!
●   Scala 2.8 support
●   ScalaTest
●   Scalate templates
●   Scala console (tab completion)
● ...
Demo time




Ok let's build a simple app.
Any cons at all?
●   Documentation is not up to date and scattered
●   Scala module is still in dev (but API changes are l...
Preparing for Production
●   Can be compiled and packaged
●   Can be deployed to all major containers
●   Some security is...
Summary
●   Looking forward to 1.1 release
●   Scala module looks promising and easy to use
●   Better IDE support is requ...
Resourses
●   www.playframework.org
●   http://groups.google.com/group/play-framework/
●   http://planet.playframework.org/
Thank you!
Upcoming SlideShare
Loading in...5
×

Rustem Suniev: London Scala Users' Group:Intro to Play - 11/08/2010

1,801

Published on

Rustem Suniev: London Scala Users' Group:Intro to Play - 11/08/2010

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,801
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
23
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Rustem Suniev: London Scala Users' Group:Intro to Play - 11/08/2010"

  1. 1. Introduction to Play! Framework
  2. 2. About me Rustem Suniev Senior Developer at Autoquake.com Technologies we use: Java,JEE,Groovy,Grails,GWT My current interests are: Scala, Lift, Play, Clojure Twitter: @vigosun Email: rustem.suniev@gmail.com
  3. 3. Why another Web framework? I'm tired to learn all of them
  4. 4. What is Play! ● Started 2008 by Guillaume Bort, play dev team and Zenexity ● A new unconventional for Java world approach ● There is no traditional JEE stack ● It's a platform not just a glue framework ● Usability first ● Current version is 1.0.3.2
  5. 5. Main features ● Stateless ● RESTfull (Uses HTTP features not just as a transport) ● No-compilation ● Refresh and see the changes ● In-build compiler and classloader ● Efficient error reporting system ● Build in test framework ● Templates
  6. 6. MVC in Play! ● Model (not anemic) ● Controller ● Convention based REST routing ● View (efficient template system)
  7. 7. What is Stateless exactly? ● Share nothing architecture ● Easy to scale and support ● Simplifies the code but sometimes we need a state? ● Cache (EhCache, Memcached for scaling options) ● Workarounds
  8. 8. Testing ● Can't execute tests outside of the framework We have 3 types of tests: ● Unit ● Functional ● Selenium simplified ● Code coverage via Cobertura plugin ● YAML and Fixtures
  9. 9. Jobs ● Scheduled jobs ● Bootstrapping ● Suspendable requests Future<InputStream> task = new ReportAsPDFJob(report).now(); waitFor(task);
  10. 10. Modules system Some of the available modules: ● CRUD ● GAE,GWT ● Guice, Spring ● Stax, Playapps.net ● Siena, Ebean DB, MongoDB ● Installing is simple “play install scala” ● Easy to create a module “play new-module”
  11. 11. Small but nice things in Play! ● Framework ID's (play id, prod321.username=test) ● Localisation and I18N (<h1>&{'views.main.tools.login'}</h1>) ● User and SEO friendly URL's ● Logging support (Logger.info("A log message")) ● Security support ● IDE support
  12. 12. Where is Scala stuff? Enough Java Now onto Play! Scala (created by Peter Hausel) “I like Lift ;-) Play is my second choice for Scala-friendly web frameworks” David Pollak creator of Lift on SOF
  13. 13. Why Scala? ● Alternative implementation but same platform ● Java enhancers (ex get,set) ● Traits ● Improve expressiveness ● Challenges (API, different language features, Interoperability) ● Another language in the future?
  14. 14. What Scala brings to Play! ● Scala 2.8 support ● ScalaTest ● Scalate templates ● Scala console (tab completion) ● AKKA integration
  15. 15. Demo time Ok let's build a simple app.
  16. 16. Any cons at all? ● Documentation is not up to date and scattered ● Scala module is still in dev (but API changes are less likely) ● Couldn't get cobertura working for 1.1 with Scala ● Sometimes changes in Scala classes are not picked (play clean) ● Start-up time grows with number of classes (play recompiles dependencies as well) ● Scala module (Had to compile from source code)
  17. 17. Preparing for Production ● Can be compiled and packaged ● Can be deployed to all major containers ● Some security issue were found recently so it's advised to keep it behind a proxy ● Production behaviour is different ● Use server ID
  18. 18. Summary ● Looking forward to 1.1 release ● Scala module looks promising and easy to use ● Better IDE support is required ● Other Scala modules need more documentation ● Better attention is required to keep Java and Scala modules up to date ● Start using Play! Java now
  19. 19. Resourses ● www.playframework.org ● http://groups.google.com/group/play-framework/ ● http://planet.playframework.org/
  20. 20. Thank you!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×