Articoli correlati a Foundations Of Object-Oriented Programming Using .Net...

Foundations Of Object-Oriented Programming Using .Net 2.0 Patterns - Brossura

 
9781590595404: Foundations Of Object-Oriented Programming Using .Net 2.0 Patterns

Sinossi

Foundations of Object-Oriented Programming Using .NET 2.0 Patterns solves the object-oriented and pattern-programming problem by mixing the two—the book teaches object-oriented concepts using patterns, or a solutions-based approach. The book's material is organized around tasks and patterns, and illustrated through development problems and solutions that include persistence, code efficiency, and good design.

This book is of special interest to those who want to learn how to use .NET 2.0 Generics in conjunction with patterns. This unique book is based on the author's lectures, and the information unfolds in a practical manner.

Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.

L'autore

Christian Gross is a consultant with vast experience in the client/server world. He has consulted for Microsoft on DNA solutions, and he has held consulting positions with Daimler Benz, Microsoft, NatWest, and other major corporations. Gross was a contributor to Professional Active Server Pages, Professional SQL Server 6.5 Administration, Professional NT Internet Information Server Administration, and Programming Microsoft Windows 2000 Unleashed. He is the author of A Programmer's Introduction to Windows DNA.

Contenuti

Foundations of
Object-Oriented
Programming Using
.NET 2.0 Patterns
■ ■ ■
Christian Gross
Foundations of Object-Oriented Programming Using .NET 2.0 Patterns
Copyright © 2006 by Christian Gross
Lead Editor: Jonathan Hassell
Technical Reviewer: Brian Myers
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Project Manager: Sofia Marchant
Copy Edit Manager: Nicole LeClerc
Copy Editor: Ami Knox
Assistant Production Director: Kari Brooks-Copony
Production Editor: Linda Marousek
Compositor: Susan Glinert Stevens
Proofreader: Elizabeth Berry
Indexer: Valerie Perry
Interior Designer: Van Winkle Design Group
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Library of Congress Cataloging-in-Publication Data
Gross, Christian.
Foundations of object-oriented programming using .NET 2.0 patterns / Christian Gross.
p. cm.
ISBN 1-59059-540-8
1. Object-oriented programming (Computer science) 2. Microsoft .NET. 3. Software patterns. I. Title.
QA76.64.G8 2005
005.1'17--dc22
2005025961
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Source Code section.
You will need to answer questions pertaining to this book in order to successfully download the code.
v
Contents
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
■CHAPTER 1 Essentials of Object-Oriented Programming . . . . . . . . . . . . . . 1
Understanding Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Modular vs. Reusable Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Using Scope to Control Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Understanding Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Differences Between Inheritance and Structs . . . . . . . . . . . . . . . . . . . 8
Simple Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Inheritance Using Virtual Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Inheritance in a Software-Engineering Context . . . . . . . . . . . . . . . . . . . . . 14
Writing Generic Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The Case for Generics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Some Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Asynchronous Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Some Final Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
■CHAPTER 2 Logging, Errors, and Test-Driven Development . . . . . . . . . . 23
Implementing Logging Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
A Simple Log4net Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Generating Messages Using the ILog Interface . . . . . . . . . . . . . . . . . 26
Managing a Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Setting Up a Real-Life Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 29
Implementing ToString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Implementing Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Classifying an Error and an Exception . . . . . . . . . . . . . . . . . . . . . . . . 37
Implementing an Error Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Implementing an Exception Strategy . . . . . . . . . . . . . . . . . . . . . . . . . 47
vi ■CONTENTS
Using NUnit for Test-Driven Development . . . . . . . . . . . . . . . . . . . . . . . . . 52
Understanding Test-Driven Development . . . . . . . . . . . . . . . . . . . . . 52
Enabling NUnit in Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Running NUnit Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
More Detailed NUnit Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Some Final Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
■CHAPTER 3 Defining the Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Defining a Base for the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Defining Intentions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Implementing Test-Driven Development . . . . . . . . . . . . . . . . . . . . . . 63
Implementing the Bridge Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Keeping Options Open Using Interfaces . . . . . . . . . . . . . . . . . . . . . . . 69
Too Much of a Good Thing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
What About .NET 1.x? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Bridge Pattern Implementation Variations . . . . . . . . . . . . . . . . . . . . . . . . . 71
Implementing Application Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Controller Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Implementing a Default Base Class . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Interface and Class Design Decisions . . . . . . . . . . . . . . . . . . . . . . . . 80
Instantiating Types with the Factory Pattern . . . . . . . . . . . . . . . . . . . . . . . 84
The Need for a Helper Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Implementing a Plug-In Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating Objects According to a Plan . . . . . . . . . . . . . . . . . . . . . . . . . 86
Cloning Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Some Final Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
■CHAPTER 4 Application Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Making an Application Work Properly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Extensibility and Maintainability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Using Black Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Pipes and Filters Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
An Example: Buying a Television from Amazon.com . . . . . . . . . . . . 93
Architecting the Television Selection System . . . . . . . . . . . . . . . . . . 94
Implementing the Television Selection System. . . . . . . . . . . . . . . . . 95
Some Final Notes About the Pipes and Filters Pattern . . . . . . . . . . 104
■CONTENTS vii
Client-Dispatcher-Server Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Defining the Client-Dispatcher-Server Pattern Architecture . . . . . 106
A Static Dispatcher Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A Dynamic Dispatcher Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 108
Architecting the Client-Dispatcher-Server Pattern . . . . . . . . . . . . . 110
Implementing the Assembly Directory Resolver . . . . . . . . . . . . . . . 113
Implementing a Web Service Resolver. . . . . . . . . . . . . . . . . . . . . . . 118
Micro-Kernel Pa...

Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.

  • EditoreApress
  • Data di pubblicazione2005
  • ISBN 10 1590595408
  • ISBN 13 9781590595404
  • RilegaturaCopertina flessibile
  • LinguaInglese
  • Numero edizione1
  • Numero di pagine376

