Rhodes

1,248 views
1,167 views

Published on

A mild introduction to Rhodes, a cross platform smart phone application development framework.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,248
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
34
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • let’s talk about rhodes:\n\ncross platform smart phone app development framework\n\nbut first! a quick tangent\n
  • \n
  • \n
  • \n
  • \n
  • you can build on mac, windows or linux.\nto build for specific devices, you have to have the device SDK installed.\nin other words, you must have xcode, and therefore mac os x, installed for an iphone build\ntargeted towards enterprise apps. what’s that mean? its not good for games or graphic intensive apps or platform-specific native UI controls. \n\nif you were planning to build the next angry birds, you can leave now.\n
  • what extensions need to be built?\n
  • wehn you run the rake task to build your application, you get a web server in an app\n
  • so i’m telling you that you only need to know web development skills to build an iphone, android, or windows mobile app?\n
  • talk about how you can have a link on your iphone screen to a web app\n
  • \n
  • this also means you need an computer environment to set up the SDK. i.e., mac for iphone, windows for windows mobile, etc.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Pros\nSimple to use, it doesn’t require specifying attributes.\nData migrations are not necessary.\nAttributes can be added or removed without modifying the database schema.\n\nCons:\ndb size: For some applications, the database size may be significantly larger than fixed schema. This is because each attribute is indexed for fast lookup.\nslower Sync: process may be slightly slower because inserts are performed at attribute level.\n\n
  • \n
  • each model has a separate table\n
  • \n
  • \n
  • Fixed Schema Advantages\nSmaller database size, indexes can be specified only on specific attributes.\nSync process may perform faster because whole objects are inserted at a time.\nFixed Schema Disadvantages\nSchema changes must be handled with data migrations.\nDatabase performance may be slow unless you specify proper indexes.\n\nWhen the application starts the first time after an update, the database will be (re)created if theapp_db_version in rhoconfig.txt is different from what existed before. If the database is recreated, the existing database is removed along with all data.\n\non_migrate_source(old_version, new_src)\n\n
  • find_by_sql is SLOW! only works for fixed schema\n
  • \n
  • \n
  • \n
  • <-- how you gonna handle the response w/native controls?\n <-- not reasonable\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Rhodes

    1. 1. Rhodesjonathan.wallace
    2. 2. About Me http://www.san-smith.com/
    3. 3. github: wallace
    4. 4. twitter: jonathanwallace
    5. 5. blog:blog.jonathanrwallace.com
    6. 6. work: highgroove.com
    7. 7. About Rhodes
    8. 8. lots of reasons to getinto web development
    9. 9. money! http://www.flickr.com/photos/epsos/5394616925/
    10. 10. fame!
    11. 11. power! http://www.flickr.com/photos/75905404@N00/490945925/
    12. 12. cross-platform!!!!!!!
    13. 13. Required software• Ruby 1.8.6 or 1.8.7• RubyGems 1.3.5 or greater• GNU make 3.8
    14. 14. Web server in an app!• MVC• user interface is HTML/CSS• UI rendered in native browser UI control embedded in your phone app
    15. 15. What you need to know• html• css• javascript• ruby
    16. 16. What’s it mean to be native?
    17. 17. Native App Pros• submit to app marketplace
    18. 18. Native App Cons• sign up for each app marketplace
    19. 19. Details• blackberry: compiled to Java bytecode• iPhone, Android, and Windows Mobile: compiled to ruby 1.9 bytecode; small ruby executor included w/app• Rhodes ruby is a subset of 1.9
    20. 20. NO EVAL• why?• iPhone App Store’s Rule 3.3.2• “An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s).” (www.rhomobile.com/blog/2009/05/29/iphone-app-store- rules-and-guidelines-on-use-of-frameworks/)
    21. 21. Differences from Rails• no model directory; each model is its own directory• no validations• must compile code and run in a simulator/ device to execute it• much smaller and simpler
    22. 22. latest version: 2.3.2 http://docs.rhomobile.com/rhodes/device-caps
    23. 23. RHOM• mini object-mapper• “property bag” database• local device-side db like SQLite or HSQLDB
    24. 24. Example
    25. 25. Property bag model(Entity-Attribute-Value) http://docs.rhomobile.com/rhodes/rhom
    26. 26. Fixed Schema http://docs.rhomobile.com/rhodes/rhom
    27. 27. Shared Features http://docs.rhomobile.com/rhodes/rhom
    28. 28. Share Features (cont’d) http://docs.rhomobile.com/rhodes/rhom
    29. 29. Fixed Schema features http://docs.rhomobile.com/rhodes/rhom
    30. 30. Rhom API• CRUD (create, update, destroy, delete_all, update_attributes, save)• paginate• find(*args) (:all, :first, :count, :conditions, :order, :orderdir, :select, :per_page, :offset)• find_by_sql <-- only for fixed schema
    31. 31. Associations• only used for managing synchronization between sync models
    32. 32. Rhom API Sync• sync• set_notification callback• can_modify <-- per object• changed? <-- per object• clear_notification <-- per object
    33. 33. Web services?• Oh yes, use RhoSync• or direct via: • JavaScript • Ruby net/http • Rho:AsyncHttp
    34. 34. Threading?• Three main threads • Main UI thread • Ruby thread • Sync thread• Auxiliary threads (notifications, geolocation, client registration and push) ^-- short lived
    35. 35. The View• Uses a layout.erb like rails• Custom CSS framework• Modified JQTouch (version 1, beta 2)
    36. 36. Let’s look at some code and talk about:• App initialization• App structure• Views
    37. 37. Questions?
    38. 38. Credits• http://en.wikipedia.org/wiki/Cross-platform• http://www.apress.com/9781430228684 ^--- pro smartphone cross platform development• http://www.san-smith.com/• http://docs.rhomobile.com/

    ×