[MacRuby] #219: Feature: ObjC <=> Ruby Proxy interface
#219: Feature: ObjC <=> Ruby Proxy interface -----------------------------------------+---------------------------------- Reporter: ash@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------------+---------------------------------- Working with MacRuby is nice, but I saw an interesting feature of another ruby project called Johnson. Its a javascript bridge for ruby, it literally ties Spidermonkey into the Ruby runtime and lets you do everything from run and parse html DOM and pass objects between Ruby's runtime and Javascripts runtime. My point is they have a proxy class that gives one the ability to pass objects between the environments. This kind of feature might be useful for MacRuby, if I could define my ruby class in ruby then pass it to an Objective C proxy then have an Objective C class call it, it would be kind of nice. Here is Johnson: http://github.com/jbarnette/johnson/tree/master and here is a presentation that talks about some of the things I am talking about: http://rubyconf2008.confreaks.com/how-i-learned-to-love- javascript.html they use Johnson to make a ruby object and pass it to javascript and vise- versa. I am not an Objective C expert so there might be something in Objective C that might prevent this but if you can dynamically create a class that's function calls just bounce from an Objective C caller to a proxy to their Ruby implementation and I know you can do the opposite in ruby. This might be unnecessary or not needed for MacRuby, but I could see this being very useful for prototyping things, plus if you could proxy other Objective C classes into ruby without much work. -- Ticket URL: <http://www.macruby.org/trac/ticket/219> MacRuby <http://macruby.org/>
#219: Feature: ObjC <=> Ruby Proxy interface -----------------------------------------+---------------------------------- Reporter: ash@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------------+---------------------------------- Comment(by jbarnette@…): Thanks for mentioning Johnson! Glad you like it. One of MacRuby's fundamental changes is that Object < NSObject, so things already float across the language boundaries very easily. Much more easily than Johnson, in fact, since we have to manage two sets of proxies and a couple of uncooperative GC's. I think MacRuby already has everything you need. :) -- Ticket URL: <http://www.macruby.org/trac/ticket/219#comment:1> MacRuby <http://macruby.org/>
#219: Feature: ObjC <=> Ruby Proxy interface -----------------------------------------+---------------------------------- Reporter: ash@… | Owner: lsansonetti@… Type: enhancement | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | -----------------------------------------+---------------------------------- Changes (by eloy.de.enige@…): * status: new => closed * resolution: => invalid Comment: Indeed MacRuby is more efficient by not having proxies but real objects. The proxy model you are describing is actually what RubyCocoa uses. Thanks for taking the time to write this ticket though! :) -- Ticket URL: <http://www.macruby.org/trac/ticket/219#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby