SlideShare una empresa de Scribd logo
1 de 36
Linkedin: October 18, 2012
2012 Fukuoka Ruby Night:
The New World of Ruby




     Ruby and iOS: An Inside Look
                             Jeanine Swatton
More about me…



             Ruby/iOS Developer, QT, C, C++

             Senior Lecturer, Assistant Professor
             Engineering experience:
             Government, Surveillance and Video Conferencing


             Organizer, Silicon Valley Ruby on Rails Meetup

              Software Product Manager



10/18/2012              Jeanine Swatton                        2
Agenda for today
             1. Why go mobile?

             2. Benefits of Native Mobile App

             3. mRuby + iOS

             4. RubyMotion




10/18/2012            Jeanine Swatton           3
Mobile Trends




10/18/2012       Jeanine Swatton   4
Why go mobile?




10/18/2012       Jeanine Swatton   5
Mobile Trends




10/18/2012       Jeanine Swatton   6
Mobile Trends


             Multiple Platforms for Native
             apps
              • Languages - Objective C, C, C++, .NET,
               Java, Adobe Flash
             • Apple - XCode 4.2, iOS SDK 5.0
             • Windows - Windows Mobile 6.5 Developer
               Toolkit w Mobile 6 SDK
             • Blackberry - Tablet/Native SDK, Runtime for
               Android Apps




10/18/2012              Jeanine Swatton                      7
Web app or Native app?




10/18/2012          Jeanine Swatton   8
What about Hybrid?




