SlideShare a Scribd company logo
1 of 33
Building Mobile (Smartphone)
   Apps with Ruby & HTML
   An introduction to Rhodes



       Dasharatham Bitla (Dash)
    dash@bitlasoft.com | http://mobilog.bitlasoft.com
                    www.bitlasoft.com
Smartphones Market
• Smartphones sales are exploding
• Five major smartphone operating systems:
  iPhone, BlackBerry, Windows Mobile,
  Symbian, Android
• “native apps” have are winning the day with
  more than a billion iPhone app downloads on
  a platform with great Safari browser installed
• Other App Stores are picking up as well …
The Apple App Store Economy
                     (based on Dec 09 data)

•   1,35,000+ Apps
•   28,000+ developers
•   Submit your app in less than a weeks time
•   58+ million App Store users
•   ~300 million downloads a month
•   $250+ million in revenues
    – $75 million (30%) to Apple
    – $175 million (70%) to developers

http://gigaom.com/2010/01/12/the-apple-app-store-economy/
Why Develop Mobile Apps?
• No/Low affront Investment
• Can do in your spare time
• Your Imagination is the limit – build anything
• Entrepreneurial Spirit
• Its Fun and good Money
• Submit directly to App Store – no middle man
  and no need of Telecom Operator Approval
• Promote via Twitter, Facebook, Blog, App
  review sites, You Tube etc
Complexities …




Symbian   BlackBerry   Apple iPhone   Android   Windows Mobile
  C++        JAVA      OBJECTIVE C    JAVA           C#
But …how do you write an app
    for all popular devices?
              A Better Way
 Using a ”smartphone   app framework”
       Rhodes from Rhomobile
Rhodes
  Develop Using               Style it with

       HTML
       CSS
       JavaScript               iUI
RUBY


 Develop On                  Write Once
                           Run Everywhere
What is Rhodes?
• “microframework” for building locally executing
  natively optimized mobile apps
• the only framework that supports all
  smartphones
• the only framework that is Model View Controller
• contains first mobile Ruby
• only framework that supports sync
• only framework with a hosted development
  environment
• Rhodes borrows from Rails but not Rails
Why Rhodes?
• “mobilize enterprise apps… cost-effectively with a great
  user experience”
• Provide the high level productivity and portability of web
  programming. Build the app quickly in HTML and Ruby with
  rhodes gem and generators
• Device optimization and offline capability of “native mobile
  apps”
• Best for Data Driven Applications
• Open source for rapid adoption by developers
• Work with synced local data, Includes Offline Storage and
  connected Sync
• Exploit device capabilities (GPS, PIM data, camera, SMS)
• Available open source: http://www.github.com/rhomobile
Device Capabilities / Native UI Elements
Rhodes Architecture




                  Rhodes runtime




 Third party
components:
Installing Rhodes
Release Status – 1.4.2 Stable, 1.5 unstable
http://github.com/rhomobile/rhodes

D:BitlaSoft>ruby -v
ruby 1.8.6 / ruby 1.8.7

D:BitlaSoft>gem install rhodes


D:BitlaSoft>gem list rhodes
rhodes (1.4.2)
Installing Device SDKs
iPhone (Need Mac for testing on Simulator)
     http://developer.apple.com/iphone/

Android
    http://developer.android.com/sdk/index.html

BlackBerry
https://www.blackberry.com/Downloads/entry.
  do?code=060AD92489947D410D897474079C
  1477
Setting up Rhodes
D:BitlaSoft>rhodes-setup
Now
Lets Build an Address Book App
               for
    Android and BlackBerry
