SlideShare a Scribd company logo
1 of 32
GAE/J  簡介 Cloud Tu
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GAE(GoogleAppEngine) 是什麼 ,[object Object],[object Object],[object Object],[object Object],[object Object]
為何選擇 GAE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GAE 支援的程式語言 ,[object Object],[object Object],[object Object],[object Object],[object Object]
事前準備 ,[object Object],[object Object],[object Object],[object Object]
事前準備 ,[object Object],[object Object],[object Object]
快速上手 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
快速上手 ,[object Object]
深入研究 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
深入研究 ( Servlet+Datastore+JUnit+Emma) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
深入研究 (Servlet) ,[object Object]
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
深入研究 ( Datastore) 什麼是 Kind 、 Entity 、 Key 、 Property? User 傳統關聯式資料庫 Datastore User Sport Null Null Favor2 Movie Null Null Favor3 Music Cloud 1 Music Tom 3 Null John 2 Favor1 Name PK Music Favor Cloud Name 1 Key John Name 2 Key Music , Sport , Movie Favor Tom Name 3 Key Kind Table Key PK Property Field Entity Row
深入研究 ( Datastore) DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Entity employee = new Entity("Employee"); employee.setProperty("firstName", "Antonio"); employee.setProperty("lastName", "Salieri"); Date hireDate = new Date(); employee.setProperty("hireDate", hireDate); employee.setProperty("attendedHrTraining", true); datastore.put(employee);  什麼是 Kind 、 Entity 、 Key 、 Property? 在 Entity 的 constructor 中指定。未指定時,系統會自動指派一個 UUID 的 key
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object],[object Object],Query q = new Query("Person"); q.addFilter("lastName",  Query.FilterOperator.EQUAL , lastNameParam); q.addFilter("height",  Query.FilterOperator.LESS_THAN , maxHeightParam); PreparedQuery pq = datastore.prepare(q); pq.asIterable();
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object],[object Object]
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object]
深入研究 ( Datastore) 什麼是 EntityGroup ,有何用處 ? User 自動產生 RootKey ParentKey Cloud Name 1 Key 自動產生 RootKey ParentKey John Name 2 Key 2 ParentKey Mary Name 3 Key 2 ParentKey Mary Name 4 Key 2 ParentKey Joe Name 5 Key A EntityGroup B EntityGroup
深入研究 ( Datastore) Entity parent = new Entity("User"); Entity child1 = new Entity("User", parent.getKey());  Entity child2 = new Entity("User", parent.getKey());  什麼是 EntityGroup ,有何用處 ? Constructor 未指定其 ParentKey 時,系統自動幫你產生一個 RootKey ,[object Object],[object Object]
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object],[object Object]
深入研究 ( Datastore) ,[object Object],[object Object],[object Object],[object Object]
深入研究 ( Datastore) 其實…可以利用 JPA 或 JDO 對 Datastore 進行操作 ! 我個人比較不建議利用此方式 因為…到頭來還是必需深入了解 Datastore 才能解決資料存取層的各種問題
深入研究 (JUnit + Emma) ,[object Object],[object Object]
深入研究 (JUnit) GAE 本身提供模擬 Server 端環境的 MockObject
深入研究 (Emma) 綠色區塊代表已測到部份,紅色則是末測部份 百分比指涵蓋率
[object Object],[object Object],[object Object],[object Object],[object Object],深入研究 (Config) <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <appengine-web-app xmlns=&quot;http://appengine.google.com/ns/1.0&quot;>   <application> application-id </application>   <version> 1 </version> </appengine-web-app>
深入研究 ,[object Object]
GAE 大爆炸 !!!
深入研究 (GAE 的限制 ) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],深入研究 (GAE 的限制 )
[object Object]

More Related Content

Viewers also liked

Google Cloud Platform Qualification Certificate Alpha Yang DA.PDF
Google Cloud Platform Qualification Certificate Alpha Yang DA.PDFGoogle Cloud Platform Qualification Certificate Alpha Yang DA.PDF
Google Cloud Platform Qualification Certificate Alpha Yang DA.PDF
imstand
 
Salary Trends - Analytics
Salary Trends - AnalyticsSalary Trends - Analytics
Salary Trends - Analytics
Vandana Thakur
 

Viewers also liked (10)

Renova LSWT brochure
Renova LSWT brochureRenova LSWT brochure
Renova LSWT brochure
 
