Windows Forms, Web Controls, and GDI

I l @ ve RuBoard

Windows Forms, Web Controls, and GDI+

If you were developing programs for Windows clients or servers at any time in the last 10 years , it's very likely that you were using Microsoft Foundation Classes. MFC is a great system for producing consistent and fairly complex user interfaces that are easy to create using wizards. The disadvantage of MFC comes from the fact that management of operational items such as collections, graphics, file management, serialization, and so on was built into the MFC framework classes themselves . Probably about 85% of what you deal with in MFC involves an object-oriented class "wrapper" on some low-level construct. .NET breaks that mold. The system namespace ”with all the operational bits and pieces like native data types, collections, XML serialization, and so on ”is a grab bag of ready-made, inherently object-oriented components . The framework for creating applications is consequently simpler.

On the client, Windows Forms is the vehicle for the windowing application. It is unlike MFC inasmuch as a Windows Forms application is mostly all code. Dialog boxes and form views that under MFC were laid out in resources are now created by code that sets properties in classes based on System.Windows.Forms.Form . Windows Forms applications are constructed from a class hierarchy and use the capabilities of the CLR to create a powerful but compact Windows application.

Web Controls employ a different type of user interface paradigm. They work on the principle of the disconnected GUI. Java programmers have had the servlet, an application that runs on the server, effectively on behalf of the client, for some time. The servlet performs computations , assists in user interactions, and works the business logic of a Web application while the user is at the other end of a Web connection using a "thin client" browser. The complexity of a Web application might be such that the HTML displayed on that thin client will change from moment to moment, such as when a user clicks a button that results in a UI change. The page will be refreshed behind the scenes, and a new HTML page that reflects the differences will be sent to the client browser. Generally, the HTML stream is constructed on-the-fly as the page is sent, so the GUI seen by the user is rich and dynamic.

Microsoft has answered this with its own version of servlets: server-side Web Controls. These components provide the subportions of a distributed application in the same way that MFC extension controls enhance a desktop application. The application and the controls that help to produce its look and feel run on the server, and the user interface is projected back to the client machine as an ASP-like stream of dynamically created HTML.

GDI+, like its predecessor GDI (the graphics device interface) is a much refined, immediate mode, graphics API that includes such niceties as 2D rotation and scaling plus alpha blending and transparency. It is also very fast and takes advantage of advances made to raster graphic processing that DirectX provides to older systems.

I l @ ve RuBoard


C# and the .NET Framework. The C++ Perspective
C# and the .NET Framework
ISBN: 067232153X
EAN: 2147483647
Year: 2001
Pages: 204

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net