C# 0 The Complete Reference


A Brief History of Windows Programming



Download 4,07 Mb.
Pdf ko'rish
bet1048/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   1044   1045   1046   1047   1048   1049   1050   1051   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

A Brief History of Windows Programming

To appreciate the benefits that C# and the .NET Framework bring to Windows programming, 

it is necessary for you to understand a bit of its history. When Windows was first created, 

programs interacted directly with the Windows Application Programming Interface (API), 

847

CHAPTER


www.freepdf-books.com


848

 

P a r t   I I :  



E x p l o r i n g   t h e   C #   L i b r a r y

which is an extensive set of methods defined by Windows that programs call to access the 

various functions provided by Windows. API-based programs are very long and complicated.

For example, even a skeletal API-based program requires about 50 lines of code. API-based 

programs that perform any useful function have 

at least

 several hundred lines of code, and 

real applications have several thousand lines of code. Thus, in the early days, Windows 

programs were difficult to write and maintain.

In response to this problem, class libraries were created that encapsulated the functionality

of the API. The most important of these is the Microsoft Foundation Classes (MFC). Many 

readers of this book will be familiar with MFC. MFC is written in C++, and MFC-based 

programs are also written in C++. Because MFC brought object-oriented benefits, the process 

of creating a Windows program was simplified. However, MFC programs were still fairly 

complicated affairs, involving separate header files, code files, and resource files. Furthermore, 

MFC was only a “thin wrapper” around the API, so many Windows-based activities still 

required a significant number of explicit program statements.

C# and the .NET Framework’s Forms library offer a fully object-oriented way to approach 

Windows programming. Instead of providing just a wrapper around the API, the Forms 

library defines a streamlined, integrated, logically consistent way of managing the development 

of a Windows application. This level of integration is made possible by the unique features 

of the C# language, such as delegates and events. Furthermore, because of C#’s use of garbage 

collection, the especially troubling problem of “memory leaks” has been nearly eliminated.

If you have already programmed for Windows using either the API or MFC, you will 

find the Windows Forms approach remarkably refreshing. Windows Forms makes it nearly 

as easy to create a Windows application as it is to create a console application.


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   1044   1045   1046   1047   1048   1049   1050   1051   ...   1096




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