224
❘
CHAPTER 11
Developing ASp.neT ApplicATionS
how to use the WebDev.WebServer utility to test your application quickly, even if you don’t have IIS
installed on your machine. Using WebDev.WebServer isn’t only a real time saver, but it makes your sys-
tem considerably more secure as well, so it’s a good idea to work with this utility whenever you can.
CoNSIdERINg IRoNPyTHoN WEb APPlICATIoN ComPATIbIlITy
IronPython (and Python for that matter) have huge potential for making Web sites signifi-
cantly easier to build and manage. In fact, there are a lot of options for using Python (and
IronPython) to perform Web development tasks that you can see at
http://wiki.python.org/
moin/WebProgramming
and
http://www.fredshack.com/docs/pythonweb.html
. The prob-
lem with IronPython is that it can’t use the C/C++ libraries used by Python, which means that
some of these solutions won’t work. For example, it’s unlikely that you could use IronPython in
a Common Gateway Interface (CGI) application because CGI relies on modules written in C/
C++. Consequently, the first rule for Web development with IronPython is to make sure that
IronPython can actually interact with the desired modules.
Unfortunately, IronPython isn’t integrated into Visual Studio. Because Visual Studio relies on some level
of integration to provide full Web development support, you’ll almost certainly find that some projects
are out of reach. It’s not that you can’t create them using IronPython; it’s that the process would be
so horribly time consuming and error prone that using another language would be a better idea. You
do have full .NET capability when working with IronPython, as demonstrated by the example in this
chapter. All you really need is to add Dynamic Language Runtime (DLR) support to the picture and
things will work out just fine.
The picture isn’t all gloom. IronPython actually proves to be a good development language for
some tasks. As you progress through this chapter, you’ll find that IronPython actually makes code
behind tasks exceptionally easy. It’s conceivable that you can build and test simple Web projects
using IronPython considerably faster than using another language such as C# or Visual Basic.NET.
It’s important to remember that you don’t have to work with IronPython alone. Your Web appli-
cation can include other technologies, such as Silverlight. You can also rely on other languages,
such as C# or Visual Basic.NET, to fill in the gaps in IronPython coverage. Having another lan-
guage at your disposal is all about flexibility, and IronPython is a great add-on language for any
Web application project.
Do'stlaringiz bilan baham: |