play framework 2

Post on 27-Nov-2014

77 Views

Category:

Software

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

The JOIN Event presentation about Play Framework 2.

TRANSCRIPT

1

Play Framework 2Yannick De Turck

16/10/2014

2

Play, just another web framework?

Based on a lightweight, stateless and web-friendly architecture High scalability

Develop in Scala and/or Java

Developer friendly

- Focus on productivity

- Only need a texteditor and browser

- Hit refresh workflow

- Type safety

Open Source

Inspired on Rails and Django

3

Who uses Play?

4

MVC architecture

Model (Java and/or Scala)

Controller (Java and/or Scala)

View (templates, HTML and Scala)

Routes

- Mapping url paths and Controllers

5

Type Safety

Majority of code gets compiled including:

- Templates

- Assets (Coffeescript, LESS)

Detect errors as early as possible

6

Conventions of configurations

Vast structure

A lot of functionalities come with the core bundle

7

build.sbt

8

app/models

9

app/controllers

10

app/views

11

conf/application.config

12

conf/messages

13

conf/routes

14

Hot reloading

Start server once

Make code change

Hit F5 in browser

Change is live!

15

Errors displayed in browser

Compilation and runtime errors are displayed in browser

Go fix and hit F5!

16

Database evolutions

Track your database schema changes

Robust way to update PROD schema

Two sections

- Ups (create, insert,…)

- Downs (drop, delete,…)

Number files (1.sql, 2.sql,…)

Automatically or manually executed

17

Setting up Play

Download at https://www.playframework.com/download

Add to PATH

Verify set up correctly via activator -help

18

Creating a new project

Via terminal/console:

- activator new

- Choose template/seed

- Pick a name

19

Creating a new project

Via UI:

- activator ui

- Pick seed

- Choose locationfor the project

20

Creating a new project

Generate project files for your favourite IDE

- IntelliJ: activator idea

- Eclipse: activator eclipse

Open the project in your favourite IDE

22

Follow tutorials

23

Personal experience

Refreshing and very pleasant to work with

Go with Scala instead of Java

Hot reloading is awesome

Helpful community

Actively being worked on

24

Q&A

top related