ورود

View Full Version : استفاده از اشیاء دات نت در برنامه های دلفی ( Win32 )



Inprise
جمعه 01 اسفند 1382, 05:32 صبح
سلام ،

بورلند با ارائه نسخهء جدید دلفی ، دلفی برای دات نت ، قدرتمند ترین مسیر توسعهء کاربردهای دات نت رو ، این باز هم برای برنامه نویسان دلفی باز کرد . اما ممکنه توسعه گران یا تیم های توسعه نرم افزاری باشند که تمایل داشته باشند با ترکیب بستر دات نت و بستر Win32 از مزایای توسعه سریع نرم افزار های توزیع شده استفاده کنند . دات نت امکانی رو ارائه میده که با استفاده از اون میشه یک محصور کننده از جنس COM حول شیء دات نت ایجاد کرد که برنامه نویسان Win32 بتونند با استفاده از Interface هاش ، از مزایای اون شیء استفاده کنند . اما شاید یکی از دلائل مهم تغییر مفهوم دسترسی به شیء در دات نت نقاط ضعف COM باشه فلذا شاید استفاده مجدد از COM های باز-تولید شده از اشیاء دات نت کار جالبی نباشه ، خصوصا" که مدیریت ثبت و نگهداری اون کار مشکلی است .

ManagedVCL اومده تا این مشکل رو حل کنه ، با روش خودش . از طریق ManagedVCL شما رابطهای اشیاء دات نت رو بدون نیاز به تبدیل به COM یا ... براحتی در محیط دلفی و سی بیلدر استفاده میکنید . یعنی با استفاده از ManagedVCL شما میتونید براحتی در محیط دلفی 7 و ما قبل از اون برنامه بنویسید و همزمان براحتی و بدون نیاز به هیچ فعالیت اضافی از اشیاء دات نتی که خودتون یا دیگران تولید کرده اند استفاده کنید . یقینا" برنامهء نهائی یک برنامهء Win32 خواهد بود که داره از برخی قابلیتهای دات نت استفاده میکنه و قاعدهء Reusable Coding هم به نوع خاصی پوشش داده میشه .

ManagedVCL نمیتونه از رخدادهای دات نت استفاده کنه ( برنامه نویسان دات نت میدونن که رخداد در دات نت مبتنی بر Message Dispatching نیست و کاربری از Delegate ها هم فقط روی بستر دات نت امکان پذیره ) ، همچنین استفاده از کنترلهای دات نت ( که ترکیب Managed GDI Plus و Delegate درش موجوده ) امکان پذیر نیست .

"مهمترین" ویژگی این ابزار اینه که بوسیلهء اون میتونید از بخش قابل توجهی از امکانات ADO .NET داخل برنامه های دلفی و سی بیلدر استفاده کنید . هر چند کد شما Unmanaged است اما از رابط COM برای اتصال به دات نت استفاده نمیکنه . کد شما مستقیما" به کدهای Managed دات نت متصل میشه .

برخی از قابلیتها :

<span dir=ltr>
Create .Net objects without registering them with COM.
Create and use .Net objects that are not COM visible.
Create .Net objects using parametrized constructors.
Call properties/methods/fields of .Net object including static properties/methods/fields.
Handle .Net exceptions and get all .Net exception properties including exception type name, StackTrace etc.
Get information about loaded instance of .Net framework such as memory usage and size of heap by generation.

</span>

استفاده از ADO .NET :

<span dir=ltr>
ADO.NET is a set of classes that expose data access services to the .NET programmer. ADO.NET provides a rich set of components for creating distributed, data-sharing applications. It is an integral part of the .NET Framework, providing access to relational data, XML, and application data. ADO.NET supports a variety of development needs, including the creation of front-end database clients and middle-tier business objects used by applications, tools, languages, or Internet browsers.

Managed VCL contains components to work with ADO.Net objects. These components are named as well as in ADO.Net and have TClr prefix (for example, TClrSqlConnection, TClrDataTable) except that ADO.Net DataSet wrapper is named TClrDatabase to distinguish it from VCL TDataSet.

ADO.Net objects could be divided on two parts:

Objects that actually work with DBMS - those are Connection, Command, DataAdapter, DataReader and CommandBuilder.
Objects that represent client-side cache - those are DataSet, DataTable and DataView.
ADO.NET cleanly factors data access from data manipulation into discrete components that can be used separately or in tandem. ADO.NET includes .NET Framework data providers for connecting to a database, executing commands, and retrieving results. Those results are either processed directly, or placed in an ADO.NET DataSet object in order to be exposed to the user in an ad-hoc manner, combined with data from multiple sources, or remoted between tiers. The ADO.NET DataSet object can also be used independently of a .NET Framework data provider to manage data local to the application or sourced from XML.


</span>

قابلیت پذیرش اسکریپتهای JScript .NET در زمان اجرا ، برای تولید برنامه های برنامه پذیر ( با دسترسی کامل به زمان اجرای دات نت ) :

<span dir=ltr>

JScript .NET is a modern scripting language with a wide variety of applications. It is a true object-oriented language, and yet it still keeps its "scripting" feel. JScript .NET maintains full backwards compatibility with previous versions of JScript, while incorporating great new features and providing access to the common language runtime and .NET Framework.


</span>

سایت توزیع کننده (http://www.managed-vcl.com)

نسخء آزمایشی اش بدون سورس است و سی روز کار میکنه و قیمت نسخهء بدون محدودیت ، کامل و با سورس اش 250 دلار است .

نسخهء کامل این ابزار ، با سورس بعد از افتتاح قریب الوقوع داونلود سنتر سایت در اختیار افراد مجاز بخش دلفی ، به رایگان ، قرار خواهد گرفت . افرادی که زودتر میخوان بهش دسترسی داشته باشند یا در هر صورت امکان داونلود 13 مگابایت رو ندارن میتونن از بخش فروشگاه سایت برنامه نویس بخرنش .

خوش و موفق باشید .

Inprise , Excellence Endures