Iron ruby in app scripting

5,060 views

Published on

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

Accompanying demo was of Iron7 running on WP7 - see http://iron7.com

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,060
On SlideShare
0
From Embeds
0
Number of Embeds
3,231
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Iron ruby in app scripting

  1. 1. IronRuby in-app scripting<br />@slodge – me@cirrious.com<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 />(“System::Windows::MessageBox.show‘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 />http://blogs.msdn.com/b/mikeormond/<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 – me@cirrious.com<br />

×