Google Cloud Platform Qualification Certificate Alpha Yang DA.PDF
Google Cloud Platform Qualification Certificate Alpha Yang DA.PDFGoogle Cloud Platform Qualification Certificate Alpha Yang DA.PDF
Google Cloud Platform Qualification Certificate Alpha Yang DA.PDF
 
WEB 2.0 ΕΡΓΑΛΕΙΑ ΓΙΑ ΤΗΝ ΕΚΠΑΙΔΕΥΣΗ - ΕΠΙΜΟΡΦΩΤΙΚΟ ΠΡΟΓΡΑΜΜΑ - (Β΄ ΚΥΚΛΟΣ)
WEB 2.0 ΕΡΓΑΛΕΙΑ ΓΙΑ ΤΗΝ ΕΚΠΑΙΔΕΥΣΗ - ΕΠΙΜΟΡΦΩΤΙΚΟ ΠΡΟΓΡΑΜΜΑ - (Β΄ ΚΥΚΛΟΣ)WEB 2.0 ΕΡΓΑΛΕΙΑ ΓΙΑ ΤΗΝ ΕΚΠΑΙΔΕΥΣΗ - ΕΠΙΜΟΡΦΩΤΙΚΟ ΠΡΟΓΡΑΜΜΑ - (Β΄ ΚΥΚΛΟΣ)
WEB 2.0 ΕΡΓΑΛΕΙΑ ΓΙΑ ΤΗΝ ΕΚΠΑΙΔΕΥΣΗ - ΕΠΙΜΟΡΦΩΤΙΚΟ ΠΡΟΓΡΑΜΜΑ - (Β΄ ΚΥΚΛΟΣ)
 
Panel 7 : Base Erosion & Profit Shifting (BEPS) - By Ms. Grace Perez-Navarro
Panel 7 : Base Erosion & Profit Shifting (BEPS) - By Ms. Grace Perez-Navarro Panel 7 : Base Erosion & Profit Shifting (BEPS) - By Ms. Grace Perez-Navarro
Panel 7 : Base Erosion & Profit Shifting (BEPS) - By Ms. Grace Perez-Navarro
 
Habilidades gerenciales
Habilidades gerencialesHabilidades gerenciales
Habilidades gerenciales
 
Salary Trends - Analytics
Salary Trends - AnalyticsSalary Trends - Analytics
Salary Trends - Analytics
 
Jashapara RKM-2016 - Competency model in knowledge management
Jashapara RKM-2016 - Competency model in knowledge managementJashapara RKM-2016 - Competency model in knowledge management
Jashapara RKM-2016 - Competency model in knowledge management
 
Plataformas
PlataformasPlataformas
Plataformas
 
Analisis correlacional
Analisis correlacionalAnalisis correlacional
Analisis correlacional
 
ALDI PPT
ALDI PPTALDI PPT
ALDI PPT
 

Similar to GAE/J 簡介

TeamToy-创新团队的效率工具
TeamToy-创新团队的效率工具TeamToy-创新团队的效率工具
TeamToy-创新团队的效率工具
easychen
 
由一个简单的程序谈起--之四
由一个简单的程序谈起--之四由一个简单的程序谈起--之四
由一个简单的程序谈起--之四
yiditushe
 
旺铺前端设计和实现
旺铺前端设计和实现旺铺前端设计和实现
旺铺前端设计和实现
hua qiu
 
由一个简单的程序谈起――之二
由一个简单的程序谈起――之二由一个简单的程序谈起――之二
由一个简单的程序谈起――之二
yiditushe
 
组件交互模式的非主流研究
组件交互模式的非主流研究组件交互模式的非主流研究
组件交互模式的非主流研究
youalab
 
Spry框架的简单使用小结
Spry框架的简单使用小结Spry框架的简单使用小结
Spry框架的简单使用小结
sunnylqm
 
GTest交流与经验总结
GTest交流与经验总结GTest交流与经验总结
GTest交流与经验总结
coderzh
 

Similar to GAE/J 簡介 (20)

在雲端上啜飲爪哇
在雲端上啜飲爪哇在雲端上啜飲爪哇
在雲端上啜飲爪哇
 
Anroid development part.1
Anroid development part.1Anroid development part.1
Anroid development part.1
 
TeamToy-创新团队的效率工具
TeamToy-创新团队的效率工具TeamToy-创新团队的效率工具
TeamToy-创新团队的效率工具
 