Compra usato

Condizioni: buono
Connecting readers with great books...
Visualizza questo articolo

EUR 3,32 per la spedizione in U.S.A.

Destinazione, tempi e costi

Risultati della ricerca per Foundations Of Object-Oriented Programming Using .Net...

Foto dell'editore

Gross, Christian
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato paperback

Da: HPB-Red, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

paperback. Condizione: Good. Connecting readers with great books since 1972! Used textbooks may not include companion materials such as access codes, etc. May have some wear or writing/highlighting. We ship orders daily and Customer Service is our top priority! Codice articolo S_370420715

Contatta il venditore

Compra usato

EUR 8,28
Convertire valuta
Spese di spedizione: EUR 3,32
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross, Christian
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato Paperback

Da: ThriftBooks-Atlanta, AUSTELL, GA, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 1.6. Codice articolo G1590595408I3N00

Contatta il venditore

Compra usato

EUR 11,83
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross, Christian
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato paperback

Da: Half Price Books Inc., Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

paperback. Condizione: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Codice articolo S_411326704

Contatta il venditore

Compra usato

EUR 10,24
Convertire valuta
Spese di spedizione: EUR 3,09
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross, Christian
Editore: Apress L. P., 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato Brossura

Da: Better World Books Ltd, Dunfermline, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Very Good. Ships from the UK. Former library book; may include library markings. Used book that is in excellent condition. May show signs of wear or have minor defects. Codice articolo 16155107-20

Contatta il venditore

Compra usato

EUR 10,03
Convertire valuta
Spese di spedizione: EUR 9,41
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross, Christian
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Brossura

Da: Lucky's Textbooks, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. Codice articolo ABLIING23Mar2811580082119

Contatta il venditore

Compra nuovo

EUR 31,10
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Christian Gross ,
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Brossura

Da: Basi6 International, Irving, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Brand New. New. US edition. Expediting shipping for all USA and Europe orders excluding PO Box. Excellent Customer Service. Codice articolo ABEJUNE24-195449

Contatta il venditore

Compra nuovo

EUR 41,04
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Christian Gross ,
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Brossura

Da: Romtrade Corp., STERLING HEIGHTS, MI, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. This is a Brand-new US Edition. This Item may be shipped from US or any other country as we have multiple locations worldwide. Codice articolo ABNR-124437

Contatta il venditore

Compra nuovo

EUR 41,04
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Christian Gross
Editore: Apress, Incorporated, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato Brossura

Da: Books Puddle, New York, NY, U.S.A.

Valutazione del venditore 4 su 5 stelle 4 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Used. pp. 380. Codice articolo 263071963

Contatta il venditore

Compra usato

EUR 49,54
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross, Christian
Editore: Apress, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback

Da: The Book Spot, Sioux Falls, MN, U.S.A.

Valutazione del venditore 4 su 5 stelle 4 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: New. Codice articolo Abebooks539335

Contatta il venditore

Compra nuovo

EUR 53,76
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Gross Christian
Editore: Apress, Incorporated, 2005
ISBN 10: 1590595408 ISBN 13: 9781590595404
Antico o usato Brossura

Da: Majestic Books, Hounslow, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Used. pp. 380 Illus. Codice articolo 5857284

Contatta il venditore

Compra usato

EUR 48,72
Convertire valuta
Spese di spedizione: EUR 7,64
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Vedi altre 6 copie di questo libro

Vedi tutti i risultati per questo libro