10/18/2012         Jeanine Swatton   9
Definitions


             • Native:
             • App designed to run on a device’s OS and
               machine firmware. (Example iPhone Apps run
               on iOS platform, Symbian for Nokia.

             • Web app:
             • All or some parts of software are downloaded
               from web. Coded in browser-rendered
               language – HTML, javascript



10/18/2012                     Jeanine Swatton                10
Definitions


             • Hybrid: Combination of offline and online
               functionality within native app 3 forms:

                1.   Requires you to be online to get data or information
                2.   Has native interface then pulls data via API’s into app and
                     may sync with database. Ex. Rhapsody – Gives you
                     offline screen you can access saved content – online –
                     you have full access to music you can stream.
                3.   Uses mobile site to display info within an application shell.
                     Done using tools such as PhoneGap. Tools provide
                     interface using jafascript to native API’s – then allows a
                     webview to interact with native functionality such as
                     cameras, GPS and device info




10/18/2012                          Jeanine Swatton                                  11
Mobile Trends


             App development comparison




10/18/2012        Jeanine Swatton         12
Mobile Trends




10/18/2012       Jeanine Swatton   13
Mobile Trends
             Solution?
             Web Apps w/ use of core web technologies: CSS3,
             HTML5




10/18/2012           Jeanine Swatton                       14
Mobile Trends


             When would you need a native app over a
             Mobile-Web based app?




10/18/2012             Jeanine Swatton                 15
Native Apps

             Native app advantages:
             Better control over the User Interface
             Platform API (application programming interface) access not
             available to web apps
             Network usage is lower for native – access network for data
             rather than web app completely loading at run-time
             Offline functionality
             Users more willing to download app than downloading from
             the internet

             Native app disadvantages:
             More maintenance with multiple platforms
             Have to update app then submit it


10/18/2012                   Jeanine Swatton                               16
Which App?


             Which type of companies would be a better fit for
             native, Web or both?




10/18/2012                  Jeanine Swatton                      17
Which App?


             Native approach more used by:

             Gaming, social networking, lifestyle & entertainment,
             gadgets, travel and local

             Web based approach:

             News and weather publishers. Sometimes financial
             services, retail and shopping due to need for user
             analytics




10/18/2012                   Jeanine Swatton                         18
What strategy do companies also use?


             Tech Startups/Companies new to the mobile side
             (depending on funds)




10/18/2012                 Jeanine Swatton                    19
Why Ruby on Mobile?



             • Simple transition from Web
               applications to mobile applications
             • Grow the Ruby community even more!
             • Support of mRuby
             • Think outside of the box!




10/18/2012                Jeanine Swatton            20
Intro to iOS Development
                        In 5 minutes




10/18/2012           Jeanine Swatton    21
iOS Development


             What you need to know
              • Objective C – superset of C
              • Delegates – one object depends on
                another object to perform functions.
              • Protocols – declare methods to be
                implemented by any class
              • ARC – Automatic Reference
                Counting/Memory Management



10/18/2012                  Jeanine Swatton            22
iOS Development


Application/Directory Structure
 File types:
 .m – Main file (equivalent to C++ .cpp file)
 .h – Header file (equivalent to C++ header
 file)
 .framework
 .plist – property list files
 .xib – “Nib files”




10/18/2012                         Jeanine Swatton   23
RubyMotion




10/18/2012     Jeanine Swatton   24
RubyMotion

             More info:
              •   Toolchain
              •   Based on Rake
              •   Combine Objective C & Ruby
              •   Subscription license
              •   Memory management
                  – Similar to ARC
              • Debug files available
              • iOS 6 compatible




10/18/2012                      Jeanine Swatton   25
RubyMotion

             Installation:
              • Purchase Commercial License
              • No Xcode needed
              • Install RubyMotion




10/18/2012                   Jeanine Swatton   26
RubyMotion

             Create and run:

              > motion create testapplication
              > cd testapplication
              > rake




10/18/2012                Jeanine Swatton       27
RubyMotion




               Demo
10/18/2012            Jeanine Swatton   28
MobiRuby




10/18/2012     Jeanine Swatton   29
MobiRuby


             Developed by:
             Yuichiro MASUI
             http://mobiruby.org/

             His plans:
                Will be adding it to Android!




10/18/2012                Jeanine Swatton       30
MobiRuby Stack


             Thanks to: Yuichiro MASUI

                              Your code
               mruby –     muby –          mobiruby -   mobiruby -
                cfunc      cocoa            common         ios


                                 mruby

                                    IOS


10/18/2012                      Jeanine Swatton                      31
MobiRuby

             Thanks to: Yuichiro MASUI – feedback from the creator
             • mruby-cfunc
                – C function bridge for mruby
                – Based on libFFI
             • mruby-cocoa
                – Garbage collection
                – Cocoa bridge for mruby
             • mobiruby-ios
                – Xcode integration




10/18/2012                       Jeanine Swatton                     32
MobiRuby

             Installation:
             Xcode
             > git clone git://github.com/mobiruby/mobiruby-
             ios.git
             > gem install nokogiri
             > gem install xcodeproj
              sh ./setup.sh
              open mobiruby-ios.xcodeproj/




10/18/2012                    Jeanine Swatton                  33
iOS Development




10/18/2012         Jeanine Swatton   34
MobiRuby




              Demo
10/18/2012     Jeanine Swatton   35
Thanks to:
Yukihiro Matsumoto, “Matz”
www.github.com/mruby/mruby
Laurent Sansonetti, RubyMotion
www.rubymotion.com
Yuichiro Masui, MobiRuby
www.mobiruby.com

Design/Animation by:
Jana Antonova: www.antonova.me
10/18/2012         Jeanine Swatton   36

Más contenido relacionado

La actualidad más candente

Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014
nyolles
 
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
Prasid Pathak
 
Nitobi/PhoneGap at Bootup 2011
Nitobi/PhoneGap at Bootup 2011Nitobi/PhoneGap at Bootup 2011
Nitobi/PhoneGap at Bootup 2011
Brian LeRoux
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
Ashwin Date
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
Rikard Thulin
 

La actualidad más candente (20)

Agile iOS
Agile iOSAgile iOS
Agile iOS
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
 
Agile toolkit present 2012
Agile toolkit present 2012Agile toolkit present 2012
Agile toolkit present 2012
 
Swift Development - Mobiloitte
Swift Development - MobiloitteSwift Development - Mobiloitte
Swift Development - Mobiloitte
 
Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014
 
Applications multi plateformes avec Cordova, HTML5 et Javascript
Applications multi plateformes avec Cordova, HTML5 et JavascriptApplications multi plateformes avec Cordova, HTML5 et Javascript
Applications multi plateformes avec Cordova, HTML5 et Javascript
 
Flutter vs Ionic: Which framework is better for cross platform application d...
Flutter vs Ionic: Which framework is better  for cross platform application d...Flutter vs Ionic: Which framework is better  for cross platform application d...
Flutter vs Ionic: Which framework is better for cross platform application d...
 
Frameworks and Tools For Developing Progressive Web App
Frameworks and Tools For Developing Progressive Web AppFrameworks and Tools For Developing Progressive Web App
Frameworks and Tools For Developing Progressive Web App
 
Introduction To NetBeans IDE
Introduction To NetBeans IDEIntroduction To NetBeans IDE
Introduction To NetBeans IDE
 
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
 
Future of Mobile
Future of MobileFuture of Mobile
Future of Mobile
 
Real World Technologies
Real World TechnologiesReal World Technologies
Real World Technologies
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
 
The Modern Web with Microfrontends
The Modern Web with MicrofrontendsThe Modern Web with Microfrontends
The Modern Web with Microfrontends
 
Nitobi/PhoneGap at Bootup 2011
Nitobi/PhoneGap at Bootup 2011Nitobi/PhoneGap at Bootup 2011
Nitobi/PhoneGap at Bootup 2011
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
 
JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
Drupal and the Future of the Web
Drupal and the Future of the WebDrupal and the Future of the Web
Drupal and the Future of the Web
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
 

Similar a Ruby and iOS: An inside look

Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momenta
apps4allru
 

Similar a Ruby and iOS: An inside look (20)

Pick Your Poison – Mobile Web, Native, or Hybrid? - Denver Startup Week - Oct...
Pick Your Poison – Mobile Web, Native, or Hybrid? - Denver Startup Week - Oct...Pick Your Poison – Mobile Web, Native, or Hybrid? - Denver Startup Week - Oct...
Pick Your Poison – Mobile Web, Native, or Hybrid? - Denver Startup Week - Oct...
 
Pick Your Poison – Mobile Web, Native or Hybrid?
Pick Your Poison – Mobile Web, Native or Hybrid?Pick Your Poison – Mobile Web, Native or Hybrid?
Pick Your Poison – Mobile Web, Native or Hybrid?
 
Mobile Application Development with WP7 & Others
Mobile Application Development with WP7 & OthersMobile Application Development with WP7 & Others
Mobile Application Development with WP7 & Others
 
Seminar report on android os
Seminar report on android osSeminar report on android os
Seminar report on android os
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
AIDS.gov Drupal4Gov Responsive Design
AIDS.gov Drupal4Gov Responsive DesignAIDS.gov Drupal4Gov Responsive Design
AIDS.gov Drupal4Gov Responsive Design
 
Android overview
Android overviewAndroid overview
Android overview
 
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and MustacheRoad to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
Road to mobile w/ Sinatra, jQuery Mobile, Spine.js and Mustache
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Native vs Hybrid - Options to develop your mobile application
Native vs Hybrid - Options to develop your mobile applicationNative vs Hybrid - Options to develop your mobile application
Native vs Hybrid - Options to develop your mobile application
 
Mobile (App) Development with Sitecore
Mobile (App) Development with SitecoreMobile (App) Development with Sitecore
Mobile (App) Development with Sitecore
 
Mobile Development Platforms
Mobile Development PlatformsMobile Development Platforms
Mobile Development Platforms
 
What is Happening in the "App Factory"?
What is Happening in the "App Factory"?What is Happening in the "App Factory"?
What is Happening in the "App Factory"?
 
Mobile Application Lifecycle with Jekins, Trello and CollabNet TeamForge
Mobile Application Lifecycle with Jekins, Trello and CollabNet TeamForgeMobile Application Lifecycle with Jekins, Trello and CollabNet TeamForge
Mobile Application Lifecycle with Jekins, Trello and CollabNet TeamForge
 
Windows Phone 8 Wave Guide Montreal Code Camp - The Windows Phone opportunity
Windows Phone 8 Wave Guide Montreal Code Camp - The Windows Phone opportunityWindows Phone 8 Wave Guide Montreal Code Camp - The Windows Phone opportunity
Windows Phone 8 Wave Guide Montreal Code Camp - The Windows Phone opportunity
 
Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momenta
 
Build your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App EngineBuild your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App Engine
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Phonegap
PhonegapPhonegap
Phonegap
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Ruby and iOS: An inside look

  • 1. Linkedin: October 18, 2012 2012 Fukuoka Ruby Night: The New World of Ruby Ruby and iOS: An Inside Look Jeanine Swatton
  • 2. More about me… Ruby/iOS Developer, QT, C, C++ Senior Lecturer, Assistant Professor Engineering experience: Government, Surveillance and Video Conferencing Organizer, Silicon Valley Ruby on Rails Meetup Software Product Manager 10/18/2012 Jeanine Swatton 2
  • 3. Agenda for today 1. Why go mobile? 2. Benefits of Native Mobile App 3. mRuby + iOS 4. RubyMotion 10/18/2012 Jeanine Swatton 3
  • 4. Mobile Trends 10/18/2012 Jeanine Swatton 4
  • 5. Why go mobile? 10/18/2012 Jeanine Swatton 5
  • 6. Mobile Trends 10/18/2012 Jeanine Swatton 6
  • 7. Mobile Trends Multiple Platforms for Native apps • Languages - Objective C, C, C++, .NET, Java, Adobe Flash • Apple - XCode 4.2, iOS SDK 5.0 • Windows - Windows Mobile 6.5 Developer Toolkit w Mobile 6 SDK • Blackberry - Tablet/Native SDK, Runtime for Android Apps 10/18/2012 Jeanine Swatton 7
  • 8. Web app or Native app? 10/18/2012 Jeanine Swatton 8
  • 9. What about Hybrid? 10/18/2012 Jeanine Swatton 9
  • 10. Definitions • Native: • App designed to run on a device’s OS and machine firmware. (Example iPhone Apps run on iOS platform, Symbian for Nokia. • Web app: • All or some parts of software are downloaded from web. Coded in browser-rendered language – HTML, javascript 10/18/2012 Jeanine Swatton 10
  • 11. Definitions • Hybrid: Combination of offline and online functionality within native app 3 forms: 1. Requires you to be online to get data or information 2. Has native interface then pulls data via API’s into app and may sync with database. Ex. Rhapsody – Gives you offline screen you can access saved content – online – you have full access to music you can stream. 3. Uses mobile site to display info within an application shell. Done using tools such as PhoneGap. Tools provide interface using jafascript to native API’s – then allows a webview to interact with native functionality such as cameras, GPS and device info 10/18/2012 Jeanine Swatton 11
  • 12. Mobile Trends App development comparison 10/18/2012 Jeanine Swatton 12
  • 13. Mobile Trends 10/18/2012 Jeanine Swatton 13
  • 14. Mobile Trends Solution? Web Apps w/ use of core web technologies: CSS3, HTML5 10/18/2012 Jeanine Swatton 14
  • 15. Mobile Trends When would you need a native app over a Mobile-Web based app? 10/18/2012 Jeanine Swatton 15
  • 16. Native Apps Native app advantages: Better control over the User Interface Platform API (application programming interface) access not available to web apps Network usage is lower for native – access network for data rather than web app completely loading at run-time Offline functionality Users more willing to download app than downloading from the internet Native app disadvantages: More maintenance with multiple platforms Have to update app then submit it 10/18/2012 Jeanine Swatton 16
  • 17. Which App? Which type of companies would be a better fit for native, Web or both? 10/18/2012 Jeanine Swatton 17
  • 18. Which App? Native approach more used by: Gaming, social networking, lifestyle & entertainment, gadgets, travel and local Web based approach: News and weather publishers. Sometimes financial services, retail and shopping due to need for user analytics 10/18/2012 Jeanine Swatton 18
  • 19. What strategy do companies also use? Tech Startups/Companies new to the mobile side (depending on funds) 10/18/2012 Jeanine Swatton 19
  • 20. Why Ruby on Mobile? • Simple transition from Web applications to mobile applications • Grow the Ruby community even more! • Support of mRuby • Think outside of the box! 10/18/2012 Jeanine Swatton 20
  • 21. Intro to iOS Development In 5 minutes 10/18/2012 Jeanine Swatton 21
  • 22. iOS Development What you need to know • Objective C – superset of C • Delegates – one object depends on another object to perform functions. • Protocols – declare methods to be implemented by any class • ARC – Automatic Reference Counting/Memory Management 10/18/2012 Jeanine Swatton 22
  • 23. iOS Development Application/Directory Structure File types: .m – Main file (equivalent to C++ .cpp file) .h – Header file (equivalent to C++ header file) .framework .plist – property list files .xib – “Nib files” 10/18/2012 Jeanine Swatton 23
  • 24. RubyMotion 10/18/2012 Jeanine Swatton 24
  • 25. RubyMotion More info: • Toolchain • Based on Rake • Combine Objective C & Ruby • Subscription license • Memory management – Similar to ARC • Debug files available • iOS 6 compatible 10/18/2012 Jeanine Swatton 25
  • 26. RubyMotion Installation: • Purchase Commercial License • No Xcode needed • Install RubyMotion 10/18/2012 Jeanine Swatton 26
  • 27. RubyMotion Create and run: > motion create testapplication > cd testapplication > rake 10/18/2012 Jeanine Swatton 27
  • 28. RubyMotion Demo 10/18/2012 Jeanine Swatton 28
  • 29. MobiRuby 10/18/2012 Jeanine Swatton 29
  • 30. MobiRuby Developed by: Yuichiro MASUI http://mobiruby.org/ His plans: Will be adding it to Android! 10/18/2012 Jeanine Swatton 30
  • 31. MobiRuby Stack Thanks to: Yuichiro MASUI Your code mruby – muby – mobiruby - mobiruby - cfunc cocoa common ios mruby IOS 10/18/2012 Jeanine Swatton 31
  • 32. MobiRuby Thanks to: Yuichiro MASUI – feedback from the creator • mruby-cfunc – C function bridge for mruby – Based on libFFI • mruby-cocoa – Garbage collection – Cocoa bridge for mruby • mobiruby-ios – Xcode integration 10/18/2012 Jeanine Swatton 32
  • 33. MobiRuby Installation: Xcode > git clone git://github.com/mobiruby/mobiruby- ios.git > gem install nokogiri > gem install xcodeproj  sh ./setup.sh  open mobiruby-ios.xcodeproj/ 10/18/2012 Jeanine Swatton 33
  • 34. iOS Development 10/18/2012 Jeanine Swatton 34
  • 35. MobiRuby Demo 10/18/2012 Jeanine Swatton 35
  • 36. Thanks to: Yukihiro Matsumoto, “Matz” www.github.com/mruby/mruby Laurent Sansonetti, RubyMotion www.rubymotion.com Yuichiro Masui, MobiRuby www.mobiruby.com Design/Animation by: Jana Antonova: www.antonova.me 10/18/2012 Jeanine Swatton 36

Notas del editor

  1. C function bridge for mruby – call c based function directlyCocoa bridge for mruby – use cocoa functions transparently, handles garbage collectionMobiruby-common – believe that’s for android onlyMobiruby-ios provides you with xcode integration, iOS specific utilities
  2. A portable foreign function interface library is libffi – released in april as well..The libffi library is useful to anyone trying to build a bridge between interpreted and natively compiled code.C function bridge for mruby – call c based function directlyCocoa bridge for mruby – use cocoa functions transparently, handles garbage collectionMobiruby-common – believe that’s for android onlyMobiruby-ios provides you with xcode integration, iOS specific utilities
  3. Xcodeproj lets you create and modify Xcode projects from Ruby.Nokogiri – xml parser