Preface

A condensed introduction to the Microsoft .NET Framework, this book aims to help programmers make the transition from traditional Windows programming to the world of .NET programming. The Microsoft .NET Framework includes the Common Language Runtime (CLR) and a set of base classes that radically simplify the development of large-scale applications and services. This book examines the CLR in detail, so that you can put its new features to good use. The book also illustrates how language integration really works and guides you through component and enterprise development using the .NET Framework. In addition, it introduces you to four key .NET technologies: data (ADO.NET) and XML, web services, Web Forms (ASP.NET), and Windows Forms.

We used the latest release of Microsoft Visual Studio .NET 2003 and the .NET Framework SDK 1.1 to prepare this manuscript and to develop all the examples and figures in this book. In .NET Framework SDK 1.1, Microsoft has fixed a number of bugs, made performance and security improvements, and added a few important changes, including:

  • Support for additional ADO.NET data sources (Oracle and ODBC)

  • Improved support for using C++ to build .NET Windows and Web applications

  • Integration of J# into VS.NET

  • Inclusion of a mobile controls package for developing ASP.NET sites for small devices, such as cell phones

  • Integration of mobile application development into VS.NET

Although we have done our best to ensure that the technical content of this book is up-to-date, it is possible that some items have changed slightly from the time of writing. To stay up-to-date, regularly check http://msdn.microsoft.com/net, http://www.gotdotnet.com, and this book’s O’Reilly page, http://www.oreilly.com/catalog/dotnetfrmess3/.

Audience

Although this book is for any person interested in learning about the Microsoft .NET Framework, it targets seasoned developers with experience in building Windows applications with Visual Studio 6 and the Visual Basic and Visual C++ languages. Java™ and C/C++ developers will also be well prepared for the material presented here. To gain the most from this book, you should have experience in object-oriented, component, enterprise, and web application development. COM programming experience is a plus.

About This Book

Based on a short course that Thuan has delivered to numerous companies since August 2000, this book is designed so that each chapter builds on knowledge from the previous one for those unfamiliar with each technology. To give you a heads-up, here are brief summaries for the chapters and appendixes covered in this book.

Chapter 1 takes a brief look at Microsoft .NET and the Microsoft .NET Platform. It then describes the .NET Framework design goals and introduces you to the components of the .NET Framework.

Chapter 2 lifts the hood and peers into the CLR. This chapter surveys the rich runtime of the CLR, as well as other features.

Chapter 3 introduces you to .NET programming. You’ll examine a simple program that uses object-oriented and component-based concepts in five different languages: Managed C++, VB.NET, C#, J#, and IL. You’ll also experience the benefits of language integration.

Chapter 4 demonstrates the simplicity of component and enterprise development in .NET. Besides seeing the component-deployment features of the .NET Framework, you’ll also find complete programs that take advantage of transaction, object pooling, role-base security, and message queuing—all in one chapter.

Chapter 5 describes the architecture of ADO.NET and its benefits. Besides being disconnected to promote scalability, the ADO.NET dataset is also tightly integrated with XML to enhance interoperability. This chapter introduces you to the .NET data-access objects, as well as the XML namespace.

Chapter 6 describes how .NET software components can be accessed through the Internet. In this chapter, we discuss the protocols that support web services, as well as how to publish and discover them. You will see how XML, used in conjunction with HTTP, breaks the proprietary nature of typical component-oriented software development and enables greater interoperability.

Chapter 7 introduces you to ASP.NET, which now supports object-oriented and event-driven programming, as opposed to conventional ASP development. In this chapter, Web Forms and server controls take the center stage. In addition, we examine how to build custom server controls, perform data binding to various .NET controls, and survey state management features in ASP.NET.

Chapter 8 takes conventional form-based programming a step into the future with the classes in the System.Windows.Forms namespace. Similar to Win32-based applications, Windows Forms are best used to build so-called rich or “fat” clients; however, with the new zero-effort installation procedure of .NET and the advent of web services, Windows Forms are appropriate for a host of applications.

