You are on page 1of 28

Using Play! 2.

0 For Building An Insurance Website


Mushtaq Ahmed Shripad Agashe
ThoughtWorks

Introduction to Play!

Brief Demo

Insurance portal

Project Structure

App and test

Builds

functional:test

integration:test

Evolution and i18n

Routes and PRG


POST /logout GET /loggedOut/:role String)
conf/routes

controllers.AuthenticationController.logout controllers.AuthenticationController.loggedOut(role:

app/controllers/AuthenticationController.java

Controllers

app/controllers/RegistrationController.java

Forms

app/controllers/forms/RegistrationForm.java

Templates

app/views/email/forgot_username_email.scala.html

Layout

app/views/email/email_main.scala.html

SOAP Request

app/views/ServiceTemplate/GetEntityDetails.scala.xml

Javascript routes

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

Less

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

EBeans

Static pages
#routes for static page content GET /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)

Orthogonal Concerns

Global

i18n

Form test

Controller test

FakeApplicaion

Template test

FakeContext

Play2.1

Thanks

You might also like