The Problem Solver

Tell me and I will forget
Show me and I will remember
Involve me and I will understand
- Confucius -

Google Ads

This Blog

Syndication

Search

Tags

News





  • View Maurice De Beijer's profile on LinkedIn

Community

Email Notifications

Explore

Archives

IronPython in Action

I recently received a copy of IronPython in Action by Michael Foord and Christian Muirhead from Manning so I could review it so here it is Smile.

So why am I interested in a book about IronPython? Well I used to do some Python programming a number of years ago and found the language kind of nice to work with. Working with dynamic languages like IronPython relieves you from a lot of the code you have to write just to keep the compiler happy. Admittedly the compiler complains for good reason, to make you think about your code, but often you just add casts and that is all. Now I am not suggesting we dump C# and VB and all start coding all our applications in IronPython but a mix of dynamic and static certainly makes sense to me.

But more about the book.

Part 1 is about getting started with IronPython

The first few chapters provide an overview of how IronPython and Python itself came to be and the basic syntax. The basic syntax of IronPython is not difficult to learn for C# or VB developers as Python is also an object oriented language. One things that tends to freak out people when they start is that the indentation of code matters. As Michael and Christian explain this is not a bad thing but quite brilliant as everyone does so anyway for readability purposes.

Chapter 3 is quite interesting as that explains the interoperability between IronPython and regular complied .NET objects. This is an important chapter as IronPython by itself would not be very interesting, it's the combination with the full .NET framework and all the embedded functionality and the ease of working of IronPython where the sweet sport is.

Part 2 is about the code development techniques

Chapter 4 covers the basics of creating applications in IronPython. This covers design patterns like the Model View Controller (MVC) and how they apply to IronPython. Chapter 5 covers Python functions and how you can use some of the dynamic Python function features to read an XML document. In this chapter we get to see some of the using a dynamic language as compared to a static language like C#.

Chapter 6 is about working with properties. IronPython properties are somewhat different that C# or VB properties. Chapter 7 is about unit testing IronPython code. With a dynamic language like Python unit testing is even more important that with regular .NET code. Even though Python is a dynamic language it turns out that mock objects and dependency injection are still as much a part of IronPython unit testing as they are with regular .NET code. The chapter close of with a part about higher order testing and how to test the user interface.

Chapter 8 is about all the magic functions like __init__(self) that Python uses as a naming convention just like we use  interfaces in C#. Again some of the concepts might seem a little unusual but once you get used to them it is really quite easy.

 

Part 3 is about some of the more advanced concepts of using IronPython.

Chapter 9 covers programming Windows Presentation Foundation (WPF) with IronPython. With chapter 10 we are introduced into system administration using IronPython. This is an area where scripting languages are frequently used and IronPython is a perfect candidate. One popular choice for administration scripts is PowerShell and there is a whole section devoted to using PowerShell from within IronPython.

Chapter 11 is about ASP.NET and IronPython. Another interesting place to use IronPython is databases and web services, something covered in chapter 12.

Of course the DLR is part of Silverlight so IronPython is a prima candidate to use with Silverlight development as well. This subject is covered in chapter 13.

 

Part 4 is about about interoperability between IronPython by embedding the IronPython runtime inside our own .NET applications and extending IronPython with C# or Visual Basic code.

 

Conclusion

This book is a good read for all .NET developers who want to know about the new trend towards the dynamic languages and IronPython in particular. You get a good explanation what IronPython can do for you and how to go about solving every day programming problems. With the current push towards dynamic behavior, even in languages like C#, every experienced .NET developer should read this book!

Enjoy.

Published Tue, Feb 3 2009 15:54 by Maurice
Filed under: ,

Comments

# Maurice De Beijer on IronPython in Action — IronPython in Action News@ Tuesday, February 03, 2009 12:37 PM

Pingback from  Maurice De Beijer on IronPython in Action — IronPython in Action News

# re: IronPython in Action@ Tuesday, February 03, 2009 12:41 PM

Thanks Maurice. The book has actually gone into typesetting (layout) now and so it won't be long!

# Arjan`s World » LINKBLOG for February 3, 2009@ Tuesday, February 03, 2009 3:19 PM

Pingback from  Arjan`s World    » LINKBLOG for February 3, 2009

# IronPython in Action | No Brainer Profits@ Tuesday, February 03, 2009 4:59 PM

Pingback from  IronPython in Action | No Brainer Profits

# Roxanne YouTube@ Thursday, February 05, 2009 10:26 AM

Hello!

See what video I have found on YouTube!

www.youtube.com/watch

by roxanne

# Roxanne YouTube@ Friday, February 06, 2009 2:37 AM

Hello!

See what video I have found on YouTube!

oxhnwiyqa.free-site-host.com

by roxanne

# IronPython in Action - The Problem Solver@ Monday, February 09, 2009 1:15 PM

Thank you for submitting this cool story - Trackback from DotNetShoutout

# Hello From Poland@ Wednesday, April 08, 2009 11:31 AM

Hello to all ! Great site. I am new here greetings to all from Poland.

# Hello From Poland@ Thursday, April 09, 2009 12:53 AM

Hello to all ! Great site. I am new here greetings to all from Poland.

# Hello From Poland To All People@ Friday, April 10, 2009 6:19 AM

Hello to all ! Great site. I am new here greetings to all from Poland.

# Hello From Poland To All People@ Friday, April 10, 2009 7:43 AM

Hello to all ! Great site. I am new here greetings to all from Poland.

# Hello From Poland To All People@ Friday, April 10, 2009 11:06 AM

Hello to all ! Great site. I am new here greetings to all from Poland.