Discusses four tools that can be used to build Android smartphone apps. Specifically IRB for scripting on the device, Ruboto for building arbitrary apps, Rhodes (a framework which includes a fast compiled Ruby) and RhoSync (a mobile app integration server which uses Ruby)
2. Background Android is a big step forward in mobile operating systems But… Java? Dynamic script languages are more productive And don’t have to be too slow Four main ways to leverage Ruby…
3. Leveraging Ruby for Android Scripting: automate phone tasks and testing “From scratch” app development replace Java Framework development Less Ruby, compiled Ruby App integration Full Ruby via server
4. Ruboto http://github.com/ruboto Ruboto-core [sudo] gem install ruboto-core Ruboto-core-irb Ruboto-demos * Ruboto slides here derived from earlier presentations by Daniel Jackoway. Apologies for missing attribution in original post.
5. Android in Ruby public void Activity.onCreate(Bundle bundle) public void Activity.onPause() public void onClick(View view) handle_create do |bundle| handle_pause do handle_click do |view|
42. Rhodes Architecture your app code You write: RhoSync Server model model HTML templates controller Rhodes app generator Backend app source adapter model model HTML templates controller Backend app source adapter Rhodes components ORM (Rhom) Ruby executor We provide: Device capabilities RhoSync client Backend app smartphone device
43. Rhodes vs. Competition Only one that supports all devices Only one with synchronized data Only MVC framework First Ruby on the device First and only hosted development service for mobile
44. Ruby for App Integration…RhoSync [sudo] gem install rhosync Write a “source adapter” Query Create Update Delete Eliminates many tasks in app integration No device integration/connection code (assumes in database) Removes data storage step If its Rails backend, not even source adapter is necessary Better user experience Data is realtime updated No wait for data to be retrieved
45. RhoSync Source Adapter rhosync app YourApp cdYourApp rhosync source Product Generates … class Product <SourceAdapter def query(params=nil) # TODO: Query your backend data source and assign the records # to a nested hash structure called @result. For example: end def create(create_hash,blob=nil) # TODO: Create a new record in your backend data source end end
46. RhoHub First and only “Development as a Service for mobile” More than 10,000 developers signed up in the last year ~100 more per day Hosted development – WRITE APPS FOR IPHONES FROM WINDOWS Web-based IDE for ease of use Build for all smartphones online – no need to install SDKs Hosted runtime No need to set up RhoSync server Collaboration Work with other developers on same project over the web