Foundation Object-Oriented Programming Using .NET Patterns

Valutazione media 3
( su 1 valutazioni fornite da Goodreads )
 
9781590595404: Foundation Object-Oriented Programming Using .NET Patterns
Vedi tutte le copie di questo ISBN:
 
 

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 has over a decade of experience as a software engineer and consultant in the software development industry. His specialty is in the development of applications that are network dependent (e.g. client/server, distributed precessing, Web services, Internet technologies). He is a regular conference speaker at Software Development and ApacheCon and is the author of Applied Software Engineering Using Apache Jakarta Commons. He currently resides in Zurich, Switzerland

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.

I migliori risultati di ricerca su AbeBooks

1.

Gross, Christian
Editore: Apress
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo PAPERBACK Quantità: 15
Da
Lakeside Books
(Benton Harbor, MI, U.S.A.)
Valutazione libreria
[?]

Descrizione libro Apress. PAPERBACK. Condizione: New. 1590595408 BRAND NEW, GIFT QUALITY! NOT OVERSTOCKS OR MARKED UP REMAINDERS! DIRECT FROM THE PUBLISHER!|1.56. Codice articolo OTF-Y-9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 26,44
Convertire valuta

Aggiungere al carrello

Spese di spedizione: EUR 3,41
In U.S.A.
Destinazione, tempi e costi

2.

Christian Gross
Editore: APress (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Quantità: > 20
Print on Demand
Da
Pbshop
(Wood Dale, IL, U.S.A.)
Valutazione libreria
[?]

Descrizione libro APress, 2005. PAP. Condizione: New. New Book. Shipped from US within 10 to 14 business days. THIS BOOK IS PRINTED ON DEMAND. Established seller since 2000. Codice articolo IQ-9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 28,09
Convertire valuta

Aggiungere al carrello

Spese di spedizione: EUR 3,41
In U.S.A.
Destinazione, tempi e costi

3.

Christian Groß
Editore: aPress, United States (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Prima edizione Quantità: 10
Print on Demand
Da
Book Depository International
(London, Regno Unito)
Valutazione libreria
[?]

Descrizione libro aPress, United States, 2005. Paperback. Condizione: New. 1st ed.. Language: English . Brand New Book ***** Print on Demand *****. * Includes coverage on Generics, 2.0. and coverage of both Open Source and Closed Source libraries and applications. *Based on C# code examples that work on multiple platforms (e.g. Linux, Windows, etc). * Focuses on solving problems in short and easy to digest segments. Codice articolo APC9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 34,06
Convertire valuta

Aggiungere al carrello

Spese di spedizione: GRATIS
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

4.

Christian Groß
Editore: aPress, United States (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Prima edizione Quantità: 10
Print on Demand
Da
The Book Depository
(London, Regno Unito)
Valutazione libreria
[?]

Descrizione libro aPress, United States, 2005. Paperback. Condizione: New. 1st ed.. Language: English . Brand New Book ***** Print on Demand *****.* Includes coverage on Generics, 2.0. and coverage of both Open Source and Closed Source libraries and applications. *Based on C# code examples that work on multiple platforms (e.g. Linux, Windows, etc). * Focuses on solving problems in short and easy to digest segments. Codice articolo APC9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 34,07
Convertire valuta

Aggiungere al carrello

Spese di spedizione: GRATIS
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

5.

Christian Gross
Editore: Apress (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Quantità: 1
Da
Ergodebooks
(RICHMOND, TX, U.S.A.)
Valutazione libreria
[?]

Descrizione libro Apress, 2005. Paperback. Condizione: New. 1. Codice articolo DADAX1590595408

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 32,16
Convertire valuta

Aggiungere al carrello

Spese di spedizione: EUR 3,41
In U.S.A.
Destinazione, tempi e costi

6.

Christian Gross
Editore: APress (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Quantità: > 20
Print on Demand
Da
Books2Anywhere
(Fairford, GLOS, Regno Unito)
Valutazione libreria
[?]

Descrizione libro APress, 2005. PAP. Condizione: New. New Book. Delivered from our UK warehouse in 3 to 5 business days. THIS BOOK IS PRINTED ON DEMAND. Established seller since 2000. Codice articolo IQ-9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 25,46
Convertire valuta

Aggiungere al carrello

Spese di spedizione: EUR 10,17
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

7.

Christian Gross
Editore: Apress (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Brossura Quantità: 1
Da
Irish Booksellers
(Portland, ME, U.S.A.)
Valutazione libreria
[?]

Descrizione libro Apress, 2005. Condizione: New. book. Codice articolo M1590595408

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 36,42
Convertire valuta

Aggiungere al carrello

Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

8.

Christian Gross
Editore: Apress
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Quantità: > 20
Da
BuySomeBooks
(Las Vegas, NV, U.S.A.)
Valutazione libreria
[?]

Descrizione libro Apress. Paperback. Condizione: New. 376 pages. Dimensions: 9.1in. x 6.9in. x 0.9in.Foundations of Object-Oriented Programming Using . NET 2. 0 Patterns solves the object-oriented and pattern-programming problem by mixing the twothe book teaches object-oriented concepts using patterns, or a solutions-based approach. The books 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 authors lectures, and the information unfolds in a practical manner. This item ships from multiple locations. Your book may arrive from Roseburg,OR, La Vergne,TN. Paperback. Codice articolo 9781590595404

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 41,31
Convertire valuta

Aggiungere al carrello

Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

9.

Gross, Christian
Editore: Apress (2017)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Quantità: 2
Print on Demand
Da
Murray Media
(North Miami Beach, FL, U.S.A.)
Valutazione libreria
[?]

Descrizione libro Apress, 2017. Paperback. Condizione: New. Never used! This item is printed on demand. Codice articolo P111590595408

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 41,97
Convertire valuta

Aggiungere al carrello

Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

10.

CHRISTIAN GROSS
Editore: Apress (2005)
ISBN 10: 1590595408 ISBN 13: 9781590595404
Nuovo Paperback Quantità: 1
Da
Herb Tandree Philosophy Books
(Stroud, GLOS, Regno Unito)
Valutazione libreria
[?]

Descrizione libro Apress, 2005. Paperback. Condizione: NEW. 9781590595404 This listing is a new book, a title currently in-print which we order directly and immediately from the publisher. For all enquiries, please contact Herb Tandree Philosophy Books directly - customer service is our primary goal. Codice articolo HTANDREE0307758

Informazioni sul venditore | Contattare il venditore

Compra nuovo
EUR 41,32
Convertire valuta

Aggiungere al carrello

Spese di spedizione: EUR 9,02
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Vedi altre copie di questo libro

Vedi tutti i risultati per questo libro