For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Download from Wow! eBook <www.wowebook.com>
v
Contents at a Glance
About the Author �������������������������������������������������������������������������������������������������������������� xvii
About the Technical Reviewer ������������������������������������������������������������������������������������������� xix
Acknowledgments ������������������������������������������������������������������������������������������������������������� xxi
Introduction ��������������������������������������������������������������������������������������������������������������������� xxiii
Chapter 1: Overview of Object-Oriented Programming ■ �����������������������������������������������������1
Chapter 2: Designing OOP Solutions: Identifying the Class Structure ■ �������������������������������7
Chapter 3: Designing OOP Solutions: Modeling the Object Interaction ■ ����������������������������� 25
Chapter 4: Designing OOP Solutions: A Case Study ■ ���������������������������������������������������������43
Chapter 5: Introducing the �NET Framework and Visual Studio ■ ��������������������������������������59
Chapter 6: Creating Classes ■ ��������������������������������������������������������������������������������������������83
Chapter 7: Creating Class Hierarchies ■ �����������������������������������������������������������������������������97
Chapter 8: Implementing Object Collaboration ■ ��������������������������������������������������������������119
Chapter 9: Working with Collections ■ �����������������������������������������������������������������������������143
Chapter 10: Implementing the Data Access Layer ■ ���������������������������������������������������������161
Chapter 11: Developing WPF Applications ■ ��������������������������������������������������������������������193
Chapter 12: Developing Web Applications ■ ���������������������������������������������������������������������221
Chapter 13: Developing Windows Store Applications ■ ���������������������������������������������������251
Chapter 14: Developing and Consuming Web Services ■ �������������������������������������������������273
Chapter 15: Developing the Office Supply Ordering Application ■ �����������������������������������295
Chapter 16: Wrapping Up ■ �����������������������������������������������������������������������������������������������321
■ Contents at a GlanCe
vi
Appendix A: Fundamental Programming Concepts ■ �������������������������������������������������������325
Appendix B: Exception Handling in C# ■ ���������������������������������������������������������������������������341
Appendix C: Installing the Required Software ■ ���������������������������������������������������������������347
Index ���������������������������������������������������������������������������������������������������������������������������������353
xxiii
It has been my experience as a .NET trainer and lead programmer that most people do not have trouble picking up the
syntax of the C# language. What perplexes and frustrates many people are the higher-level concepts of object-oriented
programming methodology and design. To compound the problem, most introductory programming books and
training classes skim over these concepts or, worse, don’t cover them at all. It is my hope that this book lls this void.
My goals in writing this book are twofold. My rst goal is to provide you with the information you need to understand
the fundamentals of programming in C#. More importantly, my second goal is to present you with the information
required to master the higher-level concepts of object-oriented programming methodology and design.
is book provides the knowledge you need to architect an object-oriented programming solution aimed at
solving a business problem. As you work your way through the book, you will learn rst how to analyze the business
requirements of an application. Next, you will model the objects and relationships involved in the solution design.
Finally, you will implement the solution using C#. Along the way, you will learn about the fundamentals of software
design, the Unied Modeling Language (UML), object-oriented programming, C#, and the .NET Framework.
Because this is an introductory book, it’s meant to be a starting point for your study of the topics it presents.
As such, this book is not designed to make you an expert in object-oriented programming and UML; nor is it an
exhaustive discussion of C# and the .NET Framework; nor is it an in-depth study of Visual Studio. It takes considerable
time and eort to become procient in any one of these areas. It is my hope that by reading this book, your rst
experiences in object-oriented programming will be enjoyable and comprehensible—and that these experiences will
instill a desire for further study.
Target Audience
e target audience for this book is the beginning C# programmer who wants to gain a foundation in object-oriented
programming along with C# language basics. Programmers transitioning from a procedure-oriented programming
model to an object-oriented model will also benet from this book. In addition, there are many Visual Basic (VB)
programmers who want to transition to C#. Before transitioning to C#, it is imperative that you understand the
fundamentals of object-oriented programming.
Because the experience level of a “beginner” can vary immensely, I have included a primer in Appendix A that
discusses some basic programming concepts and how they are implemented in C#. I would suggest you review these
concepts if you are new to programming.
Activities and Software Requirements
One of the most important aspects of learning is doing. You can’t learn to ride a bike without jumping on a bike, and
you can’t learn to program without cranking out code. Any successful training program needs to include both a theory
component and a hands-on component.
I have included both components throughout this book. It is my hope that you will take seriously the activities
I have added to each chapter and work through them thoroughly—even repeatedly. Contrary to some students’
perception that these activities are “exercises in typing,” the activities are where you get a chance to make the theory
Introduction
评论1
最新资源