Professional IronPython


548592c16.indd 325 2/24/10 12:49:20 PM www.finebook.ir 326



Download 20,35 Mb.
Pdf ko'rish
bet341/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   337   338   339   340   341   342   343   344   ...   453
16
548592c16.indd 325
2/24/10 12:49:20 PM
www.finebook.ir


326

CHAPTER 16
ExtEnding ironPython Using C#
to perform the task. With careful planning, you could create an entire library containing all the 
forms required to address every need in an IronPython application. The second example is a Win32 
API extension that helps you better understand how extensions can provide access to low-level calls 
that you might not ordinarily be able to make — at least, not with ease. Even though the Python 
language is supposed to shield you from the vagaries of platform-specific coding, sometimes you 
really do need to know something more about the platform on which you’re working.
UNdERSTANdINg THE REqUIREmENTS foR AN ExTENSIoN
It’s important to understand that an extension, any extension, probably ties your code to Windows. 
Whenever you use an extension with IronPython, you rely on something other than the Python 
libraries to perform a task, which means you lose the platform independence for which Python is 
so famous. In short, extensions provide considerable flexibility and help you provide additional 
capabilities for IronPython, but this flexibility isn’t without cost. Every time you make a design 
decision of this sort, you must pay a price in the following:
➤➤
Reduced reliability: Due to increased failure points.


Weakened security: More languages mean more places where someone could leave a
security hole.


Impaired speed: Marshaling data between language barriers takes time.


Fewer platforms: In order to use an extension, you must find a platform that supports both 
IronPython and the extension language.
Writing an extension isn’t always straightforward. It isn’t as simple as writing some class library 
code and putting it in a DLL. In fact, you must spend considerable effort thinking about how an 
extension should be designed to make it useable. The following list considers just a few of the most 
important factors for your extension.
➤➤

Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   337   338   339   340   341   342   343   344   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish