Your SlideShare is downloading. ×
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google Developers Group, Web & Coding Club
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google Developers Group, Web & Coding Club

9,773
views

Published on

Published in: Technology, News & Politics

1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
9,773
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction To Google app engine
  • 2. About speaker Speaker: NAGA ROHIT S COnTACT: snagarohit@gmail.com education: Final Year Under Graudate, Department of CSE, Indian Institute of Technology GuwahatiExperience: The speaker has explored about an year developing applications on Google App Engine.
  • 3. What we will learn today• Why Cloud ?• Platform as a Service• Who are in the race ? • Why Google App Engine is the Ge3k’s choice ?• Languages Supported• Getting Started• Hello World App• Frameworks • Webapp Framework• Users API• Handling GET & POST • Guest Book App• What’s Next ? • BigTable • GQL (Not SQL) INTRODUCTION • Static Content • Templates & Stuff• Creating & Uploading Your Application• Problems with IITG Proxy• Problems Patched 
  • 4. Why cloud ?• Scalability• Redundancy• Security• High Initial Investment• Pay As You Grow• Pay only for What You Use•…• Cloud is the future of Internet
  • 5. Platform as a service
  • 6. Who are in the race ?• Microsoft Azure  (not free)• Amazon AWS  (free + meh! :P)• Google App Engine  (free + awesome)•…•…
  • 7. Languages supported• PYTHON [2.5 + 2.7]• GO [EXPERIMENTAL]• JAVA [JAVA 6 JVM]
  • 8. Getting started• Minimum Requirements • Python 2.5+ • Linux (Windows Fan? Sorry, You are alone )•Download App Engine SDK https://developers.google.com/appengine/downloads [Google App Engine SDK for Python]• Extract SDK• cd to google_appengine• Lock and Load!
  • 9. Hello world app• Inside the google_appengine directory, create a directory with the name helloworld• Create a file named helloworld.py inside helloworld directory.google_appengine/helloworld/helloworld.py: HTTP Header. Never mind! Just accept that you need to write this line when you want to print to the client’s browser This actually goes to the browser
  • 10. Hello world app• App engine application has a configuration file called app.yaml which tells the app engine about the application being developed and its configuration.• Create a file app.yaml in the helloworld directory.• Wait! What is YAML ? • YAML Ain’t Markup Language • Yet Another Markup Language In short, it’s a more human readable form of data storage.
  • 11. Hello world appgoogle_appengine/helloworld/app.yaml: Application Identifier Version of the Application you are building Python/Java/Go/whatever Google API version that this application is built on. Basically this is for supporting legacy applications in case APIs change Handles every request of http://localhost/<AnyJunkHere> The script which needs to be run for the above handle match
  • 12. Hello world app• Summarizing,google_appengine/helloworld/ • helloworld.py • app.yaml• Now, RUN!$ ~/google_appengine/dev_appserver.py helloworld/ Starts the server by default on Folder in which the app.yaml port 8080. Can be changed by file for helloworld application resides command line options
  • 13. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  • 14. Framework support• Supports any Python-CGI Framework including • Django • CherryPy • Pylons • Web2Py• Natively supports webapp Framework.
  • 15. Webapp frameworkgoogle_appengine/helloworld/helloworld.py: Import webapp and run_wsgi_app modules Set HeadersHTTP Get Request Print this to browser URL Match Handling Class
  • 16. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  • 17. USERS API• Users API uses Google Accounts Sign-Ingoogle_appengine/helloworld/helloworld.py: Import users module If user signs himself using Google Accounts to your web site, do the following Otherwise, redirect to Sign-In/Sign-Up powered by Google Accounts
  • 18. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  • 19. Guest book app (hadnling forms)google_appengine/helloworld/helloworld.py: Good Ol’ HTTP Form that POSTs to http://localhost:8080/sign page http://localhost:8080/sign is handled by Guestbook class
  • 20. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  • 21. What’s next ?• Using DataStore • Using GQL Explore!• Using Templates• Using Static Files in App Engine• Uploading Your Application
  • 22. Uploading application• We use appcfg.py for application deploying• Create and Manage your application at https://appengine.google.com/• Click “Create Application”• Follow the instructions and create an Application ID• Application ID is unique throughout App Engine!
  • 23. Uploading application• Edit app.yaml file from your helloworld directory and change the value of “application:” setting from “helloworld” to your registered ID• Now, RUN!$ ~/google_appengine/appcfg.py update helloworld/• If you setup a free *.appspot.com domain name, the URL of your application begins with the application ID. http://your_app_id.appspot.com
  • 24. Is that it ?• That’s all ? NO
  • 25. problems• App Engine SDK doesn’t work with Proxy!! • So, basically, your time is wasted in hearing this lecture!
  • 26. solution• Kidding!• I have patched an SDK. I will inform you shortly about its download link 
  • 27. questions
  • 28. Thanks Drop me a mail atsnagarohit@gmail.com