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.

Lift scaffolding from existing database

2,509 views

Published on

Published in: Technology
  • Be the first to comment

Lift scaffolding from existing database

  1. 1. Lift Scaffolding from existing database [email_address]
  2. 2. Goal <ul><li>Ease the “ getting started ” step when migrating from Java to Scala </li></ul><ul><ul><li>A lot of the legacy is in the Database </li></ul></ul><ul><li>Among many alternatives, choose one that fits java programmers with a stack they are familiar with: </li></ul><ul><ul><li>demo based on the Lift JPA sample application </li></ul></ul>Page 
  3. 3. Scala-tools repository http://www.scala-tools.org/repo-releases/net/liftweb/ <ul><ul><li>lift-archetype-basic </li></ul></ul><ul><ul><li>lift-archetype-blank </li></ul></ul><ul><ul><li>lift-archetype-hellolift </li></ul></ul><ul><ul><li>lift-archetype-jpa-basic </li></ul></ul><ul><ul><li>lift-archetype-sbt </li></ul></ul><ul><ul><li>lift-archetype-jpa-blank </li></ul></ul><ul><ul><li>lift-archetype-jpa-blank-single </li></ul></ul>Page 
  4. 4. Scala FARM (Framework for Automatic Relational Mapping) <ul><li>Features: </li></ul><ul><li>DOG: Domain Object Generator for JPA compliant entities (one class per table) </li></ul><ul><li>CAT: </li></ul><ul><ul><li>Testdata by extracting database data into XML files </li></ul></ul><ul><ul><li>Test code to create a lift database for your integration tests </li></ul></ul><ul><li>COW: Lift scaffolding i.e. snippets for CRUD with their corresponding HTML views (list, add, search) </li></ul><ul><li>MOUSE: Model classes containing common Sql Queries </li></ul><ul><li>Third parties: s calate, configgy, dbunit </li></ul>Page 
  5. 5. Live coding Page 
  6. 6. ROADMAP Page 
  7. 7. Support Other Frameworks <ul><li>Play </li></ul><ul><li>Bowler </li></ul><ul><li>A kka-based, e.g. Spray </li></ul><ul><li>Blueeyes </li></ul>Page 
  8. 8. Create own mappings Page 
  9. 9. Refactoring <ul><li>Groovy SQL API: </li></ul><ul><ul><li>Sql.eachRow(GString gstring,Closure metaClosure, Closure rowClosure) </li></ul></ul><ul><li>Scala: </li></ul>Page 
  10. 10. Refactoring, imperative style Page 
  11. 11. Functional Page 
  12. 12. Functional with defaults Page 
  13. 13. Usage of eachRow(resultSet,metaClosure,rowClosure) Page 
  14. 14. Page  ? Do You Have Any Questions? ? ? <ul><li>https ://github.com/ThomasAlexandre/scalafarm.git </li></ul>
  15. 15. list.scaml Page 
  16. 16. Domain Entity Page 
  17. 17. Scalate Template for Domain Entities Page  etc…

×