Windows Forms 2.0 Programming
by Chris Sells 2021-02-02 15:05:15
image1
Preface Windows 1.0 programmers had a straightforward life. They had almost no choices about how to do things; either there was an application programming interface API , or there wasn''t, and most of the time there wasn''t. This meant that developer... Read more
Preface Windows 1.0 programmers had a straightforward life. They had almost no choices about how to do things; either there was an application programming interface API , or there wasn''t, and most of the time there wasn''t. This meant that developers had to build almost everything by hand. At the time, this wasn''t a problem. All Windows programmers had the same limitations, so everyone''s apps more or less operated with the same limited set of functionality. A modern Windows developer, on the other hand, is inundated with choices. The invention of the web alone gives us static Hypertext Markup Language HTML , server-based user interface UI interaction via ASP.NET, and client-side UI interaction via ActiveX controls or AJAX to name a few .1On the client side, we have native frameworks like Microsoft Foundation Classes MFC , Active Template Library ATL , and the next-generation managed framework known as the Windows Presentation Foundation WPF is part of WinFX, the follow-on to the .NET Framework . How does a developer choose? Where does Windows Forms 2.0, the topic of this book, fit into this pantheon? 1 AJAX stands for Asynchronous JavaScript and XML, as defined by Jesse James Garrett, Ajax: A New Approach to Web Applications, [a href="http://www.adaptivepath.com/publications/essays/archives/000385.php" target=_new>http://www.adaptivepath.com/publications/essays/archives/000385.phphttp://tinysells.com/38 .Client technologies on Windows provide a range of reach and richness in inverse proportion to each other. Reach is the ability of a user interface UI to work across operating systems, whereas richness is the ability for a UI to take advantage of the operating system on which it runs. So even though static HTML works almost everywhere, to the extent that your HTML uses client-side JScript, reach is diminished for browsers that don''t support the scripting constructs being used. Even further down the reach scale are ActiveX controls, which work only on Windows but allow full access to its richness.2
2 At one point, the Component Object Model COM and ActiveX were made to work across platforms, but they have long since been relegated to Windows only.
At the other extreme we have WPF, a completely new managed framework built on top of DirectX. WPF encompasses documents, layout, animation, 2-D, 3-D, text, and graphics primitives in a single, cohesive whole. This framework provides the richest client technology that Microsoft has ever built, and it takes maximum advantage of the platform on which it runs, including any hardware 3-D graphics acceleration that may be available. However, at the time of this writing, WPF has not yet shipped and works only under Windows XP, Windows Server 2003, and Windows Vista.3
3 WinFX which inclues WPF and Windows Vista are scheduled to ship in 2006.
Where does that leave Windows Forms 2.0? It doesn''t quite offer the richness of WPF, but it''s far richer than the HTML-based technologies. Windows Forms 2.0 also is much richer than Windows Forms 1.0, with greatly enhanced support for flexible layout, modern menu strip and tool strip controls, data binding, multithreading, typed resources and settings, and, most importantly, ClickOnce deployment. With ClickOnce, for the first time, users can deploy Windows applications as easily as web applications. Even better, ClickOnce allows Windows applications to be installed locally, integrated with the Start menu, and accessed even if no network connection is available. These options are not available for users of Web applications. So Windows Forms 2.0 is high on the richness scale, but what about the reach scale? Unlike web applications, Windows Forms requires that users'' machines operate on Windows, specifically Windows 98 or later for PCs. However, it also supports other devices, such as Pocket PCs or Smartphones, via the .NET Compact Framework. This means that you can write a Windows Forms 2.0 application and run it on your Windows smartphone. Based on this level of richness and reach, what kinds of applications should you build with Windows Forms? As it turns out, folks have used Windows Forms to build almost every kind of application, including productivity applications, utilities, enterprise tools, and more-even games. Windows Forms can be used to build smaller things, such as Microsoft''s own internal human resources application called HeadTrax , or larger things, such as most of the UI enhancements that have been built on top of Visual Studio since the 2002 edition. This range of applications can be built because of Windows Forms'' range of features and tools, its reach, and, as of this version, the maturity of the implementation based on community usage and feedback. In fact, the .NET developer community has embraced Windows Forms to a degree that defies the early .NET focus on web-based applications. Based on talking to my friends in Less
Compare Prices
Available Discount
No Discount available
Related Books