Play Framework on Google App Engine

18,942 views

Published on

Brief introduction of Google App Engine and Play Framework.

Step-by-step instruction to develop and deploy play! web App on GAE with Siena persistence layer, CRUD management interface and login support.

Published in: Technology, Education

Play Framework on Google App Engine

  1. 1. Play! onGoogle App Enginegasolin@ 2011/7/20
  2. 2. About mewww.gasolin.idv.tw ista Organizer
  3. 3. About mewww.gasolin.idv.tw ista Web Framework Organizer
  4. 4. About mewww.gasolin.idv.tw Java ista Web Framework Organizer
  5. 5. About mewww.gasolin.idv.tw Java ista App Engine Web Framework Organizer
  6. 6. Google App Engine
  7. 7. Google Cloud Services
  8. 8. http://code.google.com/intl/en/appengine/
  9. 9. Framework
  10. 10. • Open Source• Java ecosystem• Simple• IDE friendly• Modulize
  11. 11. Reuse Libraries
  12. 12. Web framework
  13. 13. Web framework Developers write what they matters
  14. 14. Modules www.playframework.org/modules/
  15. 15. Modules www.playframework.org/modules/
  16. 16. DocumentsCheat Sheethttp://www.playframework.org/documentation/1.2.2/cheatsheet/templates
  17. 17. Jobs Run in other threads• Bootstrap Jobs• Scheduled Jobs• Suspendable Requests
  18. 18. Play! onGoogle App Engine
  19. 19. Create new Project$ play new taipei-gtug (project name)
  20. 20. CommandLine tool
  21. 21. CommandLine tool
  22. 22. Running Project $ play run
  23. 23. localhost:9000Welcome Page
  24. 24. Add ModuleDependency
  25. 25. Add Module Dependency$ play install gae 1.4 (module version)$ play deps
  26. 26. IDE integration$ play eclipsify (idealize) (netbeansify)
  27. 27. Structure
  28. 28. Structure mvc
  29. 29. Structure modules
  30. 30. Structure route conf
  31. 31. Structure static files
  32. 32. Route
  33. 33. Route
  34. 34. Controller-View Mapping
  35. 35. Controller-View Mapping
  36. 36. Controller-View Mapping
  37. 37. Controller-View Mapping
  38. 38. Test Project on Web $ play test
  39. 39. Tests Runner: localhost:9000/@tests
  40. 40. Deploy Setting(www.appspot.com)(project)
  41. 41. Deploy Setting(www.appspot.com)(project)
  42. 42. Deploy$ play gae:deploy --gae=(path)
  43. 43. Deploy$ play gae:deploy --gae=(path)Change Deploy Version
  44. 44. Edit Template Google+1 API http://code.google.com/intl/zh-TW/apis/+1button/
  45. 45. Live Result on GAE
  46. 46. Use Persistence Layer (siena module)
  47. 47. Create Model
  48. 48. Create Model id
  49. 49. Create Model columns
  50. 50. Create Model helper
  51. 51. Modify Controller
  52. 52. Modify Template
  53. 53. Setup Scaffold (crudsiena module)
  54. 54. Setup Scaffold (crudsiena module)Name convention
  55. 55. Setup Scaffold (crudsiena module)
  56. 56. CRUD interface
  57. 57. CRUD Editor
  58. 58. Live Result on GAE
  59. 59. Protect contents (secure module)
  60. 60. Setup secure
  61. 61. Setup secure
  62. 62. Login
  63. 63. That’s it.Build your own!
  64. 64. Resources• http://www.slideshare.net/areelsen/ introduction-playframework• http://goo.gl/DZ7wz

×