play framework on google app engine
DESCRIPTION
Brief introduction of Google App Engine and Play Framework.Step-by-step instruction to develop and deploy play! web App on GAE with Siena persistence layer, CRUD management interface and login support.TRANSCRIPT
Play! on Google App Engine
gasolin@ 2011/7/20
1
About me
Organizer
ista
www.gasolin.idv.tw
Web Framework
2
About me
Organizer
ista
www.gasolin.idv.tw
Web Framework
Java
2
About me
Organizer
ista
www.gasolin.idv.tw
Web Framework
Java
App Engine
2
Google App Engine
3
Google Cloud Services
4
http://code.google.com/intl/en/appengine/
5
6
7
8
Framework
9
• Open Source
• Java ecosystem
• Simple
• IDE friendly
• Modulize
10
Reuse Libraries
11
Web framework
12
Web framework
Developerswrite whatthey matters
12
Modules www.playframework.org/modules/
13
Modules www.playframework.org/modules/
13
Documents Cheat Sheet
http://www.playframework.org/documentation/1.2.2/cheatsheet/templates14
Jobs
• Bootstrap Jobs
• Scheduled Jobs
• Suspendable Requests
Run in other threads
15
16
Play! on Google App Engine
17
$ play new taipei-gtug(project name)
Create new Project
18
CommandLine tool
19
CommandLine tool
19
$ play run
Running Project
20
localhost:9000
Welcome Page
21
Add Module Dependency
22
Add Module Dependency
$ play install gae 1.4$ play deps (module version)
22
$ play eclipsify
IDE integration
(idealize)
(netbeansify)
23
Structure
24
mvc
Structure
24
modules
Structure
24
route conf
Structure
24
static files
Structure
24
Route
25
Route
25
Controller-View Mapping
26
Controller-View Mapping
26
Controller-View Mapping
26
Controller-View Mapping
26
$ play test
Test Project on Web
27
Tests Runner: localhost:9000/@tests
28
Deploy
$ play gae:deploy --gae=(path)
30
Deploy
$ play gae:deploy --gae=(path)
Change Deploy Version
30
Edit Template
Google+1 APIhttp://code.google.com/intl/zh-TW/apis/+1button/
31
Live Result on GAE
32
Use Persistence Layer(siena module)
33
Create Model
34
Create Model
id
34
Create Model
columns
34
Create Model
helper
34
Modify Controller
35
Modify Template
36
Setup Scaffold(crudsiena module)
37
Setup Scaffold
Name convention
(crudsiena module)
37
Setup Scaffold(crudsiena module)
37
CRUD interface
38
CRUD Editor
39
Live Result on GAE
40
Protect contents(secure module)
41
Setup secure
42
Setup secure
42
43
Login
44
That’s it.Build your own!
45
Resources
• http://www.slideshare.net/areelsen/introduction-playframework
• http://goo.gl/DZ7wz
46