Generate an AddressBook App
D:BitlaSoft>rhogen app address_book
Generating with app generator:
←[32m [ADDED]←[0m address_book/rhoconfig.txt
←[32m [ADDED]←[0m address_book/build.yml
←[32m [ADDED]←[0m address_book/app/application.rb
←[32m [ADDED]←[0m address_book/app/index.erb
←[32m [ADDED]←[0m address_book/app/layout.erb
←[32m [ADDED]←[0m address_book/app/loading.html
←[32m [ADDED]←[0m address_book/Rakefile
←[32m [ADDED]←[0m address_book/app/helpers
←[32m [ADDED]←[0m address_book/icon
←[32m [ADDED]←[0m address_book/app/Settings
←[32m [ADDED]←[0m address_book/public

D:BitlaSoft>
Rhodes App Code Structure
              • Build configuration
              • App Configuration
              • Device specific CSS
              • App Icon
              • Rails like App
                structure
              • Easy build/run rake
                scripts
              • Layouts
Generate Contact Model
D:BitlaSoftaddress_book>rhogen model Contact
  name,phone,email,company,address
Generating with model generator:
←[32m   [ADDED]←[0m   app/Contact/config.rb
←[32m   [ADDED]←[0m   app/Contact/index.erb
←[32m   [ADDED]←[0m   app/Contact/edit.erb
←[32m   [ADDED]←[0m   app/Contact/new.erb
←[32m   [ADDED]←[0m   app/Contact/show.erb
←[32m   [ADDED]←[0m   app/Contact/contact_controller.rb
←[32m   [ADDED]←[0m   app/Contact/contact.rb
←[32m   [ADDED]←[0m   app/Contact/contact_spec.rb
Rhodes App Model Code Structure
                 • MVC scaffold
                   generation for Model
                 • Basic cross platform
                   CRUD scaffolding
                 • RhoSync Hooks
Controller Code
app/Contact/contact_controller.rb
                                Scaffold Methods
                                • Index
                                • Show
                                • New
                                • Edit
                                • Create
                                • Update
                                • Delete
View/ UI ERB code

app/Contact/index.erb
Set Start Page – rhoconfig.txt
# Startup page for your application
start_path = '/app/Contact'

# Path to the options page (in this case handled by javascript)
options_path = '/app/Settings'

# Location of bundle url (i.e. from rhohub.com)
rhobundle_zip_url = ''

# Optional password to access bundle (usually not required)
rhobundle_zip_pwd = nil

# Rhodes runtime properties
MinSeverity = 1
LogToOutput = 1
LogCategories = *
ExcludeLogCategories =
KeepTrackOfLastVisitedPage = 0
LastVisitedPage = ''

# Sync server url. This must be the full path to your sources.
# For example: http://rhomobile.rhohub.com/apps/SugarCRM/sources/
syncserver = ''
Build and Launch the App
For iPhone
$ rake run:iphone

For Android
D:BitlaSoft> rake run:android


For BlackBerry
D:BitlaSoft> rake run:bb
Rhodes Rake Tasks
Style it with - iWebKit

Native Looking iPhone UI in HTML and CSS
Style it with - jQTouch
Native Feeling iPhone UI & other WebKit browser Uis
With Native Animations Support
Other Rhomobile Components


       RhoSync
            &

       RhoHub
RhoSync
•   Connect mobile apps with the enterprise
•   Offline Use
•   Easy Sync Adapter Development
•   First Web Services Sync Server
•   First Sync Server To Use Smartphone Push
•   Simplifies Smartphone Data Access
•   RhoSync is a Rails App
RhoSync Architecture


                                  Siebel
                          SOAP


                                 SalesForce
                          SOAP

 your
 app
                RhoSync
                                 SugarCRM
                          SOAP
                 Server
Rhodes
runtime                          BaseCamp
                          REST


                                 Other app
                          REST
                                 backends
RhoSync – Source Adapter
D:BitlaSoftaddress_book>rhogen source contacts

                                                   Sync Methods
                                                   • Login
                                                   • Query
                                                   • Sync
                                                   • Create
                                                   • Update
                                                   • Delete
                                                   • logoff
RhoHub
• First and only “Development as a Service for mobile”
• Hosted IDE app development (edit online a la
  Heroku)
• Hosted Central build (don’t need to install all
  development environment) for all SmartPhones
  online
• Hosted provisioning (user downloading from URL)
• Hosted runtime (sync server)
• Write apps without installing SDKs locally
• Diagnostic Tools
• Lot more …
Questions?
Dasharatham Bitla (Dash)
Founder, BitlaSoft
dash@bitlasoft.com

http://mobilog.bitlasoft.com
www.BitlaSoft.com

More Related Content

More from ThoughtWorks

Online and Publishing casestudies
Online and Publishing casestudiesOnline and Publishing casestudies
Online and Publishing casestudiesThoughtWorks
 
Insurecom Case Study
Insurecom Case StudyInsurecom Case Study
Insurecom Case StudyThoughtWorks
 
Grameen Case Study
Grameen Case StudyGrameen Case Study
Grameen Case StudyThoughtWorks
 
Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesThoughtWorks
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in RubyThoughtWorks
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in RubyThoughtWorks
 
Lets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiLets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiThoughtWorks
 
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank... Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...ThoughtWorks
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices ThoughtWorks
 
Present and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniPresent and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniThoughtWorks
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThoughtWorks
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - MatzThoughtWorks
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimThoughtWorks
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta ThoughtWorks
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew ThoughtWorks
 
HadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkHadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkThoughtWorks
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone DevelopmentThoughtWorks
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith RubyThoughtWorks
 

More from ThoughtWorks (20)

Online and Publishing casestudies
Online and Publishing casestudiesOnline and Publishing casestudies
Online and Publishing casestudies
 
Insurecom Case Study
Insurecom Case StudyInsurecom Case Study
Insurecom Case Study
 
Grameen Case Study
Grameen Case StudyGrameen Case Study
Grameen Case Study
 
BFSI Case Sudies
BFSI Case SudiesBFSI Case Sudies
BFSI Case Sudies
 
Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific Languages
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Lets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiLets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagi
 
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank... Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
 
Present and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniPresent and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola bini
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj Kumar
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - Matz
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. Lim
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew
 
HadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkHadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software Framework
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone Development
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
 
Cloud Computing
Cloud  ComputingCloud  Computing
Cloud Computing
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Building cross-platform Mobile (Smartphone) Apps with Ruby & HTML - Dash bitla

  • 1. Building Mobile (Smartphone) Apps with Ruby & HTML An introduction to Rhodes Dasharatham Bitla (Dash) dash@bitlasoft.com | http://mobilog.bitlasoft.com www.bitlasoft.com
  • 2. Smartphones Market • Smartphones sales are exploding • Five major smartphone operating systems: iPhone, BlackBerry, Windows Mobile, Symbian, Android • “native apps” have are winning the day with more than a billion iPhone app downloads on a platform with great Safari browser installed • Other App Stores are picking up as well …
  • 3. The Apple App Store Economy (based on Dec 09 data) • 1,35,000+ Apps • 28,000+ developers • Submit your app in less than a weeks time • 58+ million App Store users • ~300 million downloads a month • $250+ million in revenues – $75 million (30%) to Apple – $175 million (70%) to developers http://gigaom.com/2010/01/12/the-apple-app-store-economy/
  • 4. Why Develop Mobile Apps? • No/Low affront Investment • Can do in your spare time • Your Imagination is the limit – build anything • Entrepreneurial Spirit • Its Fun and good Money • Submit directly to App Store – no middle man and no need of Telecom Operator Approval • Promote via Twitter, Facebook, Blog, App review sites, You Tube etc
  • 5. Complexities … Symbian BlackBerry Apple iPhone Android Windows Mobile C++ JAVA OBJECTIVE C JAVA C#
  • 6. But …how do you write an app for all popular devices? A Better Way Using a ”smartphone app framework” Rhodes from Rhomobile
  • 7. Rhodes Develop Using Style it with HTML CSS JavaScript iUI RUBY Develop On Write Once Run Everywhere
  • 8. What is Rhodes? • “microframework” for building locally executing natively optimized mobile apps • the only framework that supports all smartphones • the only framework that is Model View Controller • contains first mobile Ruby • only framework that supports sync • only framework with a hosted development environment • Rhodes borrows from Rails but not Rails
  • 9. Why Rhodes? • “mobilize enterprise apps… cost-effectively with a great user experience” • Provide the high level productivity and portability of web programming. Build the app quickly in HTML and Ruby with rhodes gem and generators • Device optimization and offline capability of “native mobile apps” • Best for Data Driven Applications • Open source for rapid adoption by developers • Work with synced local data, Includes Offline Storage and connected Sync • Exploit device capabilities (GPS, PIM data, camera, SMS) • Available open source: http://www.github.com/rhomobile
  • 10. Device Capabilities / Native UI Elements
  • 11. Rhodes Architecture Rhodes runtime Third party components:
  • 12. Installing Rhodes Release Status – 1.4.2 Stable, 1.5 unstable http://github.com/rhomobile/rhodes D:BitlaSoft>ruby -v ruby 1.8.6 / ruby 1.8.7 D:BitlaSoft>gem install rhodes D:BitlaSoft>gem list rhodes rhodes (1.4.2)
  • 13. Installing Device SDKs iPhone (Need Mac for testing on Simulator) http://developer.apple.com/iphone/ Android http://developer.android.com/sdk/index.html BlackBerry https://www.blackberry.com/Downloads/entry. do?code=060AD92489947D410D897474079C 1477
  • 15. Now Lets Build an Address Book App for Android and BlackBerry
  • 16. Generate an AddressBook App D:BitlaSoft>rhogen app address_book Generating with app generator: ←[32m [ADDED]←[0m address_book/rhoconfig.txt ←[32m [ADDED]←[0m address_book/build.yml ←[32m [ADDED]←[0m address_book/app/application.rb ←[32m [ADDED]←[0m address_book/app/index.erb ←[32m [ADDED]←[0m address_book/app/layout.erb ←[32m [ADDED]←[0m address_book/app/loading.html ←[32m [ADDED]←[0m address_book/Rakefile ←[32m [ADDED]←[0m address_book/app/helpers ←[32m [ADDED]←[0m address_book/icon ←[32m [ADDED]←[0m address_book/app/Settings ←[32m [ADDED]←[0m address_book/public D:BitlaSoft>
  • 17. Rhodes App Code Structure • Build configuration • App Configuration • Device specific CSS • App Icon • Rails like App structure • Easy build/run rake scripts • Layouts
  • 18. Generate Contact Model D:BitlaSoftaddress_book>rhogen model Contact name,phone,email,company,address Generating with model generator: ←[32m [ADDED]←[0m app/Contact/config.rb ←[32m [ADDED]←[0m app/Contact/index.erb ←[32m [ADDED]←[0m app/Contact/edit.erb ←[32m [ADDED]←[0m app/Contact/new.erb ←[32m [ADDED]←[0m app/Contact/show.erb ←[32m [ADDED]←[0m app/Contact/contact_controller.rb ←[32m [ADDED]←[0m app/Contact/contact.rb ←[32m [ADDED]←[0m app/Contact/contact_spec.rb
  • 19. Rhodes App Model Code Structure • MVC scaffold generation for Model • Basic cross platform CRUD scaffolding • RhoSync Hooks
  • 20. Controller Code app/Contact/contact_controller.rb Scaffold Methods • Index • Show • New • Edit • Create • Update • Delete
  • 21. View/ UI ERB code app/Contact/index.erb
  • 22. Set Start Page – rhoconfig.txt # Startup page for your application start_path = '/app/Contact' # Path to the options page (in this case handled by javascript) options_path = '/app/Settings' # Location of bundle url (i.e. from rhohub.com) rhobundle_zip_url = '' # Optional password to access bundle (usually not required) rhobundle_zip_pwd = nil # Rhodes runtime properties MinSeverity = 1 LogToOutput = 1 LogCategories = * ExcludeLogCategories = KeepTrackOfLastVisitedPage = 0 LastVisitedPage = '' # Sync server url. This must be the full path to your sources. # For example: http://rhomobile.rhohub.com/apps/SugarCRM/sources/ syncserver = ''
  • 23. Build and Launch the App For iPhone $ rake run:iphone For Android D:BitlaSoft> rake run:android For BlackBerry D:BitlaSoft> rake run:bb
  • 25. Style it with - iWebKit Native Looking iPhone UI in HTML and CSS
  • 26. Style it with - jQTouch Native Feeling iPhone UI & other WebKit browser Uis With Native Animations Support
  • 27. Other Rhomobile Components RhoSync & RhoHub
  • 28. RhoSync • Connect mobile apps with the enterprise • Offline Use • Easy Sync Adapter Development • First Web Services Sync Server • First Sync Server To Use Smartphone Push • Simplifies Smartphone Data Access • RhoSync is a Rails App
  • 29. RhoSync Architecture Siebel SOAP SalesForce SOAP your app RhoSync SugarCRM SOAP Server Rhodes runtime BaseCamp REST Other app REST backends
  • 30. RhoSync – Source Adapter D:BitlaSoftaddress_book>rhogen source contacts Sync Methods • Login • Query • Sync • Create • Update • Delete • logoff
  • 31. RhoHub • First and only “Development as a Service for mobile” • Hosted IDE app development (edit online a la Heroku) • Hosted Central build (don’t need to install all development environment) for all SmartPhones online • Hosted provisioning (user downloading from URL) • Hosted runtime (sync server) • Write apps without installing SDKs locally • Diagnostic Tools • Lot more …
  • 32.
  • 33. Questions? Dasharatham Bitla (Dash) Founder, BitlaSoft dash@bitlasoft.com http://mobilog.bitlasoft.com www.BitlaSoft.com