Tài liệu Advanced Object Oriented Programming with Visual FoxPro 6.0 ppt

440 590 4
Tài liệu Advanced Object Oriented Programming with Visual FoxPro 6.0 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Advanced Object Oriented Programming with Visual FoxPro 6.0 Markus Egger Hentzenwerke Publishing Published by: Hentzenwerke Publishing 980 East Circle Drive Whitefish Bay WI 53217 USA Hentzenwerke Publishing books are available through booksellers and directly from the publisher. Contact Hentzenwerke Publishing at: 414.332.9876 414.332.9463 (fax) www.hentzenwerke.com books@hentzenwerke.com Advanced Object Oriented Programming with Visual FoxPro 6.0 By Markus Egger Technical Editor: Mac Rubel Copy Editor: Jeana Randell Copyright © 1999 by Markus Egger All other products and services identified throughout this book are trademarks or registered trademarks of their respective companies. They are used throughout this book in editorial fashion only and for the benefit of such companies. No such uses, or the use of any trade name, is intended to convey endorsement or other affiliation with this book. All rights reserved. No part of this book, or the ebook files available by download from Hentzenwerke Publishing, may be reproduced or transmitted in any form or by any means, electronic, mechanical photocopying, recording, or otherwise, without the prior written permission of the publisher, except that program listings and sample code files may be entered, stored and executed in a computer system. The information and material contained in this book are provided “as is,” without warranty of any kind, express or implied, including without limitation any warranty concerning the accuracy, adequacy, or completeness of such information or material or the results to be obtained from using such information or material. Neither Hentzenwerke Publishing nor the authors or editors shall be responsible for any claims attributable to errors, omissions, or other inaccuracies in the information or material contained in this book. In no event shall Hentzenwerke Publishing or the authors or editors be liable for direct, indirect, special, incidental, or consequential damages arising out of the use of such information or material. ISBN: 0-96550-938-9 Manufactured in the United States of America. Dedication Ich widme dieses Buch meinen Eltern (Erna und Franz Egger) sowie meinen Großeltern (Anna und Franz Wimmer, Hildegard und Josef Egger). v List of Chapters SECTION 1—Basic Concepts 1 Chapter 1: Basic Concepts 3 Chapter 2: How Things Are Done in Visual FoxPro 31 Chapter 3: What's Not So Obvious 59 Chapter 4: Using Shrink-Wrapped Classes 69 Chapter 5: OOP Standard Tools 177 Chapter 6: Good Habits 237 Chapter 7: Evaluating Risks and Benefits 251 SECTION 2—Advanced Object-Oriented Programming 259 Chapter 8: The Bigger Picture 261 Chapter 9: Three-Tiered Development 271 Chapter 10: Patterns 281 Chapter 11: Object Metrics 295 SECTION 3—Object Modeling 313 Chapter 12: The Unified Modeling Language 315 Chapter 13: Collecting Requirements 347 Chapter 14: Analyzing the Problem 361 Chapter 15: Object Modeling 377 Chapter 16: Implementation 397 Chapter 17: Documenting Existing Projects 411 vii Table of Contents Acknowledgements xvii Foreword xix SECTION 1—Basic Concepts 1 Chapter 1: Basic Concepts 3 Encapsulation 3 Classes 3 Properties 4 Methods 5 How to draw classes 6 Inheritance 6 Overwriting code 7 Programming by exception 8 What about multiple inheritance? 10 Base classes—a first look 11 How to draw subclassing 11 Polymorphism 12 Messages 13 Events 13 Events vs. event methods 14 Access and assign methods 14 Composition 18 Containers 19 Composition by reference 21 Abstraction 23 Building class hierarchies 23 Hiding information 24 Interfaces 27 Chapter 2: How Things Are Done in Visual FoxPro 31 Instantiating classes 31 Constructors and destructors 31 CreateObject() 34 NewObject() 34 .AddObject() and .NewObject() 35 Passing parameters to objects 35 SCATTER… NAME… 36 viii Object references 36 Object lifetime 37 THIS, THISFORM, THISFORMSET and Parent 38 Variable references 39 Property references 40 Cleaning up after yourself 40 Differences between classes and forms 41 Instantiating forms 42 DataEnvironment 45 Inheritance 45 Combining form classes and forms 45 Templates 46 Visual FoxPro base classes 47 NODEFAULT 47 Custom classes 47 Control classes 48 Adding properties on the fly 49 Should you, or shouldn't you? 49 Collections 50 FoxPro's collections 51 The collections you create yourself 51 Collections provided by others 56 Features you might miss in Visual FoxPro 56 Multiple inheritance revisited 56 Friendship relations 57 Static properties 57 Operator overloading 57 Copying objects 58 Chapter 3: What's Not So Obvious 59 Instance programming and pseudo-subclassing 59 Instance programming 59 Pseudo-subclassing 61 Visual vs. non-visual classes 62 Advantages of non-visual classes 63 Why not go the visual route? 63 Visual classes: Nintendo for adults? 65 Some classes are non-visual only 66 Creating your own set of base classes 67 Some suggestions 68 ix Chapter 4: Using Shrink-Wrapped Classes 69 Reuse what others create 69 What is available? 70 Black box objects 70 White box objects 72 COM components 72 Class libraries 76 Frameworks 77 Complimentary tools 78 The Fox Foundation Classes 78 Class overview 79 Application 79 Data Session Manager 79 Error Object 82 Object State 85 System Toolbar 86 Trace Aware Timer 86 Window Handler 87 Automation 87 Cross Tab 88 Graph by Record 89 Graph Object 92 Mail Merge Object 93 Pivot Table 95 Data editing 97 Data Edit Buttons 97 Data Validation 97 Offline Switch 98 Simple Edit Buttons 99 Data navigation 100 Data Navigation Buttons 100 Data Navigation Object 101 GoTo Dialog Box 101 GoTo Dialog Box Button 102 GoTo Spinner 102 Navigation Toolbar (Container) 102 Navigation Toolbar (Toolbar) 103 Simple Picture Navigation Buttons 103 Simple Navigation Buttons 104 VCR Buttons 104 VCR Picture Navigation Buttons 104 Data query 105 Conflict Catcher 105 Distinct Values Combo 106 . at: 414.332.98 76 414.332.9 463 (fax) www.hentzenwerke.com books@hentzenwerke.com Advanced Object Oriented Programming with Visual FoxPro 6. 0 By Markus Egger. Advanced Object Oriented Programming with Visual FoxPro 6. 0 Markus Egger Hentzenwerke Publishing Published by: Hentzenwerke Publishing 9 80 East

Ngày đăng: 21/12/2013, 20:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan