• Like
  • Save
RailsConf 2013: RubyMotion
Upcoming SlideShare
Loading in...5
×
 

RailsConf 2013: RubyMotion

on

  • 2,151 views

As Ruby Developer I've had a pretty involved relationship with my Mac. I own iPads and iPhones since Apple started to make them. A few years back I told myself I was going to build apps for the ...

As Ruby Developer I've had a pretty involved relationship with my Mac. I own iPads and iPhones since Apple started to make them. A few years back I told myself I was going to build apps for the Mac/iPhone/iPad but then reality sunk in when I started learning Objective-C and using XCode. The environment (and the language) felt like a trip back to 1995.
If you are a Web developer used to working with dynamically-typed, lightweight languages, following agile practices like Test-Driven Development, and comfortable with a Unix Shell, then jumping into a development world with an ugly cousin of C++ and an IDE that looks like an F16 cockpit just doesn’t seem appealing.
Luckily for us there is an alternative in RubyMotion, a Ruby-based toolchain for iOS that brings a Ruby on Rails style of development to the world of iOS application development.
In this talk I will show you how you can use well engrained Ruby practices like TDD to build iOS Apps with RubyMotion.

Statistics

Views

Total Views
2,151
Views on SlideShare
1,753
Embed Views
398

Actions

Likes
1
Downloads
0
Comments
0

5 Embeds 398

