SlideShare a Scribd company logo
1 of 32
Google App Engine
  with Gaelyk
 Easy cloud development. Or why using
   Gaelyk is like cheating the cloud
          development game.
About me
#java #groovy #grails
#android #iphone-dev
#clojure #lisp
#agile
#ruby #jruby #macruby
#favoriteMedium #software_architect
#cloud #gae
Cloud computing?
Teach Yourself Gaelyk
          in 30 minutes


• Introduction to Google App Engine
• Overview of Gaelyk
• Getting Started
• Future of GAE and Gaelyk
http://gaelyk.appspot.com
Guillaume Laforge
  Head of Groovy
  Development at SpringSource


http://www.slideshare.net/glaforge
Software as a Service
       Gmail, SalesForce




Platform as a Service
      Google App Engine




Infrastructure as a Service
      Amazon EC2, Azure
Platform as a Service
     Google App Engine
Gaelyk Services
• Template pages
• Datastore (similar to NoSQL)
• Email
• XMPP (Jabber e.g., Gtalk)
• Multi-tenant(namespace)
• Caching (Memcache)
• Download “gaelyk-template-project”
• Create groovy class
• Create gtpl template pages
• dev_appserver.sh war
• http://localhost:8080/
Gaelyk Directory Structure
URL Routing


/ Simple URL routings config in routes.groovy
 /

get "/about", redirect: "/general/about.html"
URL Routing

/ Advance URL routings config in routes.groovy
 /
