indic threads pune12-using play2.0 for building an insurance website

28
Using Play! 2.0 For Building An Insurance Website Mushtaq Ahmed Shripad Agashe ThoughtWorks

Upload: indicthreads

Post on 15-May-2015

461 views

Category:

Documents


1 download

DESCRIPTION

The 7th Annual IndicThreads Pune Conference was held on 14-15 December 2012. http://pune12.indicthreads.com/

TRANSCRIPT

Page 1: Indic threads pune12-using play2.0 for building an insurance website

Using Play! 2.0 For Building An Insurance Website

Mushtaq Ahmed Shripad Agashe

ThoughtWorks

Page 2: Indic threads pune12-using play2.0 for building an insurance website

Introduction to Play!

Page 3: Indic threads pune12-using play2.0 for building an insurance website

Brief Demo

Page 4: Indic threads pune12-using play2.0 for building an insurance website

Insurance portal

Page 5: Indic threads pune12-using play2.0 for building an insurance website

Project Structure

Page 6: Indic threads pune12-using play2.0 for building an insurance website

App and test

Page 7: Indic threads pune12-using play2.0 for building an insurance website

functional:test

integration:test

Builds

Page 8: Indic threads pune12-using play2.0 for building an insurance website

Evolution and i18n

Page 9: Indic threads pune12-using play2.0 for building an insurance website

POST /logout controllers.AuthenticationController.logoutGET /loggedOut/:role controllers.AuthenticationController.loggedOut(role:String)

conf/routes

app/controllers/AuthenticationController.java

Routes and PRG

Page 10: Indic threads pune12-using play2.0 for building an insurance website

app/controllers/RegistrationController.java

Controllers

Page 11: Indic threads pune12-using play2.0 for building an insurance website

app/controllers/forms/RegistrationForm.java

Forms

Page 12: Indic threads pune12-using play2.0 for building an insurance website

app/views/email/forgot_username_email.scala.html

Templates

Page 13: Indic threads pune12-using play2.0 for building an insurance website

app/views/email/email_main.scala.html

Layout

Page 14: Indic threads pune12-using play2.0 for building an insurance website

app/views/ServiceTemplate/GetEntityDetails.scala.xml

SOAP Request

Page 15: Indic threads pune12-using play2.0 for building an insurance website

public static Result javascriptRoutes() { response().setContentType("text/javascript"); return ok( Routes.javascriptRouter("jsRoutes", controllers.routes.javascript.Projects.add(), controllers.routes.javascript.Projects.delete(), controllers.routes.javascript.Projects.rename(), controllers.routes.javascript.Projects.addGroup() ) );}

newProject: (e) -> @el.removeClass("closed") jsRoutes.controllers.Projects.add().ajax

Javascript routes

Page 16: Indic threads pune12-using play2.0 for building an insurance website

lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" * "*.less")

Less

Page 17: Indic threads pune12-using play2.0 for building an insurance website

EBeans

Page 18: Indic threads pune12-using play2.0 for building an insurance website

#routes for static page contentGET /static/aboutsite/:fname controllers.StaticLayout.getAboutSitePage(rootFolder="aboutSiteContent",fname:String)GET /static/aboutus/:fname controllers.StaticLayout.getAboutUsPage(rootFolder = "aboutUsContent",fname:String)GET /static/faq/:fname controllers.StaticLayout.getFAQPage(rootFolder = "faqContent",fname:String)

Static pages

Page 19: Indic threads pune12-using play2.0 for building an insurance website

Orthogonal Concerns

Page 20: Indic threads pune12-using play2.0 for building an insurance website

Global

Page 21: Indic threads pune12-using play2.0 for building an insurance website

i18n

Page 22: Indic threads pune12-using play2.0 for building an insurance website

Form test

Page 23: Indic threads pune12-using play2.0 for building an insurance website

Controller test

Page 24: Indic threads pune12-using play2.0 for building an insurance website

FakeApplicaion

Page 25: Indic threads pune12-using play2.0 for building an insurance website

Template test

Page 26: Indic threads pune12-using play2.0 for building an insurance website

FakeContext

Page 27: Indic threads pune12-using play2.0 for building an insurance website

Play2.1

Page 28: Indic threads pune12-using play2.0 for building an insurance website

Thanks