Saturday, May 02, 2009

Book: IronPython Studio in Practice (Polish)

IronPython in Action was the first book in English on IronPython (and is still the only one, although Pro IronPython is due out later this year).

IronPython in Action wasn't the first book on IronPython though; that distinction belongs to IronPython (Windows Script Programming), in Japanese.

There is now another book on IronPython: IronPython Studio in Practise by Mysior Marian. This book is 172 pages and in Polish, so its proper title is: IronPython Studio w praktyce.

The translated description reads as follows:
The book presents a new approach to Python, the use of visual tools and libraries offered by the package, and Microsoft Visual Studio. NET Framework. The new environment for building applications in Python, which is a package of IronPython Studio, simplifies programming, supporting graphic designer tools and libraries ustandartyzowanymi known languages such as C # and Visual Basic. It completely new quality to the language Python.

The publication is addressed to people who want to know the basics of Python and the principles work in an environment of IronPython Studio. The reader does not require knowledge of Python or other programming tools.

The book is a set of dozens of exercises - examples, introducing the reader to the process of creating applications in IronPython Studio. While working with the exercises reader is familiar with the following topics:
  • Programming Environment
  • Data entry, formatting the results
  • Data types, expressions and operators
  • Control Program
  • Monitoring data validation, handling emergencies
  • Sub - (??? presumably a mistranslation)
  • GDI + Graphics
  • Custom Class
  • User Interface
  • Databases
  • With Windows without graphics support.
This is an impressive list of topics, and an IDE driven approach to learning could be a very practical way of helping people get started with IronPython.

Personally I would question the use of IronPythonStudio as a production-quality IDE. IronPython Studio is an example of using the Visual Studio 2008 Shell to create tools that can be run inside Visual Studio or as separate (and freely distributable) tools.

It uses IronPython 1, and whilst it has features like compilation to executable, adding references to assemblies through a dialog plus Windows Forms and WPF visual designers. These features tie you to IronPython 1 - and generate code that can't be run under IronPython 2 without manually modifying the generated code. The designers have an unfortunate tendency to crash regularly and it is hard to create projects that use external libraries (like the Python standard library).

IronPython Studio has Python syntax highlighting and intellisense. The intellisense is very basic, doing no real analysis of the code. You get autocomplete of the primitive types (integers and strings etc) but very little else.

Editors like Vim & Emacs tend to use ctags based autocomplete, which I'm not a big fan of as they usually offer you far too many members. (Alternatively you can plug in other tools, like PySmell for example.) Other Python IDEs will actually do static analysis of your source code and type inferencing to provide very good autocomplete.

I've blogged briefly about tools for dynamic languages (particularly Python of course).

If you need the visual designers, the best approach I've found is to use them from Visual Studio (Express) generating C#. You can then import and use the results natively from IronPython, subclassing to add functionality.

I've also been working with the Wingware guys to add autocomplete for .NET types to their Wing IDE. They have a clever mechanism for doing up-front static analysis of libraries, which can include information about return types of methods and so on. This is already phenomenally useful to me, and a separate HOWTO / blog entry will follow shortly...

No comments:

Post a Comment

Note: only a member of this blog may post a comment.