get “/project/@id”, forward: “/project.groovy?id=@id”
get “/delete/@id”, forward: “/delete.groovy?id=@id”
get “/more/*”, forward: ”/more.groovy”

/ More involved example
 /
get “/edit/@project/@id”, forward: “/edit.groovy?id=@id&project=@project”
Controller

/ Simple Groovlet controller
 /
def name = params.name
def now = new Date()

request.now = now
request.name = name

forward “hello.gtpl”
Views/Templates

<body>

  <%
       def name = params.name
       def message = "Hi ${name} Hello World!"
  %>

  <p> ${message} </p>

</body>
Views/Templates (2)

<%
     def user = session.user
%>
<html>
   <body>
      <% if (user) { %>
        <p>You are currently logged in.</p>
      <% } else { %>
        <p>You're not logged in.</p>
      <% } %>
   </body>
</html>
Datastore (1)

/ Create and save entity data
 /
def project = new Entity(“project”)
project.name = “Kickass Web Application”
project.owner = bob.key.id
project.createdDate = new Date()
project.save()
Datastore (2)

def project = new Entity(“project”)
project.name = “Kickass Web Application”
project.owner = bob.key.id
project.createdDate = new Date()
project.save()
//...sometime to delete data
project.delete()
Datastore (3)

/ Querying data
 /
def query = new Query(“project”)

query.addSort(“createdDate”, SortDirection.DESCENDING)
query.addFilter(“name”, FilterOperator.EQUAL, “Kickass Project”)

def preparedQuery = datastore.prepare(query)
def results = preparedQuery.adList( withLimit(20) )
Datastore (4)

/ Querying data with more Groovy meta-programming
 /
def query = new Query(“project”)
                 .addSort(“createdDate”,
                 SortDirection.DESCENDING)
                 .addFilter(“name”, FilterOperator.EQUAL,
                 “Kickass Project”)

def results = datastore.prepare(query).asList( withLimit(20) )
Datastore (5)

/ Latest Query DSL -- Not release yet
 /

 'SELECT * FROM projects
   WHERE name = “Kickass Project”
    ORDER BY createdDate DESC'
<!-- Making use of results from controller -->

<% def results = request.results %>
<ul>
! <% results.each { result -> %>
! ! <li>
! ! ! ${result.name}
! ! </li>
! <% } %>
</ul>
Datastore (4)
/ Create and save entity data
 /
/ in “Project X” context
 /

namespace.of(“projectX”) {
   def project = new Entity(“project”)
   project.name = “Kickass Web Application”
   project.owner = bob.key.id
   project.createdDate = new Date()
   project.save()
}
Email
/ Sending email
 /

mail.send from: "app-admin-email@gmail.com",
 to: "recipient@somecompany.com",
 subject: "Re: Invoice",
 textBody: "Hi, here’s the latest invoice",
 attachment: [data: "Latest Invoice , fileName:
 "invoice.doc"]
Deployment


/ Running on local for development
 /
dev_appserver.sh war

/ Deploy to GAE
 /
appcfg.sh update war
Showcase: AndroidRockeeet
• AndroidRockeeet.appspot.com
• Android deployment tool
• From concept to 1st deploy = 5 hours
• Beta testing now
• Never concerned about scaling
What’s missing from this talk?


          Plugins
           Billing
           Quota
        Advance API
   Apps market integration
             ...
Google App Engine with Gaelyk

More Related Content

What's hot

Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12
Stephan Hochdörfer
 
Polymer
Polymer Polymer
Polymer
jskvara
 
Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3
Angela Zoss
 

What's hot (20)

An Overview of Models in Django
An Overview of Models in DjangoAn Overview of Models in Django
An Overview of Models in Django
 
Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12
 
Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14
 
Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)
 
Chatbot - The developer's waterboy
Chatbot - The developer's waterboyChatbot - The developer's waterboy
Chatbot - The developer's waterboy
 
Slides
SlidesSlides
Slides
 
Web Components
Web ComponentsWeb Components
Web Components
 
10. Imagini in MongoDB
10. Imagini in MongoDB10. Imagini in MongoDB
10. Imagini in MongoDB
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Polymer
Polymer Polymer
Polymer
 
Resource Oriented Design
Resource Oriented DesignResource Oriented Design
Resource Oriented Design
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 mins
 
Introduction to polymer project
Introduction to polymer projectIntroduction to polymer project
Introduction to polymer project
 
Django
DjangoDjango
Django
 
Polymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill LibraryPolymer, A Web Component Polyfill Library
Polymer, A Web Component Polyfill Library
 
Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3
 
Neos CMS and SEO
Neos CMS and SEONeos CMS and SEO
Neos CMS and SEO
 
Why Django
Why DjangoWhy Django
Why Django
 
How I Became a WordPress Hacker
How I Became a WordPress HackerHow I Became a WordPress Hacker
How I Became a WordPress Hacker
 

Viewers also liked

Archives International Auctions Sale 37
Archives International Auctions Sale 37Archives International Auctions Sale 37
Archives International Auctions Sale 37
Archives International Auctions
 
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
Ayuntamiento del Valle de Mena
 
Log Engineering: Towards Systematic Log Mining to Support the Development of ...
Log Engineering: Towards Systematic Log Mining to Support the Development of ...Log Engineering: Towards Systematic Log Mining to Support the Development of ...
Log Engineering: Towards Systematic Log Mining to Support the Development of ...
SAIL_QU
 

Viewers also liked (20)

Archives International Auctions Sale 37
Archives International Auctions Sale 37Archives International Auctions Sale 37
Archives International Auctions Sale 37
 
Flash8 serial key
Flash8 serial keyFlash8 serial key
Flash8 serial key
 
Resume
ResumeResume
Resume
 
Tutkimusdatakysely Helsingin yliopiston tutkijoille 2016
Tutkimusdatakysely Helsingin yliopiston tutkijoille 2016Tutkimusdatakysely Helsingin yliopiston tutkijoille 2016
Tutkimusdatakysely Helsingin yliopiston tutkijoille 2016
 
Digital analytics: Tableau (Lecture 6)
Digital analytics: Tableau (Lecture 6)Digital analytics: Tableau (Lecture 6)
Digital analytics: Tableau (Lecture 6)
 
PMABeverly
PMABeverlyPMABeverly
PMABeverly
 
É uma viagem
É uma viagemÉ uma viagem
É uma viagem
 
Escrito poveda Playas del Vicario
Escrito poveda Playas del VicarioEscrito poveda Playas del Vicario
Escrito poveda Playas del Vicario
 
PresentacióN1
PresentacióN1PresentacióN1
PresentacióN1
 
Hallwaze lends a helping hand to ..
Hallwaze lends a helping hand to ..Hallwaze lends a helping hand to ..
Hallwaze lends a helping hand to ..
 
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
Bases para la plaza de Operario Servicios Múltiples - Jardinería (2013)
 
Why halwaze
Why halwaze Why halwaze
Why halwaze
 
Archives International Auctions Sale 36 U.S. & Worldwide Scripophily, Banknotes
Archives International Auctions Sale 36 U.S. & Worldwide Scripophily, BanknotesArchives International Auctions Sale 36 U.S. & Worldwide Scripophily, Banknotes
Archives International Auctions Sale 36 U.S. & Worldwide Scripophily, Banknotes
 
I Simply Excel
I Simply ExcelI Simply Excel
I Simply Excel
 
Oracle Commerce as a Secure, Scalable Hybrid Cloud Service, webinar slides
Oracle Commerce as a Secure,  Scalable Hybrid Cloud Service, webinar slidesOracle Commerce as a Secure,  Scalable Hybrid Cloud Service, webinar slides
Oracle Commerce as a Secure, Scalable Hybrid Cloud Service, webinar slides
 
Social selling - Miten tehdä sosiaalista myyntiä?
Social selling - Miten tehdä sosiaalista myyntiä?Social selling - Miten tehdä sosiaalista myyntiä?
Social selling - Miten tehdä sosiaalista myyntiä?
 
Log Engineering: Towards Systematic Log Mining to Support the Development of ...
Log Engineering: Towards Systematic Log Mining to Support the Development of ...Log Engineering: Towards Systematic Log Mining to Support the Development of ...
Log Engineering: Towards Systematic Log Mining to Support the Development of ...
 
Introduction to ayurveda
Introduction to ayurveda Introduction to ayurveda
Introduction to ayurveda
 
WHO Guidance on HVAC Systems for Non Sterile Pharmaceuticals
WHO Guidance on HVAC  Systems for Non Sterile PharmaceuticalsWHO Guidance on HVAC  Systems for Non Sterile Pharmaceuticals
WHO Guidance on HVAC Systems for Non Sterile Pharmaceuticals
 
JW Marriott Mumbai Sahar Social Media Campaign Report
JW Marriott Mumbai Sahar Social Media Campaign ReportJW Marriott Mumbai Sahar Social Media Campaign Report
JW Marriott Mumbai Sahar Social Media Campaign Report
 

Similar to Google App Engine with Gaelyk

Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
Mike Hugo
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
helenmga
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_libraries
NCCOMMS
 

Similar to Google App Engine with Gaelyk (20)

Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Boost your testing: End-to-End with Docker and Geb
 Boost your testing: End-to-End with Docker and Geb Boost your testing: End-to-End with Docker and Geb
Boost your testing: End-to-End with Docker and Geb
 
Web Components With Rails
Web Components With RailsWeb Components With Rails
Web Components With Rails
 
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelComprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Design Tips & Development with jQuery Mobile and PhoneGap
Design Tips & Development with jQuery Mobile and PhoneGapDesign Tips & Development with jQuery Mobile and PhoneGap
Design Tips & Development with jQuery Mobile and PhoneGap
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_libraries
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using Django
 
Web development - technologies and tools
Web development - technologies and toolsWeb development - technologies and tools
Web development - technologies and tools
 

More from Choong Ping Teo (6)

Launchstack Manifesto
Launchstack ManifestoLaunchstack Manifesto
Launchstack Manifesto
 
Problem solving tools
Problem solving toolsProblem solving tools
Problem solving tools
 
App script
App scriptApp script
App script
 
Software Developer Guide to Nootropics
Software Developer Guide to NootropicsSoftware Developer Guide to Nootropics
Software Developer Guide to Nootropics
 
Social Hacking
Social HackingSocial Hacking
Social Hacking
 
Open Source Software Development Practices that Works
Open Source Software Development Practices that WorksOpen Source Software Development Practices that Works
Open Source Software Development Practices that Works
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Google App Engine with Gaelyk

  • 1. Google App Engine with Gaelyk Easy cloud development. Or why using Gaelyk is like cheating the cloud development game.
  • 2. About me #java #groovy #grails #android #iphone-dev #clojure #lisp #agile #ruby #jruby #macruby #favoriteMedium #software_architect #cloud #gae
  • 4. Teach Yourself Gaelyk in 30 minutes • Introduction to Google App Engine • Overview of Gaelyk • Getting Started • Future of GAE and Gaelyk
  • 5.
  • 7. Guillaume Laforge Head of Groovy Development at SpringSource http://www.slideshare.net/glaforge
  • 8. Software as a Service Gmail, SalesForce Platform as a Service Google App Engine Infrastructure as a Service Amazon EC2, Azure
  • 9. Platform as a Service Google App Engine
  • 10. Gaelyk Services • Template pages • Datastore (similar to NoSQL) • Email • XMPP (Jabber e.g., Gtalk) • Multi-tenant(namespace) • Caching (Memcache)
  • 11.
  • 12. • Download “gaelyk-template-project” • Create groovy class • Create gtpl template pages • dev_appserver.sh war • http://localhost:8080/
  • 14. URL Routing / Simple URL routings config in routes.groovy / get "/about", redirect: "/general/about.html"
  • 15. URL Routing / Advance URL routings config in routes.groovy / get “/project/@id”, forward: “/project.groovy?id=@id” get “/delete/@id”, forward: “/delete.groovy?id=@id” get “/more/*”, forward: ”/more.groovy” / More involved example / get “/edit/@project/@id”, forward: “/edit.groovy?id=@id&project=@project”
  • 16. Controller / Simple Groovlet controller / def name = params.name def now = new Date() request.now = now request.name = name forward “hello.gtpl”
  • 17. Views/Templates <body> <% def name = params.name def message = "Hi ${name} Hello World!" %> <p> ${message} </p> </body>
  • 18. Views/Templates (2) <% def user = session.user %> <html> <body> <% if (user) { %> <p>You are currently logged in.</p> <% } else { %> <p>You're not logged in.</p> <% } %> </body> </html>
  • 19. Datastore (1) / Create and save entity data / def project = new Entity(“project”) project.name = “Kickass Web Application” project.owner = bob.key.id project.createdDate = new Date() project.save()
  • 20. Datastore (2) def project = new Entity(“project”) project.name = “Kickass Web Application” project.owner = bob.key.id project.createdDate = new Date() project.save() //...sometime to delete data project.delete()
  • 21. Datastore (3) / Querying data / def query = new Query(“project”) query.addSort(“createdDate”, SortDirection.DESCENDING) query.addFilter(“name”, FilterOperator.EQUAL, “Kickass Project”) def preparedQuery = datastore.prepare(query) def results = preparedQuery.adList( withLimit(20) )
  • 22. Datastore (4) / Querying data with more Groovy meta-programming / def query = new Query(“project”) .addSort(“createdDate”, SortDirection.DESCENDING) .addFilter(“name”, FilterOperator.EQUAL, “Kickass Project”) def results = datastore.prepare(query).asList( withLimit(20) )
  • 23. Datastore (5) / Latest Query DSL -- Not release yet /  'SELECT * FROM projects WHERE name = “Kickass Project” ORDER BY createdDate DESC'
  • 24. <!-- Making use of results from controller --> <% def results = request.results %> <ul> ! <% results.each { result -> %> ! ! <li> ! ! ! ${result.name} ! ! </li> ! <% } %> </ul>
  • 25. Datastore (4) / Create and save entity data / / in “Project X” context / namespace.of(“projectX”) { def project = new Entity(“project”) project.name = “Kickass Web Application” project.owner = bob.key.id project.createdDate = new Date() project.save() }
  • 26. Email / Sending email / mail.send from: "app-admin-email@gmail.com", to: "recipient@somecompany.com", subject: "Re: Invoice", textBody: "Hi, here’s the latest invoice", attachment: [data: "Latest Invoice , fileName: "invoice.doc"]
  • 27. Deployment / Running on local for development / dev_appserver.sh war / Deploy to GAE / appcfg.sh update war
  • 29.
  • 30. • AndroidRockeeet.appspot.com • Android deployment tool • From concept to 1st deploy = 5 hours • Beta testing now • Never concerned about scaling
  • 31. What’s missing from this talk? Plugins Billing Quota Advance API Apps market integration ...

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n