Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Iron ruby in app scripting


Published on

"Grok talk" given at DDD9 - how to use IronRuby inside .Net 4 apps.

Accompanying demo was of Iron7 running on WP7 - see

Published in: Technology
  • Follow the link, new dating source: ❤❤❤ ❤❤❤
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Iron ruby in app scripting

  1. 1. IronRuby in-app scripting<br />@slodge –<br />
  2. 2. 3.5, 4.0<br />WinForms<br />WPF<br />Silverlight<br />Mono<br />ASP.Netw/woMVC<br />Sharepoint/Umbraco/DNN<br />Azure<br />PowerShell Scriptlets<br />WP7 (Compact Framework restrictions apply)<br />IronRuby - Available across .Netdom<br />
  3. 3. Download IronRuby1.1.1 or later - Codeplex/GitHub<br />Reference the Assemblies<br />Write some code:<br />How to embed Ruby in an app<br />var engine = Ruby.CreateEngine();<br />engine.Execute<br />(“‘Hello DDD’”);<br />
  4. 4. .Net powered scripting…<br />Load more assemblies for the scripts to play with<br />Pass in references to application objects<br />Write more Ruby – including event driven scripting<br />var engine = Ruby.CreateEngine();<br />engine.Runtime.LoadAssembly(typeof(SubModel).Assembly);<br />engine.Runtime.Globals.SetVariable(“Model", myModel);<br />engine.Execute(@“<br /> sub = SubModel.newModel.load_something(sub)<br />Model.on_loaded { |whatever| dude(whatever) }<br />”);<br />
  5. 5. User customisable scripts<br />Complex Data Files – e.g. game levels<br />Plugins – e.g. paint+<br />Wherever functionality might be changed after shipping<br />VBA/ActiveScripting/Automation replacement<br />Enterprise apps?<br />Wheremight it be useful?<br />
  6. 6. Iron7 – Inspired by… Sharp MZ80K<br />> 10 PRINT “HELLO DDD”<br />> 20 GOTO 10<br />> RUN<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br />> HELLO DDD<br /><br />
  7. 7. In action…<br />
  8. 8. Network, Canvas, Logic, Maths, Animation, Sound, GPS, Accelerometer… code!<br />
  9. 9. IronRuby in-app scripting:- easy to embed- easy to script- full access to .net types- powerful<br />@slodge –<br />