Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
MacRuby
                           Ruby + ObjC




Friday, February 6, 2009
COCOA
             Apple's Objective-C based programming environment for
                                   Mac OS X
Frida...
COCOA


    • frameworks

    • APIs

    • accompanying          runtimes

                           Goal: native Mac ap...
OBJECTIVE-C 2.0


    • reflective

    • object-oriented

    • garbage              collection

    • 32         and 64-b...
RUBY


                           obj.method parameter




Friday, February 6, 2009
OBJECTIVE-C 2.0


                           [obj method:parameter];




Friday, February 6, 2009
RUBY


                           friends = []




Friday, February 6, 2009
OBJECTIVE-C 2.0


                NSMutableArray *friends =
             [[NSMutableArray alloc] init];




Friday, Februa...
COCOA



                       Goal => native Mac applications => ObjC




Friday, February 6, 2009
:emo:
Friday, February 6, 2009
RUBYCOCOA


                   bridge between
          the Objective-C runtime and MRI




Friday, February 6, 2009
RUBYCOCOA


               No more ObjC code to write :)




Friday, February 6, 2009
RUBYCOCOA


                    Write cocoa apps in RUBY :)




Friday, February 6, 2009
RUBYCOCOA


          potentially prohibitive cost :(




Friday, February 6, 2009
RUBYCOCOA


                           conversion cost :(




Friday, February 6, 2009
RUBYCOCOA


                       message forwarding cost :(




Friday, February 6, 2009
MacRuby




Friday, February 6, 2009
MacRuby




                           APPLE'S OPEN SOURCE
                                  PROJECT



Friday, February 6...
MacRuby




                           NOT A BRIDGE




Friday, February 6, 2009
MacRuby




                           BUILT ON TOP OF THE
                           OBJECTIVE-C RUNTIME



Friday, Febru...
MacRuby




   
 all classes 
 => Objective-C
   
 all methods 
=> Objective-C
   
 all objects 
=> Objective-C

Friday, F...
MacRuby




                           CoreFoundation




Friday, February 6, 2009
MacRuby




                           native CoreFoundation
                                  data types



Friday, Febru...
MacRuby




                           native threads




Friday, February 6, 2009
MacRuby




           Objective-C Garbage Collector




Friday, February 6, 2009
CODE EXAMPLE




Friday, February 6, 2009
$ macirb
     >> friends = []
     => []
     >> friends.class
     => NSMutableArray
     >> friends << quot;Juanquot;
  ...
>> friends << {first_name: quot;Laurentquot;,
                   last_name: quot;Sansonettiquot;}
   => [quot;Juanquot;, q...
>>           name = quot;Matt Aimonettiquot;
   =>           quot;Matt Aimonettiquot;
   >>           name.uppercaseString...
X-CODE ENVIRONMENT




Friday, February 6, 2009
FREE



                           http://developer.apple.com/TOOLS/xcode/
Friday, February 6, 2009
WELL DOCUMENTED



                            http://developer.apple.com/index.html
Friday, February 6, 2009
WELL DONE
Friday, February 6, 2009
GREAT TOOLS
Friday, February 6, 2009
NEW PROJECT
Friday, February 6, 2009
MacRuby.framework
Friday, February 6, 2009
rb_main.rb
Friday, February 6, 2009
# Loading the Cocoa framework. If you need to load more
         frameworks, you can
         # do that here too.
        ...
MainMenu.nib
Friday, February 6, 2009
Friday, February 6, 2009
V of MVC
Friday, February 6, 2009
PREPARE BINDINGS
Friday, February 6, 2009
C of MVC
Friday, February 6, 2009
class Controller
                 attr_writer :friendsTableView

                    def awakeFromNib
                    ...
class Controller
             attr_writer :friendsTableView
            end




                           ivar = outlet
F...
class Controller

                      def awakeFromNib
                      end

               end




            cal...
class Controller

                      def awakeFromNib
                        @friends = []
                        @fr...
class Controller

                   def addFriend(sender)
                   end

               end




                ...
bind the UI with the Controller
Friday, February 6, 2009
NSTableDataSource
                            informal protocol




Friday, February 6, 2009
def numberOfRowsInTableView(view)
                   end




                NSTableDataSource protocol
Friday, February 6...
def tableView( view,
                    objectValueForTableColumn:column,
                    row:index )
            end...
def tableView(view,
                            setObjectValue:object,
                            forTableColumn:column,
...
Compile
Friday, February 6, 2009
HOTCOCOA
Friday, February 6, 2009
PURE RUBY SEXINESS
Friday, February 6, 2009
NO X-CODE
Friday, February 6, 2009
RUBY DSL FOR COCOA
Friday, February 6, 2009
$ hotcocoa sdruby




Friday, February 6, 2009
$ hotcocoa sdruby




                            PROJECT SETTINGS
Friday, February 6, 2009
$ hotcocoa sdruby




                    CORE OF THE APP CODE
Friday, February 6, 2009
$ hotcocoa sdruby




                               MENU BAR
Friday, February 6, 2009
$ hotcocoa sdruby




                               RAKE TASKS
Friday, February 6, 2009
$ hotcocoa sdruby




                             APP RESOURCES
Friday, February 6, 2009
def start
      application :name => quot;Sdrubyquot; do |app|
        app.delegate = self
        window(:frame => [100, ...
application :name => quot;Sdrubyquot; do |app|
               end




                           NSApplication
Friday, Feb...
application :name => quot;Sdrubyquot; do |app|
                 app.delegate = self
               end




               ...
# file/open
                def on_open(menu)
                end

                # file/new
                def on_new(m...
window(:frame => [100, 100, 500, 500], :title => quot;SDRubyquot;) do |win|
     end




                           NSWind...
label(:text => quot;Hello from HotCocoaquot;, :layout => {:start => false})




                           NSTextField hel...
win << label(:text => quot;Hello from HotCocoaquot;)




         contentView.addSubview helper
Friday, February 6, 2009
win.will_close { exit }




                           window callback
Friday, February 6, 2009
$ macrake




Friday, February 6, 2009
USE ANY COCOA
                             FRAMEWORK



Friday, February 6, 2009
WEBKIT




Friday, February 6, 2009
framework 'webkit'




Friday, February 6, 2009
win << web_view( :layout => {:expand => [:width, :height]},
                     :url => quot;http://sdruby.comquot;)




...
Friday, February 6, 2009
$ macrake deploy

                                  Raffle.app




Friday, February 6, 2009
AND MUCH MORE




Friday, February 6, 2009
DEMO APPS




Friday, February 6, 2009
SD RUBY RAFFLE APP
Friday, February 6, 2009
¿What to do
                           with MacRuby?



Friday, February 6, 2009
WEB APP
                           CLIENT



Friday, February 6, 2009
REUSE RUBY CODE




Friday, February 6, 2009
RETHINK DESKTOP APPS




Friday, February 6, 2009
WEBKIT INTEGRATION




Friday, February 6, 2009
¿MacRuby’s future?




Friday, February 6, 2009
MUCH BETTER
                           PERFORMANCE



Friday, February 6, 2009
NEW VM




Friday, February 6, 2009
SOURCE OBFUSCATION




Friday, February 6, 2009
COMPILED CODE




Friday, February 6, 2009
OPTIMIZATIONS BASED ON
             THE UNDERLYING OS



Friday, February 6, 2009
SOLID & SUPPORTED WAY TO
          WRITE COCOA APPS



Friday, February 6, 2009
¿MAINSTREAM WAY TO WRITE
            COCOA APPS?



Friday, February 6, 2009
¿IPHONE OUTPUT?




Friday, February 6, 2009
resources:
                                       http://www.macruby.org
                            http://tinyurl.com/ma...
Props to
                              Rich Kilmer
                              (hotcocoa)
                              ...
Nächste SlideShare
Wird geladen in …5
×

MacRuby Objective-C Garbage Collector Friday, MacRuby - When objective-c and Ruby meet

32.928 Aufrufe

Veröffentlicht am

MacRuby




Objective-C Garbage Collector




Friday, February 6, 2009

Veröffentlicht in: Technologie
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Visit Here to Download eBook === http://zakuratest.com/MacRuby:-The-Definitive-Guide:-Ruby-and-Cocoa-on-OS-X.html
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Objective-C Programming: The Big Nerd Ranch Guide (2nd Edition) (Big Nerd Ranch Guides) --- http://amzn.to/1R982Rx
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Objective C: Crash Course - The Ultimate Beginner's Course to Learning Objective C Programming in Under 12 Hours --- http://amzn.to/1T2JKuO
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

×