USINg IRoNPyTHoN CoNSTRUCTIVELy
When you complete this chapter, you should have gained a number of new skills related to exten-
sions. Remember to use the simple extension example as the starting point for extensions that you
create. The more complex examples provide techniques you can use, but not necessarily implement
LISTINg 16-9
(continued)
548592c16.indd 356
2/24/10 12:49:28 PM
www.finebook.ir
Using IronPython Constructively
❘
357
directly in your own extensions. Of course, the starting point for this chapter describes how to work
with extensions in general and helps you consider issues related to extension design. This informa-
tion applies equally well to Visual Basic.NET extensions.
fIgURE 16-17:
The P/Invoke code tells you about the console window characteristics.
Before you move on to the next chapter, try all the examples in this chapter and discover how they
work. It’s important to choose the right extension language. Even though there’s overlap between
the tasks you can perform with C# and Visual Basic.NET, each language also has features that
make it the right choice for a particular task. In this chapter, you discover that C# works great
for low-level tasks that you might not be able to perform otherwise, such as directly accessing
the Windows security features. After you work through the examples in this chapter, make a list
of tasks that you might want to perform for your organization that involve C# extensions and
IronPython. Weigh the value of the C# and IronPython combination against other language choices.
As you gain experience in more languages, choosing the right language becomes harder because
each language has so much to offer.
Now that you’ve discovered the C# extension, it’s time to see the Visual Basic.NET extension in
action. Chapter 17 shows how to create extensions using Visual Basic.NET. Just like this chapter,
Chapter 17 provides you with a basic example you can use to build your own extensions with ease.
However, Chapter 17 also compares and contrasts the kinds of extensions you build using C# with
those that you typically build using Visual Basic.NET. For example, Visual Basic.NET excels at
database management tasks. You may actually want to come back to this chapter after you read
through and try out the examples in Chapter 17 so that you get the full amount of information
available from both chapters.
548592c16.indd 357
2/24/10 12:49:28 PM
www.finebook.ir
548592c16.indd 358
2/24/10 12:49:28 PM
www.finebook.ir
Do'stlaringiz bilan baham: |