Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Play! framework について
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yusaku ONO
November 12, 2011
Technology
500
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Play! framework について
2011/11/11 第27回はごー勉強会の発表資料です
Yusaku ONO
November 12, 2011
Transcript
54 slides
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
More Decks by Yusaku ONO
See All by Yusaku ONO
Rubyで日常をちょっとだけたのしくする / Rails Girls Okinawa 1st
yono
0
310
RubyとRubyKaigiがきっかけで沖縄から東京に転職した話/TokyuRubyKaigi2018
yono
2
4.4k
Rails経験者が万葉の新人研修を受けて得られたこと/railsdm2018_day3_extreme
yono
2
5.3k
レガシーRailsアプリとの付き合い方について考える
yono
2
480
Other Decks in Technology
See All in Technology
evcc & Home Assistant
naltatis
0
680
Claude Codeで作ったアプリを安全に公開する/Built with Claude Japan 2026
yoshidashingo
0
240
【Oracle AI SPOTLIGHT ウェビナー】【特別開催:日本語で解説!】Oracle AI World 2026 最新情報フィードバック
oracle4engineer
PRO
1
200
地域社会の実情からITエンジニアの社会貢献を考える
sms_tech
0
170
20261113_JAWS_Osaka
takuyay0ne
0
290
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
410
人間+AIを「チーム」としてプロセスを再設計する
littlehands
1
650
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
120
狙われているAPIの脆弱性!今こそ手をつけるべき根本的な対策とは?
nagix
0
130
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
0
340
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
100
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
320
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Test your architecture with Archunit
thirion
2
2.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
RailsConf 2023
tenderlove
30
1.6k
Ethics towards AI in product and experience design
skipperchong
2
460
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k