Object-oriented programming - with prototypes
暂无分享,去创建一个
1 Reader's Guide.- 1.1 Learning Object-Oriented Programming.- 1.2 Conventions Used in this Book.- 1.3 Survey.- 2 Principles of Object-Oriented Programming.- 2.1 What Is an Object?.- 2.2 Object-Oriented Terminology.- 2.2.1 Classes.- 2.2.2 Types.- 2.2.3 Object References.- 2.2.4 Instance Variables and Class Variables.- 2.2.5 Messages.- 2.2.6 Methods.- 2.2.7 Prototypes.- 2.2.8 Subclasses and Superclasses.- 2.2.9 Abstract Methods and Abstract Classes.- 2.2.10 Metaclasses.- 2.2.11 Related Terms in Conventional Programming.- 2.3 Polymorphism and Dynamic Binding.- 2.4 Inheritance.- 2.5 The Magic Word "Self".- 2.6 Information Hiding.- 2.7 Static and Dynamic Typing.- 2.8 Genericity.- 2.9 Types, Classes, and Prototypes.- 2.10 Object Hierarchies.- 2.10.1 Single-Rooted and Multi-Rooted Class Hierarchies.- 2.10.2 Single and Multiple Inheritance.- 2.10.3 Is-a and Has-a Relations.- 2.10.4 Dependencies Among Objects.- 2.10.5 Delegation.- 2.10.6 Copy Chains.- 2.11 Values and References.- 2.12 Hybrid and Pure Object-Oriented Languages.- 2.12.1 Everything Is an Object.- 2.12.2 Uniformity Versus Efficiency.- 2.12.3 Object-Oriented Thinking.- 2.12.4 The Wider the Choice, the Greater the Trouble.- 3 Prototypes.- 3.1 Constructing Objects Straight Away.- 3.2 Kinds of Prototypes.- 3.2.1 Delegation - The Self Model.- 3.2.2 Module Operations - The Kevo Model.- 3.2.3 Inheritance and Propagation - The Omega Model.- 3.2.4 Comparison of Prototype Models.- 3.3 One-of-a-Kind Prototypes.- 3.4 Persistent Prototypes.- 3.5 The Prototype Corruption Problem.- 3.6 Prototypes and Prototyping.- 3.7 Prototypes in Class-Based Languages.- 4 The Programming Language Omega.- 4.1 Concepts and Conventions.- 4.2 Lexical Elements.- 4.2.1 Character Set.- 4.2.2 Symbols.- 4.3 Types and Prototypes.- 4.3.1 Standard and System Types.- 4.3.2 Monomorphic Types.- 4.3.3 Generic Prototypes.- 4.3.4 Pseudo Types.- 4.4 Compatibility Rules.- 4.4.1 Static Compatibility.- 4.4.2 Dynamic Compatibility.- 4.4.3 Type and Prototype Identifiers.- 4.5 Variables.- 4.6 Methods.- 4.7 Expressions.- 4.7.1 Elementary Expressions.- 4.7.2 Message Expressions.- 4.7.3 Precedence of Operations.- 4.8 Blocks and Actions.- 4.9 Flow Control.- 4.9.1 Predefined Flow Control Elements.- 4.9.2 Short-Circuit Evaluation of Boolean Operations.- 4.9.3 Iteration over Elements of Data Structures.- 4.9.4 Exception Handling.- 4.10 Memory Management.- 4.11 The Programming Environment.- 4.11.1 The Hierarchy Browser.- 4.11.2 The Object Editor.- 4.11.3 The Method Editor.- 4.11.4 The Log Window.- 4.11.5 The Profiler.- 5 Libraries and Frameworks.- 5.1 Conventional and Object-Oriented Libraries.- 5.2 Kinds of Classes.- 5.3 Object Protocols.- 5.4 Prototype Libraries.- 5.5 Frameworks.- 5.6 Cookbooks and Examples.- 6 The Omega Library.- 6.1 Concepts.- 6.2 Object Protocol.- 6.2.1 Variables of Object.- 6.2.2 Copying and Cloning.- 6.2.3 Comparison.- 6.2.4 Meta-Information.- 6.2.5 External Representation.- 6.2.6 Input.- 6.2.7 Exceptions.- 6.2.8 Workspace Activation and Passivation.- 6.2.9 Attributes.- 6.2.10 Change Propagation.- 6.2.11 Miscellaneous Methods.- 6.3 Basic Types.- 6.3.1 Integer.- 6.3.2 Real.- 6.3.3 Boolean.- 6.3.4 Char.- 6.3.5 Nil.- 6.3.6 Wrapper.- 6.4 Containers.- 6.4.1 Container.- 6.4.2 ByteArray.- 6.4.3 String.- 6.4.4 StringConstant.- 6.4.5 Collection.- 6.4.6 Array.- 6.4.7 IdSet.- 6.4.8 IdDictionary.- 6.5 Graphical Objects.- 6.5.1 Point.- 6.5.2 Box.- 6.5.3 Image.- 6.5.4 Area.- 6.5.5 Elementary Images.- 6.5.6 Pictures.- 6.6 User Interaction.- 6.6.1 Events.- 6.6.2 Event Handlers.- 6.7 Views, Windows and Panes.- 6.7.1 View.- 6.7.2 Windows.- 6.7.3 Panes.- 6.8 One-of-a-Kind Prototypes.- 6.8.1 Mouse.- 6.8.2 Keyboard.- 6.8.3 Workspace.- 6.9 Applications.- 7 Object-Oriented Design.- 7.1 The Goals of Object-Oriented Design.- 7.2 Design Techniques.- 7.2.1 The Vocabulary Approach.- 7.2.2 CRC Cards.- 7.3 Design Guidelines.- 7.3.1 Reusability.- 7.3.2 Safety.- 7.3.3 Inheritance.- 7.3.4 Libraries.- 7.3.5 Incremental Design.- 7.4 Designing with Prototypes.- 8 Final Words of Advice.- 8.1 Object-Oriented Programming - When and How?.- 8.2 Efficiency Considerations.- 8.3 The Influence of the Programming Language.- 8.4 Possible Pitfalls.- 8.5 The Spirit of Object-Oriented Programming.- References.- Figures.- Appendix A: The Syntax of Omega.- Appendix B: The Omega Type Hierarchy.