408
❘
CHAPTER 19
Using ironPython with Mono
IronPython does include support for Silverlight development. If you plan to use IronPython for Web
applications and need to support multiple platforms, you might want to look at Moonlight (
http://
mono-project.com/Moonlight
) instead. This Silverlight replacement works on the same platforms
that Mono does and should also work fine with IronPython.
Some of the extensions to Mono are well outside the scope of this book, but are interesting to
contemplate. For example, you can get Mono Touch (
http://monotouch.net/
) to develop appli-
cations for the iPhone and iPod Touch devices. The point is that you can probably find some form
of Mono to meet just about any need, but using Mono fully means learning some new techniques,
such as creating user interfaces using Gtk#.
Considering the Reasons for Using Mono
You already know the reasons that you’re using the .NET Framework and this chapter isn’t about
changing your mind. The .NET Framework is stable and many developers love the functionality it
provides them for building great applications. However, you could think of Mono as another tool
to extend the range of your applications. If for no other reason, the fact that you could run your
IronPython application on Linux or the Mac OS X makes Mono a good choice for some forms of
application development. In sum, the main reason for using Mono in place of the .NET Framework
is flexibility.
As previously mentioned, Mono and the .NET Framework aren’t precisely the same. The first thought
that most developers will have is that compatibility issues will be bad, and to a certain extent, they do
cause problems. However, Mono also provides functionality that you won’t find when working with
the .NET Framework. Features such as Gtk# actually make Mono a better product. In addition, with
Mono you have a lightweight Web server for ASP.NET pages, XSP, that works on every Mono plat-
form. Therefore, the differences between Mono and the .NET Framework aren’t always bad — some-
times they become downright useful.
Mono does provide direct support for IronPython, but you need to use a newer version of Mono (see
http://www.mono-project.com/Python
for details). The support isn’t all that good. The section
“Running the Application from the Command Line” later in this chapter demonstrates the prob-
lem of using the Mono implementation of IronPython. Even so, you do get IronPython support that
will likely improve as Mono improves, so this is an area where you can expect Mono to grow as an
IronPython platform. In reality, the Mono community is quite excited about IronPython. You can
find tutorials for using IronPython in a Mono environment at
http://zetcode.com/tutorials/
ironpythontutorial/
. If you want to see IronPython running under Mono on a Linux system, see
the screenshot and description at
http://www.ironpython.info/index.php/Mono
.
Do'stlaringiz bilan baham: |