http://integrallis.com 191
http://localhost 78
https://twitter.com 73
http://dev.eventdots.jp 42
http://integrallis-dotcom.herokuapp.com 14

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    RailsConf 2013: RubyMotion RailsConf 2013: RubyMotion Presentation Transcript

    • by Brian Sam-BoddenRubyMotionTDDing iOS Apps for fun and profit with RubyMotionhttp://www.integrallis.comThursday, May 2, 13
    • Thursday, May 2, 13
    • who’s this guy?Life-long polyglot programmerRubyist since 2005Integrallis since 2002Lives in Phoenix, Not in WITSECThursday, May 2, 13
    • Let’s start with...Confessions!Thursday, May 2, 13
    • I’m an Apple Fan Boy!Thursday, May 2, 13
    • I’m an Apple Fan Boy!My Overpriced Precious!Thursday, May 2, 13
    • but I work with Ruby... every dayThursday, May 2, 13
    • I really, really wanted to make iPhone and iPad AppsThursday, May 2, 13
    • ...but Apple insists you use XCodeI tried, I swear I did!Thursday, May 2, 13
    • but it felt very...Thursday, May 2, 13
    • an instinct defying experience......for a RubyistThursday, May 2, 13
    • an instinct defying experience...Let’s paint some pixels here......for a RubyistThursday, May 2, 13
    • an instinct defying experience...Let’s paint some pixels here...Oh noes! ⌘-Z, ⌘-Z, ⌘-Z...for a RubyistThursday, May 2, 13
    • ...and objective-C wasn’t for meThursday, May 2, 13
    • Enterhttp://www.rubymotion.com/Thursday, May 2, 13
    • A Commercial (*source available)Ruby-based toolchain for iOSThursday, May 2, 13
    • Based on the MacRuby distribution,modified to target iOShttp://macruby.org/Thursday, May 2, 13
    • Generates compiled binaries that can bedistributed via Apples App StoreThursday, May 2, 13
    • Created by Laurent SansonettiFormerly of Apple (7 years)Worked on iLife and OS XMacRuby CreatorThursday, May 2, 13
    • “We do not believe that Xcode makes agood environment for Ruby development (ordevelopment in general)”Thursday, May 2, 13
    • Who is RubyMotion’s target audience?Thursday, May 2, 13
    • (Ruby & Web) Developers new to iOSThose comfortable with a *NIX Shelland Agile Practices like BDD & TDDThursday, May 2, 13
    • Why don’t you just build a Mobile Web App?Thursday, May 2, 13
    • “The most common reason for this is that [native]apps are seen to be more convenient (55%), faster(48%) and easier to browse (40%)”http://econsultancy.com/us/blog/62326-85-of-consumers-favour-apps-over-mobile-websitesThursday, May 2, 13
    • Thursday, May 2, 13
    • Thursday, May 2, 13
    • Bonjour, Le Monde!Thursday, May 2, 13
    • Check 1, 2, 3/> motion -v1.35/> motion create helloCreate helloCreate hello/.gitignoreCreate hello/RakefileCreate hello/appCreate hello/app/app_delegate.rbCreate hello/resourcesCreate hello/specCreate hello/spec/main_spec.rbThursday, May 2, 13
    • Rake-Driven Development/> rake -Trake archive # Create an .ipa archiverake archive:distribution # Create an .ipa archive for distribution (AppStore)rake build # Build everythingrake build:device # Build the device versionrake build:simulator # Build the simulator versionrake clean # Clear build objectsrake config # Show project configrake ctags # Generate ctagsrake default # Build the project, then run the simulatorrake device # Deploy on the devicerake simulator # Run the simulatorrake spec # Same as spec:simulatorrake spec:device # Run the test/spec suite on the devicerake spec:simulator # Run the test/spec suite on the simulatorrake static # Create a .a static libraryThursday, May 2, 13
    • The REPLRuby Motion Enjoyment Reason #1Thursday, May 2, 13
    • The REPLHighlightsInteract with your running iOS applicationDiscover & Learn iOS APIs through RubyThursday, May 2, 13
    • Live DemoNumero UnoWhere many a presenter has perished ...Thursday, May 2, 13
    • The BaconRuby Motion Enjoyment Reason #2Thursday, May 2, 13
    • our vehicle for BDD & TDDbundled with MacBaconhttps://github.com/alloy/MacBacona small clone of RSpechttp://rspec.info/Thursday, May 2, 13
    • A slice of MacBacondescribe A new array dobefore do@ary = Array.newendit should be empty do@ary.should.be.empty@ary.should.not.include 1endit should have zero size do@ary.size.should.equal 0@ary.size.should.be.close 0.1, 0.5endThursday, May 2, 13
    • A slice of MacBacondescribe A new array dobefore do@ary = Array.newendit should be empty do@ary.should.be.empty@ary.should.not.include 1endit should have zero size do@ary.size.should.equal 0@ary.size.should.be.close 0.1, 0.5endit should raise on trying fetch any index dolambda { @ary.fetch 0 }.should.raise(IndexError).message.should.match(/out of array/)# Alternatively:should.raise(IndexError) { @ary.fetch 0 }endit should have an object identity do@ary.should.not.be.same_as Array.newendit should perform a long running operation do@ary.performSelector("addObject:", withObject:"soup", afterDelay:0.5)wait 0.6 do@ary.size.should.be 1endendThursday, May 2, 13
    • RM TDDHighlightsTesting with BaconRed-Green-Refactor for iOSLibraries: MotionModel & FormotionThursday, May 2, 13
    • Live DemoNumero DosHey we made it this far!, what could go wrong now?Thursday, May 2, 13
    • Okonawa!A Simple ToDo Apphttps://github.com/integrallis/okonawaLet’s build something!行わThursday, May 2, 13
    • Okonawa in Actionhttps://github.com/integrallis/okonawaThursday, May 2, 13
    • Healthy, rapidly growing set of librariesBubbleWrap, MotionModel, FormMotion,Teacup, IB and many, many moreThere’s a Gem for that!Thursday, May 2, 13
    • It’s happening people...Rubyists are making iOS apps!Thursday, May 2, 13
    • http://37signals.com/svn/posts/3430-launch-the-official-basecamp-iphone-appBasecamp for the iPhoneThursday, May 2, 13
    • https://itunes.apple.com/us/app/jukely/id590428284JukelyThursday, May 2, 13
    • https://itunes.apple.com/us/app/jukely/id590428284LinesThursday, May 2, 13
    • ThanksAll example code available at:Watch out for an upcoming ebook at http://integrallis.comhttps://github.com/integrallis/okonawaThursday, May 2, 13