Using AppEngine for Mobile Apps

6,159 views
6,000 views

Published on

This presentation slides is for SG GTUG 4th meetup on 17 April 2010.

In this presentation, I shared my personal experience in using AppEngine (Java) for my mobile application developments. I used SG 4D, one of my most popular Singapore app, as an example.

Topics covered including datamining, cron jobs, JDO, Restlet and Gson.

Published in: Technology
2 Comments
5 Likes
Statistics
Notes
No Downloads
Views
Total views
6,159
On SlideShare
0
From Embeds
0
Number of Embeds
84
Actions
Shares
0
Downloads
0
Comments
2
Likes
5
Embeds 0
No embeds

No notes for slide
  • Super-fast real-time parser for real-world HTML
  • Using AppEngine for Mobile Apps

    1. 1. GAE for Mobile Apps<br />How i use Google’s App Engine for my mobile apps<br />
    2. 2. About Myself<br /> Name: Junda (JD)<br /> Blog: Just2me.com<br /> twitter: @samwize<br /> Mobile lead, Hoiio<br /> Bio: Codes for iPhone, Android, BlackBerry & J2ME <br />
    3. 3. Hoiio, a smarter app to call & SMS<br />
    4. 4. My hobby apps..<br />SG Toto<br />SG 4D<br />SG Pools<br />How iuse App Enginefor my mobile apps<br />SG Blood<br />txeet<br />SG Wireless<br />Flowers<br />
    5. 5. Overview of Topics<br />What I want to develop?<br />What backend server to use?<br />How to datamine?<br />How to store & retrieve?<br />How to create API?<br />How to use the API?<br />
    6. 6. 1. What I want to develop?<br />
    7. 7.
    8. 8.
    9. 9. Features<br />Get latest results<br />Get past results<br />Analyze numbers<br />A server-client application<br />
    10. 10. 2. What backend server to use?<br />
    11. 11. Things I have tried..<br />✘ Run little server in school<br />✘ Get a shared webhost<br />✘ Get a VPS account<br />
    12. 12. Google App Engine<br />✔ App Engine for Java was launched in April 2009<br />✔ Scalable<br />✔ Multiple versions<br />✔ Easy to deploy<br />✔ FREE<br />
    13. 13. 3. How to datamine?<br />
    14. 14. 3. How to datamine?<br />HTML Parser<br />Setup Cron job<br />
    15. 15. Code > HTML Parser<br />
    16. 16. Code > Setup cron.xml<br />
    17. 17. 4. How to store and retrieve?<br />
    18. 18. 4. How to store & retrieve?<br />Java Data Objects (JDO)<br />Or Java Persistence API (JPA)<br />A collection of real-world examples<br />
    19. 19. Code > Memcache, JDO Query<br />
    20. 20. Pitfalls of Datastore<br />pm.close() – changes are only saved when PersistenceManager is closed!<br />You cannot use inequality filters on more than 1 property! Eg. (x > 0 ANDy > 0) is illegal<br />If you use an inequality filter, then that property MUST be sorted before others!<br />Restrictions on queries and unsupported features of JDO and more..<br />
    21. 21. 5. How to create API?<br />
    22. 22. 5. How to create API?<br />Restlet for GAE<br />Download GAE version<br />Setup Restlet in web.xml<br />Attach the route eg. /4d<br />Create ServerResource, implement @Get represent() and return JSON string<br />
    23. 23. Code > Setup Restlet in web.xml<br />
    24. 24. Code > Setup Restlet routes<br />
    25. 25. Code > Implement a Restlet resource<br />
    26. 26. 5. How to create API?<br />API to return JSON format<br />Gson – Converts Java Objects to JSON string, and vice versa<br />
    27. 27. Code > Gson<br />
    28. 28. 6. How to use the API?<br />
    29. 29. 6. How to use the API?<br />HTTP GET from the service URL<br />Use Gson, or other JSON library<br />Display on the client!<br />
    30. 30.
    31. 31.
    32. 32. This is the last slide!<br />

    ×