1 / 13

Using Dynamic Languages to Build Scriptable Apps

FT30. Using Dynamic Languages to Build Scriptable Apps. Dino Viehland Senior Software Development Engineer Microsoft. Why dynamic languages?. Simple enough for non-programmers Capable enough for programmers

cheryl
Télécharger la présentation

Using Dynamic Languages to Build Scriptable Apps

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FT30 Using Dynamic Languages to Build Scriptable Apps Dino Viehland Senior Software Development Engineer Microsoft

  2. Why dynamic languages? • Simple enough for non-programmers • Capable enough for programmers • “Python, like many good technologies, soon spreads virally throughout your development team and finds its way into all sorts of applications and tools…Python scripts are used in many areas of the game.” • Mustafa Thamer, Civilization IV development team • Let users improve your application • Create an Application Ecosystem • Users can share scripts, adding value to your apps • Virtuous cycle • Enable Quick Fixes in the field

  3. Dynamic Languages… Consumers

  4. Keeping it Simple def fact(n)     return 1 if n == 0     n * fact(n-1) end puts fact(13) def fact(n): if n == 0: return 1 return n * fact(n-1) print fact(13) using System; public class MathClass { public static int Factorial(int n) { if (n == 0) { return 1; } return n * Factorial(n – 1); } public static void Main(string[] args) { Console.WriteLine(Factorial(13)); } }

  5. Dynamic Language Runtime • Infrastructure for creating dynamic languages • More languages available • Shared interop protocol • Dynamic languages can talk to each other • Static languages can talk to dynamic languages • Lightweight hosting API • One API, multiple languages • Users can choose the best language

  6. DLR Hosting ScriptRuntime ScriptScope ScriptEngine ScriptSource

  7. Demo - Hosting • Getting Started • Getting Languages • Scopes • Injecting our object model • Getting delegates back • Working with classes • Using C# Dynamic • Getting More Dynamic

  8. Downloads… • IronPython • http://ironpython.codeplex.com • IronRuby • http://ironruby.net • DLR • http://dlr.codeplex.com • Source updated daily

  9. Summary • Scripting Languages can extend your application • DLR provides common APIs for multiple languages • DLR enables C# and VB.NET to seamlessly access

  10. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  11. Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….

More Related