[start] playing
DESCRIPTION
「PlayFramework関西ビギナーズ in OsakanSpace 第1回」 http://atnd.org/events/33666 Play frameworkの概要と今後についてゆるく説明して、 Playとそのコミュニティを雰囲気を知っていただこうという趣旨で発表しました。 参加された方の半数がPHPユーザだったので、冒頭でPHPユーザの方向けの説明を特別に入れたりして工夫しています。TRANSCRIPT
> play new
Do you knowWeb Application Framework?
Do you knowPlay!> framework?
Do you knowScala?
’’’
[Start]Playing!
@mumoshu
php
java
scala
js
python
perl
0 5 10 15
# of atnders
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?
Play is
• A web application framework
• Ease common tasks in web dev
Play basics
•Easy start•Simple development•Scala
Play basics
•Easy start•Simple development•Scala
How to start
•Download•Unzip•play new
Play basics
•Easy start•Simple development•Scala
How you develop
•play run•Repeat:•Write code!•F5!
Play basics
•Easy start•Simple development•Scala
Scala
• Run on JVM
• A lot of Java libraries
• Hybrid language
• Imperative programming
• Object oriented programming
• Functional programming
’’’
Whats happy with FP
• Concurrency
• Scalability
Imperative vs Functional
• Imperative Programming
do A -> state++,
do B -> state++, ...
• Functional programming
in1 -> f(x) -> out1in2 -> g(x) -> out2
+ concurrency
Easy concurrency
• Imperative programming
do A -> state <- do B
> sudden conflict!!! <
• Functional programming
in1 -> f(x) -> out1, in2 -> g(x) -> out2 > no conflict!!! <
Easy scalability
• Single Playreq -> acion1(x) -> result
req -> acion2(x) -> result...
• Multiple Play’sreq -> play1 -> result
req -> play2 -> result...
Play basics
•Easy start•Simple development•Scala
Play basics
•Easy start•Simple development•Scala
Hopeful!
Play specifics
•Documented•Translated•Pluggable•Statically Typed
Documented
• 0ver 100 pages
• http://playframework.org/
Play specifics
•Documented•Translated•Pluggable•Statically Typed
Translated
• Over 100 pages
• http://playdocja.appspot.com/
Play specifics
•Documented•Translated•Pluggable•Statically Typed
Pluggable
• 27 plugins
• http://www.playframework.org/documentation/2.0.4/Modules
Plugins
• LESS
• SASS
• CoffeeScript
• TypeScript <- Me
• Velocity <- FuRyu
• Memcached <- Me
• Redis
• MongoDB
• etc.
modern web dev with a lot of plugins
Play specifics
•Documented•Translated•Pluggable•Statically Typed
Statically Typed
• Can be freed from
• null/NULL
• Free from
• ReferenceError
• TypeError
• ‘Call to undefined function’
Statically Typedvs Not ~ ?
• What we GET
if its NOT statically typed
• careless mistakes
• typos
on runtime
You see
NullPointerException
ReferenceError
TypeError
Call to undefined function
Play specifics
•Documented•Translated•Pluggable•Typed
Play specifics
•Documented•Translated•Pluggable•Typed
Productive!
break2/3
WEB+DB vol.71
Play 2.x
• We have Play 1.x, 2.0
• Play 2.1 is coming
Play 1.x
• Written in Java
• Supports Java and Scala
• Since 2009
• Stable
Play 2.0
• Written in Scala
• Supports Scala and Java
• Since 2012
• More scalability
• Typesafe Stack & Typesafe, Inc.
Play 2.1
• Features
• Improvements
• Changes
Play 2.1Features
• Scala 2.10
• Scala’s Promise API
• Better JSON API
• Project templates & Scaffolding
Play 2.1 Improvements
• Run tests in Forked JVM
• Out of memory: PermGen Space
• Faster compile
• thanks to Scala 2.10 & SBT 0.12
Play 2.1Changes
• Anorm to Slick(ScalaQuery)
Play 2.x is
•Active!
Recommendation
• Do you want to:
• write web apps in Java/Scala?
• try modern tech?
> play new
> play new
> play run
[Start]Playing!
@mumoshu
Thank you!