Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Play Framework (anatomy of a play application) @ Codacy

683 views

Published on

Simple presentation about Play Framework with some tips and tricks on how to build your application and how we do it @ Codacy

Published in: Technology
  • Be the first to comment

Play Framework (anatomy of a play application) @ Codacy

  1. 1. play framework anatomy of a play project
  2. 2. • Master student of Information Systems and Computer @ IST ! • 2 years of experience developing in Scala ! • Currently doing awesome stuff @ Codacy Who am I? Rodrigo Fernandes @rtfpessoa
  3. 3. SBT Scala (Simple) Build Tool
  4. 4. SBT • Play Framework seamlessly integrated with SBT • Play Framework is an SBT plugin (since v2.3.x) How to integrate?
  5. 5. SBT • build.sbt — define the project and sub-projects relation and configuration! • project — root project plugins and extra definitions! • plugins.sbt • [Common.scala] • [Dependencies.scala] How to configure?
  6. 6. SBT build.sbt
  7. 7. SBT plugins.sbt
  8. 8. SBT Common.scala
  9. 9. SBT Dependencies.scala
  10. 10. Play Framework application setup
  11. 11. Routes Default routes and asset optimisations
  12. 12. Multi Layer Application rules services controllers models components/database (Slick) components/rules components/services framework root application
  13. 13. Multi Layer Application rules services controllers models Native UI (C#) API (REST) HTML
  14. 14. Service Level Permissions services.account.AccountServices
  15. 15. Response
  16. 16. Forms Frontend
  17. 17. Forms Backend
  18. 18. Controller Authentication
  19. 19. Database Slick — Scala Language Integrated Connection Kit
  20. 20. Features •fully type-checked •no SQL-injections •no typos •code completion •can still crash in runtime :’(
  21. 21. Example Table
  22. 22. Base Table
  23. 23. Security
  24. 24. Security SecureString
  25. 25. Questions? Thank you For more info check out:! https://github.com/codacy/codacy-playframework-seed https://www.playframework.com/documentation/2.3.x/Home http://www.scala-sbt.org/0.13/tutorial/index.html @codacy @rtfpessoa

×