[start] playing

55
> play new

Upload: yusuke-kuoka

Post on 02-Jul-2015

1.469 views

Category:

Technology


1 download

DESCRIPTION

「PlayFramework関西ビギナーズ in OsakanSpace 第1回」 http://atnd.org/events/33666 Play frameworkの概要と今後についてゆるく説明して、 Playとそのコミュニティを雰囲気を知っていただこうという趣旨で発表しました。 参加された方の半数がPHPユーザだったので、冒頭でPHPユーザの方向けの説明を特別に入れたりして工夫しています。

TRANSCRIPT

Page 1: [Start] Playing

> play new

Page 2: [Start] Playing

Do you knowWeb Application Framework?

Page 3: [Start] Playing

Do you knowPlay!> framework?

Page 4: [Start] Playing

Do you knowScala?

’’’

Page 5: [Start] Playing

[Start]Playing!

@mumoshu

Page 6: [Start] Playing

php

java

scala

js

python

perl

0 5 10 15

# of atnders

Page 7: [Start] Playing

PHP vs Play

CakePHP

Symfony

Slim

Play!>

PHP

<- thin rich ->

CakePHPCakePHPCakePHP

Play!>Play!>

Symfony

CakePHP

Play!>

Symfony

CakePHP

Play!>

Symfony

CakePHP

Play!>

Symfony

CakePHP

Play!>

Symfony

CakePHP

Play!>

naked?

Page 8: [Start] Playing

Play is

• A web application framework

• Ease common tasks in web dev

Page 9: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Page 10: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Page 11: [Start] Playing

How to start

•Download•Unzip•play new

Page 12: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Page 13: [Start] Playing

How you develop

•play run•Repeat:•Write code!•F5!

Page 14: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Page 15: [Start] Playing

Scala

• Run on JVM

• A lot of Java libraries

• Hybrid language

• Imperative programming

• Object oriented programming

• Functional programming

’’’

Page 16: [Start] Playing

Whats happy with FP

• Concurrency

• Scalability

Page 17: [Start] Playing

Imperative vs Functional

• Imperative Programming

do A -> state++,

do B -> state++, ...

• Functional programming

in1 -> f(x) -> out1in2 -> g(x) -> out2

Page 18: [Start] Playing

+ concurrency

Page 19: [Start] Playing

Easy concurrency

• Imperative programming

do A -> state <- do B

> sudden conflict!!! <

• Functional programming

in1 -> f(x) -> out1, in2 -> g(x) -> out2 > no conflict!!! <

Page 20: [Start] Playing

Easy scalability

• Single Playreq -> acion1(x) -> result

req -> acion2(x) -> result...

• Multiple Play’sreq -> play1 -> result

req -> play2 -> result...

Page 21: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Page 22: [Start] Playing

Play basics

•Easy start•Simple development•Scala

Hopeful!

Page 23: [Start] Playing

break1/3

http://pf.gree.jp/56616

 ビースト★ハーレム~野獣の甘噛み~

Page 24: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Statically Typed

Page 25: [Start] Playing

Documented

• 0ver 100 pages

• http://playframework.org/

Page 26: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Statically Typed

Page 27: [Start] Playing

Translated

• Over 100 pages

• http://playdocja.appspot.com/

Page 28: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Statically Typed

Page 30: [Start] Playing

Plugins

• LESS

• SASS

• CoffeeScript

• TypeScript <- Me

• Velocity <- FuRyu

• Memcached <- Me

• Redis

• MongoDB

• etc.

modern web dev with a lot of plugins

Page 31: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Statically Typed

Page 32: [Start] Playing

Statically Typed

• Can be freed from

• null/NULL

• Free from

• ReferenceError

• TypeError

• ‘Call to undefined function’

Page 33: [Start] Playing

Statically Typedvs Not ~ ?

• What we GET

if its NOT statically typed

Page 34: [Start] Playing

• careless mistakes

• typos

on runtime

You see

Page 35: [Start] Playing

NullPointerException

Page 36: [Start] Playing

ReferenceError

Page 37: [Start] Playing

TypeError

Page 38: [Start] Playing

Call to undefined function

Page 39: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Typed

Page 40: [Start] Playing

Play specifics

•Documented•Translated•Pluggable•Typed

Productive!

Page 41: [Start] Playing

break2/3

WEB+DB vol.71

Page 42: [Start] Playing

Play 2.x

• We have Play 1.x, 2.0

• Play 2.1 is coming

Page 43: [Start] Playing

Play 1.x

• Written in Java

• Supports Java and Scala

• Since 2009

• Stable

Page 44: [Start] Playing

Play 2.0

• Written in Scala

• Supports Scala and Java

• Since 2012

• More scalability

• Typesafe Stack & Typesafe, Inc.

Page 45: [Start] Playing

Play 2.1

• Features

• Improvements

• Changes

Page 46: [Start] Playing

Play 2.1Features

• Scala 2.10

• Scala’s Promise API

• Better JSON API

• Project templates & Scaffolding

Page 47: [Start] Playing

Play 2.1 Improvements

• Run tests in Forked JVM

• Out of memory: PermGen Space

• Faster compile

• thanks to Scala 2.10 & SBT 0.12

Page 48: [Start] Playing

Play 2.1Changes

• Anorm to Slick(ScalaQuery)

Page 49: [Start] Playing

Play 2.x is

•Active!

Page 50: [Start] Playing

Recommendation

• Do you want to:

• write web apps in Java/Scala?

• try modern tech?

Page 51: [Start] Playing

> play new

Page 52: [Start] Playing

> play new

Page 53: [Start] Playing

> play run

Page 54: [Start] Playing

[Start]Playing!

@mumoshu

Page 55: [Start] Playing

Thank you!