Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Play! framework について
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yusaku ONO
November 12, 2011
Technology
490
1
Share
Play! framework について
2011/11/11 第27回はごー勉強会の発表資料です
Yusaku ONO
November 12, 2011
More Decks by Yusaku ONO
See All by Yusaku ONO
Rubyで日常をちょっとだけたのしくする / Rails Girls Okinawa 1st
yono
0
310
RubyとRubyKaigiがきっかけで沖縄から東京に転職した話/TokyuRubyKaigi2018
yono
2
4.3k
Rails経験者が万葉の新人研修を受けて得られたこと/railsdm2018_day3_extreme
yono
2
5.3k
レガシーRailsアプリとの付き合い方について考える
yono
2
460
Other Decks in Technology
See All in Technology
long-running-tasks
cipepser
3
460
Cloud Run のアップデート 触ってみる&紹介
gre212
0
300
React、まだ楽しくて草
uhyo
7
3.9k
OpenID Connectによるサービス間連携
takesection
0
150
Diagnosing performance problems without the guesswork
elenatanasoiu
0
150
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
5
2.5k
トークン数だけでは測れない — Claude Code 組織展開の効果検証から学んだこと
makikub
0
110
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
17
16k
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
320
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
680
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
130
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
420
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
The agentic SEO stack - context over prompts
schlessera
0
790
Designing for Timeless Needs
cassininazir
1
240
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
230
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
190
Deep Space Network (abreviated)
tonyrice
0
160
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
280
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
Transcript
Play framework について ⼩野 裕作
None
Java
Servelet, JSP を使わない XML を使わない コンパイル不要 設定不要 Eclipse 不要
Ruby on Rails Like
MVC フルスタック コマンドで雛形を⽣成 ディレクトリ構成 ソースコードの修正を即座に反映 テストフレームワークが付属
http://www.playframework.org/
Install
$ wget http://download.playframework.org/releases/play-1.2.3.zip $ unzip play-1.2.3.zip $ export PATH=$PATH:[Playのディレクトリ]
$ export PATH=$PATH:/var/lib/play-1.2.3
Start development
$ play new [プロジェクト名]
$ play new helloworld
$ cd helloworld
app - ソースコード conf - 設定ファイル public - 静的ファイル(CSS, JavaScript,
Image など) test - テスト⽤コード lib - 外部ライブラリ modules - Play! ⽤モジュール logs - ログ tmp - class ファイルなど test-result - テスト結果
Run a app
$ play run
http://localhost:9000
Test
$ play test
http://localhost:9000/@tests
$ play auto-test
Coverage
$ play install cobertura $ vim conf/dependencies.yml # Application dependencies
require: - play -> cobertura 2.4 $ play dependencies --forceCopy
$ play auto-test $ open test-result/code-coverage/index.html
Other
$ play help
http://localhost:9000/@documentation
Eclipse
$ play eclipsify $ cp $PLAY_INSTALLED_DIR/support/eclipse/org.playframework.playclipse_0.7.0.ja $ECLIPSE/dropins/
Scaffold
Rails との違い 標準機能ではない(モジュール) Model は⼿動で作成 Model を基に Controller, View を⽣成
login 処理を⽣成
$ play install scaffold
$ vim conf/dependencies.yml # Application dependencies require: - play ->
scaffold 0.1 - play -> secure
$ play dependencies --forceCopy
--forceCopy の有無 有: play のインストールディレクトリ以下に配置 無: プロジェクト以下に配置
$ vim conf/application.conf $ db=mem
Model を⽤意する チュートリアルの Model User.java Post.java Comment.java Tag.java
None
$ play scaffold:gen --with-layout --with-login --overwrite
$ play scaffold:gen --with-layout --with-login --overwrite
http://play-scaffold.herokuapp.com/
Deploy apps to heroku
$ vim Procfile web: play run --http.port=$PORT $PLAY_OPTS
$ vim .gitignore /lib /tmp /modules /test-result /logs /eclipse
$ git init $ git add . $ git commit
-m 'first commit'
$ heroku create --stack cedar
$ git push heroku master
DB: PostgreSQL conf/application.conf を変更 User クラスはテーブル名を変えておく
まとめ Java らしくない Java Web Framework RoR Like で⾼速な開発 heroku
対応で簡単なデプロイ
None
Play Scala http://playscala.appspot.com
$ play install scala $ play new helloscala --with scala
None