شروع دوره های تخصصی, پایتون | هوش مصنوعی 18 دی شروع دوره های تخصصی, پایتون | هوش مصنوعی 18 دی
ثبت نام
William B. Sanders and Chandima Cumaranatunge

ActionScript 3.0 Design Patterns

نویسنده :William B. Sanders and Chandima Cumaranatunge

    دوره آموزش Javascript 

     

    Table of Contents

    Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

    Part I. Constant Change

    1. Object-Oriented Programming, Design Patterns, and ActionScript 3.0 . . . . . 3

    The Pleasure of Doing Something Well 3

    OOP Basics 10

    Abstraction 11

    Encapsulation 15

    Inheritance 24

    Polymorphism 34

    Principles of Design Pattern Development 42

    Program to Interfaces over Implementations 45

    Favor Composition 49

    Maintenance and Extensibility Planning 57

    Your Application Plan: It Ain’t You Babe 60

    Part II. Creational Patterns

    2. Factory Method Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    What Is the Factory Method Pattern? 65

    Abstract Classes in ActionScript 3.0 68

    Minimalist Example 69

    Hiding the Product Classes 73

    Example: Print Shop 74

    Extended Example: Color Printing 80

    Key OOP Concepts Used in the Factory Method Pattern 84

    Example: Sprite Factory 84

    Example: Vertical Shooter Game 90

    Summary 100

    3. Singleton Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

    What Is the Singleton Pattern? 101

    Key OOP Concepts Used with the Singleton Pattern 102

    Minimalist Abstract Singleton 105

    When to Use the Singleton Pattern 112

    Summary 125

    Part III. Structural Patterns

    4. Decorator Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

    What Is the Decorator Pattern? 129

    Key OOP Concepts Used with the Decorator Pattern 132

    Minimalist Abstract Decorator 135

    Applying a Simple Decorator Pattern in Flash: Paper Doll 141

    Decorating with Deadly Sins and Heavenly Virtues 148

    Dynamic Selection of Concrete Components and Decorations:

    A Hybrid Car Dealership 164

    Summary 176

    5. Adapter Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

    What Is the Adapter Pattern? 177

    Object and Class Adapters 179

    Key OOP Concepts in the Adapter Pattern 185

    Example: Car Steering Adapter 185

    Extended Example: Steering the Car Using a Mouse 193

    Example: List Display Adapter 194

    Extended Example: Displaying the O’Reilly New Books List 199

    Summary 203

    6. Composite Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

    What Is the Composite Pattern? 204

    Minimalist Example of a Composite Pattern 207

    Key OOP Concepts in the Composite Pattern 217

    Example: Music Playlists 217

    Example: Animating Composite Objects Using Inverse Kinematics 22

    Using Flash’s Built-in Composite Structure: the Display List 233

    Summary 243

    Part IV. Behavioral Patterns

    7. Command Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

    What Is the Command Pattern? 247

    Minimalist Example of a Command Pattern 251

    Key OOP Concepts in the Command Pattern 255

    Minimalist Example: Macro Commands 255

    Example: Number Manipulator 258

    Extended Example: Sharing Command Objects 263

    Extended Example: Implementing Undo 266

    Example: Podcast Radio 270

    Extended Example: Dynamic Command Object Assignment 276

    Summary 281

    8. Observer Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

    What Is the Observer Pattern? 282

    Key OOP Concepts Used with the Observer Pattern 285

    Minimalist Abstract Observer 289

    Example: Adding States and Identifying Users 294

    Dynamically Changing States 302

    Example: Working with Different Data Displays 318

    Summary 330

    9. Template Method Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

    What Is the Template Method Pattern? 331

    Key OOP Concepts Used with the Template Method 335

    Minimalist Example: Abstract Template Method 338

    Employing Flexibility in the Template Method 341

    Selecting and Playing Sound and Video 344

    Hooking It Up 351

    Summary 356

    10. State Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

    Design Pattern to Create a State Machine 357

    Key OOP Concepts Used with the State Pattern 360

    Minimalist Abstract State Pattern 361

    Video Player Concrete State Application 367

    Expanding the State Design: Adding States 374

    Adding More States and Streaming Capabilities 382

    Summary 397

    11. Strategy Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

    What Is the Strategy Pattern? 398

    Key OOP Concepts Used with the Strategy Pattern 400

    Minimalist Abstract State Pattern 402

    Adding More Concrete Strategies and Concrete Contexts 406

    Working with String Strategies 414

    Summary 423

    Part V. Multiple Patterns

    12. Model-View-Controller Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

    What Is the Model-View-Controller (MVC) Pattern? 427

    Communication Between the MVC Elements 428

    Embedded Patterns in the MVC 430

    Minimalist Example of an MVC Pattern 431

    Key OOP Concepts in the MVC Pattern 443

    Example: Weather Maps 443

    Extended Example: Infrared Weather Maps 451

    Example: Cars 457

    Custom Views 463

    Adding a Chase Car 466

    Summary 468

    13. Symmetric Proxy Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

    Simultaneous Game Moves and Outcomes 469

    The Symmetric Proxy Pattern 473

    Key OOP Concepts Used with the Symmetric Proxy 475

    The Player Interface 477

    The Referee 478

    Information Shared Over the Internet 483

    Player-Proxy Classes 486

    Classes and Document Files Support 494

    Summary 498

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499

1394/07/27 22746 845
رمز عبور : tahlildadeh.com یا www.tahlildadeh.com
کتاب های مرتبط
آموزش کار با رشته ها در سی شارپ

JavaScript® Programmer’s Reference

نویسنده: Alexei

زبان: انگلیسی

مشاهده کتاب و دانلود
آموزش کار با رشته ها در سی شارپ

مرجع جیبی جاوا اسکریپت

نویسنده: دیوید فلاناگان

زبان: فارسی

مشاهده کتاب و دانلود
آموزش کار با رشته ها در سی شارپ

JavaScriptTM in 10 Simple Steps or Less

نویسنده: Arman Danesh

زبان: انگلیسی

مشاهده کتاب و دانلود
نظرات شما

نظرات خود را ثبت کنید...