Solution Architecture


As you’ve seen in this book, .NET provides good prefabricated functionality for solving the problems of desktop developers as well as those that server developers deal with. I covered the problems that are common to both in Chapter 2. Desktop developers will use and like the common language runtime code-reuse model, its versioning and memory management capabilities, its easy deployment of private assemblies, its organization of the system namespace, its security features, and its interoperation with COM and native DLLs. XML Web services, described in Chapter 4, will give desktop developers something to design products for and a way of connecting to the server back end.

Many .NET common language runtime features help both server and desktop developers.

Microsoft .NET also provides a rich set of functionality to desktop developers, which goes by the stunningly uninformative name of Windows Forms. Windows Forms provides .NET classes that contain prefabricated user interface components for many of the features common to most desktop apps. If you think of a cross between Visual Basic and the MFC, implemented in .NET and thus available to any language, you’ll have about the right mental model. Windows Forms provides support for such features as menus, toolbars, and status bars; printing and print preview; hosting of ActiveX controls; and easy access to databases and XML Web services. It is such a large, rich set of functionality that this chapter can only provide the barest skim of its surface. Doing justice to Windows Forms requires an entire book, one devoted solely to the subject, and Charles Petzold has written exactly that. Although it’s entitled Programming Microsoft Windows with C# (Microsoft Press, 2001), its 1300+ pages are devoted almost entirely to Windows Forms in their various permutations. Programmers who learned their Windows programming from Petzold in C, as did I, back when the world was new (remember TranslateMessage() and DispatchMessage()?), will find his approach familiar and comfortable, like eating chicken noodle soup while wearing a soft, well-worn flannel shirt.

Windows Forms is a package that provides prefabricated user interface elements integrated with the common language runtime.

start sidebar
Tip from the Trenches

Anyone expecting to do serious work with Windows Forms needs to understand the underlying windowing system on which it is based. My clients report that the best, and to my mind only, way of accomplishing this is to read an early edition of Petzold. The fourth edition (Programming Windows 95, Microsoft Press, 1996) and fifth edition (Programming Windows, Microsoft Press, 1998) of his book cover user interface programming in 32-bit Windows very well. Both editions are available from most online used bookstores, and the time you spend at least skimming this book will repay itself many times over.

end sidebar

Warning

The user interface capabilities of Windows Forms are double-edged, as are all powerful tools. You can use them to write excellent user interfaces or terrible ones. As war is too important to be left to generals, so user interface design is too important to be left to programmers. Anyone who designs a user interface without reading the fundamental texts, About Face, by Alan Cooper (IDG, 1995) and The Design of Everyday Things, by Donald Norman (Doubleday, 1990), is committing malpractice. And reading Web Pages That Suck, by Vincent Flanders and Michael Willis (Sybex, 1998), and its sequel, Son of Web Pages That Suck, by Flanders alone (Sybex, 2002) might save you from producing some.




Introducing Microsoft. NET
Introducing Microsoft .NET (Pro-Developer)
ISBN: 0735619182
EAN: 2147483647
Year: 2003
Pages: 110

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