Chapter 9 shows you how to build an ASP.NET application that targets smart devices and a mobile device application that is backed by SQL Server CE.

Appendix A contains a list of links to web sites with information regarding languages that target the CLR, including some burgeoning open-source projects.

Appendix B contains a list of commonly used acronyms found in .NET literature and presentations.

Appendix C contains several lists of commonly used data types in .NET. This appendix also illustrates the use of several .NET collection classes.

Appendix D surveys the important tools that the .NET SDK provides to ease the tasks of .NET development.

Assumptions This Book Makes

This book assumes that you are a Windows or web application developer fluent in object-oriented and component-based programming. We also assume that you have some basic knowledge of XML. While COM is not a crucial prerequisite, if you have COM programming experience, you will appreciate this book and the .NET Framework all the more.

Conventions Used in This Book

We use the following font conventions in this book.

Italic is used for:

  • Pathnames, filenames, and program names

  • Internet addresses, such as domain names and URLs

  • New terms where they are defined

Constant width is used for:

  • Command lines and options that should be typed verbatim

  • Direct quotes and specific method names from code examples, as well as specific values for attributes and settings within code

  • XML element tags

Constant width bold is used for:

  • User input in code that should be typed verbatim

  • Items in code to which we’d like to draw the reader’s attention

Constant width italic is used for:

  • Replaceable items in code, which should be replaced with the appropriate terms

In code syntax examples, we sometimes use [ value ]+ to represent one or more instances of a value and [ value ]* to mean zero or more instances of a value.

Tip

This icon designates a tip, which contains important information about the nearby text.

Warning

This icon designates a warning related to the nearby text.

How to Contact Us

We have tested and verified the information in this book to the best of our abilities, but you may find that features have changed (or even that we have made mistakes!). Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:

O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international/local)
(707) 829-0104 (FAX)

You can also send us messages electronically. To be put on the mailing list or request a catalog, send email to:

To ask technical questions or comment on the book, send email to:

We have a web site for the book, where we list examples, errata, and any plans for future editions. You can access this page at:

http://www.oreilly.com/catalog/dotnetfrmess3/

For more information about this book and others, see the O’Reilly web site:

http://www.oreilly.com

For more information on .NET in general, visit the O’Reilly .NET Center at http://dotnet.oreilly.com and the .NET DevCenter at http://www.oreillynet.com/dotnet/.

Acknowledgments

The folks at O’Reilly never cease to amaze us with the support that they provide. We’d like to thank O’Reilly executive editor John Osborn for extending us the contract to write this book and for his continuous support throughout the project. Thanks to O’Reilly editor Nancy Kotary for making the first and second editions of this book such a success. We’d also like to thank O’Reilly editor Valerie Quercia who did a fine job reviewing our materials and coordinating the project for this third edition.

We’d like to give many thanks to the production and design folks at O’Reilly for making this book a reality: Emma Colby, David Futato, Matt Hutchinson, Robert Romano, and Ellie Volckhausen.

We’d like to thank Brian Jepson, who has contributed significantly to this book since the beginning of the project. Brian did an unquestionably outstanding job reading, testing, and ensuring that the technical content in every chapter lined up with the latest release. He also gave us invaluable guidance and support throughout the project. We’d like to thank Matthew MacDonald for the same reason, since he’s been providing invaluable feedback and recommendations in the third edition. We’d also like to thank Dennis Angeline and Brad Merrill at Microsoft for answering technical questions on the CLR and languages.

Thuan Thai

I would like to thank my parents, siblings, and Ut Nga for their constant support during this project.

Hoang Q. Lam

I would like to thank my parents and family for their support and understanding of my being missing-in-action for several months. Mom and Dad, your ongoing efforts to put your children where they are today can never be repaid.

I would like to thank my wife, Van Du, and daughter, Nina. Your smiles mean the world to me. Don’t underestimate your contribution to this book.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.137.64