由一个简单的程序谈起--之四
由一个简单的程序谈起--之四由一个简单的程序谈起--之四
由一个简单的程序谈起--之四
 
javascript的分层概念 --- 阿当
javascript的分层概念 --- 阿当javascript的分层概念 --- 阿当
javascript的分层概念 --- 阿当
 
Smart pointer
Smart pointerSmart pointer
Smart pointer
 
旺铺前端设计和实现
旺铺前端设计和实现旺铺前端设计和实现
旺铺前端设计和实现
 
张所勇:前端开发工具推荐
张所勇:前端开发工具推荐张所勇:前端开发工具推荐
张所勇:前端开发工具推荐
 
由一个简单的程序谈起――之二
由一个简单的程序谈起――之二由一个简单的程序谈起――之二
由一个简单的程序谈起――之二
 
component based html5 game engine
component based html5 game enginecomponent based html5 game engine
component based html5 game engine
 
Xml Introduction Practice
Xml Introduction PracticeXml Introduction Practice
Xml Introduction Practice
 
Osgi Intro
Osgi IntroOsgi Intro
Osgi Intro
 
组件交互模式的非主流研究
组件交互模式的非主流研究组件交互模式的非主流研究
组件交互模式的非主流研究
 
SharePoint平台客製與開發-2
SharePoint平台客製與開發-2SharePoint平台客製與開發-2
SharePoint平台客製與開發-2
 
从问题开始,谈前端架构
从问题开始,谈前端架构从问题开始,谈前端架构
从问题开始,谈前端架构
 
Spry框架的简单使用小结
Spry框架的简单使用小结Spry框架的简单使用小结
Spry框架的简单使用小结
 
Python story
Python storyPython story
Python story
 
Html5移动web应用开发(PhoneGap)
Html5移动web应用开发(PhoneGap)Html5移动web应用开发(PhoneGap)
Html5移动web应用开发(PhoneGap)
 
Html5移动web应用开发(PhoneGap)
Html5移动web应用开发(PhoneGap)Html5移动web应用开发(PhoneGap)
Html5移动web应用开发(PhoneGap)
 
GTest交流与经验总结
GTest交流与经验总结GTest交流与经验总结
GTest交流与经验总结
 

GAE/J 簡介

  • 1. GAE/J 簡介 Cloud Tu
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. 深入研究 ( Datastore) 什麼是 Kind 、 Entity 、 Key 、 Property? User 傳統關聯式資料庫 Datastore User Sport Null Null Favor2 Movie Null Null Favor3 Music Cloud 1 Music Tom 3 Null John 2 Favor1 Name PK Music Favor Cloud Name 1 Key John Name 2 Key Music , Sport , Movie Favor Tom Name 3 Key Kind Table Key PK Property Field Entity Row
  • 15. 深入研究 ( Datastore) DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Entity employee = new Entity(&quot;Employee&quot;); employee.setProperty(&quot;firstName&quot;, &quot;Antonio&quot;); employee.setProperty(&quot;lastName&quot;, &quot;Salieri&quot;); Date hireDate = new Date(); employee.setProperty(&quot;hireDate&quot;, hireDate); employee.setProperty(&quot;attendedHrTraining&quot;, true); datastore.put(employee); 什麼是 Kind 、 Entity 、 Key 、 Property? 在 Entity 的 constructor 中指定。未指定時,系統會自動指派一個 UUID 的 key
  • 16.
  • 17.
  • 18.
  • 19. 深入研究 ( Datastore) 什麼是 EntityGroup ,有何用處 ? User 自動產生 RootKey ParentKey Cloud Name 1 Key 自動產生 RootKey ParentKey John Name 2 Key 2 ParentKey Mary Name 3 Key 2 ParentKey Mary Name 4 Key 2 ParentKey Joe Name 5 Key A EntityGroup B EntityGroup
  • 20.
  • 21.
  • 22.
  • 23. 深入研究 ( Datastore) 其實…可以利用 JPA 或 JDO 對 Datastore 進行操作 ! 我個人比較不建議利用此方式 因為…到頭來還是必需深入了解 Datastore 才能解決資料存取層的各種問題
  • 24.
  • 25. 深入研究 (JUnit) GAE 本身提供模擬 Server 端環境的 MockObject
  • 27.
  • 28.
  • 30.
  • 31.
  • 32.