Open Source .NET


Published on

An introduction to IronPython delivered to the San Luis Obispo .NET User Group on 7/14/09.

Published in: Technology, Art & Photos
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Open Source .NET

  1. 1. Open Source .NET IronPython, the DLR, and your toolkit
  2. 2. Agenda Introductions IronPython, the DLR, and open source in the .NET world The Big Demo: Embedding IronPython in C# Why do this? Conclusions
  3. 3. The Presentation Stack Dell Mini 9 GNU/Linux Kernel 2.6.28 Ubuntu Linux 9.04 (“Jaunty”) Mono 2.4 (includes C# 3.0 support) IronPython 1.1.1 (approximates CPython 2.6)
  4. 4. About your host Christopher Groskopf Gainfully employed at Cal Poly Ten years programming Payroll Systems experience (two years Analyst—tools paying the bills) development, systems integration, Mostly Python, C#, and and automation C/C++ Bootstrapping: Linux, Windows, and Onyxfish ARM embedded
  5. 5. Credit where credit is due This presentation is loosely based on one by Michael Foord—IronPython guru with Resolver Systems and author of IronPython in Action. His site: His book: Resolver One, an application he works on, is the largest application written in IronPython: 190,000 lines of code (including tests).
  6. 6. The XKCD Argument for Python
  7. 7. The evidence Duck typing Flexible syntax Designed to be read Defined style conventions Libraries for everything (batteries included) Tons of liberally licensed code available Runs everywhere (C, Jython, PyPy, IronPython) Fanatical user-base (has a philosophy)
  8. 8. One example # Updates the last modified time on all Python # scripts in the current working directory. import glob import os py_fnames = glob.glob('*.py') paths = [os.path.abspath(f) for f in py_fnames] for path in paths: os.utime(path, None) print 'Touched %i files' % len(paths)
  9. 9. Why IronPython? Everything great about Python, plus the .NET Libraries.
  10. 10. So how does it work? Get the DLR: Get IronPython: The DLR allows you to host dynamic languages on .NET Not just Python: also Boo, Lua, Ruby, Scheme and others (or roll your own) The DLR is now maintained by Microsoft and will be shipped with the CLR with .NET 4.0
  11. 11. Demo Time!
  12. 12. When to use IronPython? Line-of-business application development Prototyping As a rules/logic definition language for a large .NET application (games!) As a plugin language for end-user development To provide a console interface to an application Because your bored and making programming fun gives your life meaning again
  13. 13. How does Mono fit in? IronPython + The DLR + Mono = Fully open-source, cross-platform .NET stack (Woot!)
  14. 14. Keep in mind that... C# 4.0 introduces the 'dynamic' keyword, which brings dynamic programming functionality to C# and provides native interoperability with DLR languages IronPython is now being supported and maintained by an internal Microsoft team IronPython fills a crucial niche in Microsoft's cadre of supported development languages And most importantly...
  15. 15. The future is language independent For new applications, language selection doesn't matter that much Library support matters Documentation matters Readability matters Interoperability matters a lot Choosing a flexible language saves time, money, and sanity
  16. 16. In conclusion...
  17. 17. Python =
  18. 18. One more thing! th Effective July 7 both C# and the CLI are covered by the Microsoft Community Promise. NO MORE PATENT FUD You're cross-platform Mono/.NET applications are now unquestionably and irrevocably legal. (We really can all live together!)
  19. 19. Links / Questions? My Company: My Blog (for these slides): Python: IronPython: DLR: Michael Foord: Mono: Ubuntu: