ActionScript Developer's Guide to PureMVC - Helion
ISBN: 978-14-493-2471-1
stron: 264, Format: ebook
Data wydania: 2011-12-19
Księgarnia: Helion
Cena książki: 50,92 zł (poprzednio: 59,21 zł)
Oszczędzasz: 14% (-8,29 zł)
Gain hands-on experience with PureMVC, the popular open source framework for developing maintainable applications with a Model-View-Controller architecture. In this concise guide, PureMVC creator Cliff Hall teaches the fundamentals of PureMVC development by walking you through the construction of a complete non-trivial Adobe AIR application.
Through clear explanations and numerous ActionScript code examples, you’ll learn best practices for using the framework’s classes in your day-to-day work. Discover how PureMVC enables you to focus on the purpose and scope of your application, while the framework takes care of the plumbing in a maintainable and portable way.
- Get a detailed overview of the PureMVC process for developing your application
- Model the domain by designing the schema and creating framework-agnostic value objects
- Implement framework-agnostic View components that expose an API of events and properties
- Use the Proxy pattern to keep track of value objects and hide service interaction
- Facilitate two-way communication between a View component and the rest of the application
- Stitch the Model and View tiers together with command objects in the Controller
- Manage problematic View component life cycles, and learn how to reuse the Model tier
Osoby które kupowały "ActionScript Developer's Guide to PureMVC", wybierały także:
- Tablice informatyczne. Flash MX 2004 ActionScript 12,58 zł, (3,90 zł -69%)
- Flash i Wallaby. Projektowanie animacji zgodnych z HTML5 24,69 zł, (7,90 zł -68%)
- Flash i ActionScript. Aplikacje 3D od podstaw 97,23 zł, (54,45 zł -44%)
- Adobe Flash CS5/CS5 PL Professional. Biblia 126,70 zł, (70,95 zł -44%)
- ActionScript 3.0. Biblia 97,23 zł, (54,45 zł -44%)
Spis treści
ActionScript Developer's Guide to PureMVC. Code at the Speed of Thought eBook -- spis treści
- ActionScript Developers Guide to PureMVC
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Preface
- Code at the Speed of Thought
- The Purpose of This Book
- Who Should Read This Book
- Acknowledgements
- PureMVC Contributors
- Enneagram Personality System
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- 1. Introduction
- Classic MVC Architecture
- The PureMVC AS3 Reference Implementation
- The Role of PureMVC in Your Application
- Pay No Attention to the Man Behind the Curtain
- Meet the Workhorses
- Actors at the Boundaries
- Use a Proxy as a Data Source for the Application
- A simple proxy example
- EmailConfigProxy
- Use a Mediator as a Secretary for a View Component
- A simple mediator example
- EmailConfigMediator
- Use a Proxy as a Data Source for the Application
- Actors Between the Boundaries
- Let SimpleCommands Do Most of the Thinking
- PerformEmailTestCommand
- Use a MacroCommand to Execute Several SimpleCommands
- Let SimpleCommands Do Most of the Thinking
- The Rest of the Gang
- Notifications
- The Core Actors
- The Facade
- Packaging Your Classes
- Ordinary Classes
- Framework Classes
- Typical Package Structure
- Standard and MultiCore Versions
- Writing Portable Code
- 2. Building an Application with PureMVC
- Choosing the Platform
- It Was a Dark and Stormy Night
- StoryArchitect, A Tool for Writing Fiction
- Statement of Purpose
- Determining Scope
- Describing the Domain
- Imagining the User Interface
- Persistence Strategy
- Erecting the Startup Scaffolding
- Prepare the Project and Initial Package Structure
- Create an Application Constants Class
- Class
- Code
- Create a Startup Command
- Class
- Code
- Create the Application Facade
- Class
- Code
- Initialize the Application Facade and call startup()
- Class
- Code
- Building from the Outside In
- Step 1: Value Objects
- Step 2: View Components
- Step 3: Proxys
- Step 4: Mediators
- Step 5: Commands
- 3. Modelling the Domain
- Designing the Schema
- Reviewing the Entities
- Creating the Schema
- ValueObject
- Note
- Setting
- Milieu
- Character
- Cast
- Draft
- Scene
- Chapter
- Part
- Story
- Season
- Series
- Creating the Value Objects
- A Simple Case
- NoteVO
- A Slightly More Complex Case
- ValueObject
- An Advanced Case
- StoryVO
- A Simple Case
- Creating the Enums
- Enumerating the Enums
- The Base Class
- Enum
- An Enum Subclass
- StoryTypeEnum
- Testing the Entities
- A Flex Unit Test Class
- NoteVOTest
- A Flex Unit Test Class
- Designing the Schema
- 4. Implementing the User Interface
- A Tale of Two Views
- The Application
- Class
- Responsibilities
- Collaborations
- Code
- The Chooser
- Class
- Responsibilities
- Collaborations
- Code
- The Story Chooser
- Class
- Responsibilities
- Collaborations
- Code
- The Editor
- Class
- Responsibilities
- Collaborations
- Code
- The Editor Controls
- Class
- Responsibilities
- Collaborations
- Code
- The Details Component
- Class
- Responsibilities
- Collaborations
- Code
- The Item Info Component
- Class
- Responsibilities
- Collaborations
- Code
- The Notes Component
- Class
- Responsibilities
- Collaborations
- Code
- The Timeline Component
- Class
- Responsibilities
- Collaborations
- Code
- The Story Tile
- Class
- Responsibilities
- Collaborations
- Code
- The Part Tile
- Class
- Responsibilities
- Collaborations
- Code
- The Chapter Tile
- Class
- Responsibilities
- Collaborations
- Code
- The Scene Tile
- Class
- Responsibilities
- Collaborations
- Code
- The Draft Tile
- Class
- Responsibilities
- Collaborations
- Code
- The Selection Context
- Class
- Responsibilities
- Collaborations
- Code
- The App Event
- Class
- Responsibilities
- Collaborations
- Code
- The Application
- A Tale of Two Views
- 5. Proxying the Model
- Proxy Life Cycle
- Persistence Strategy Revisited
- What Proxys Do We Need?
- How will we store the data?
- Indexing
- A sample index.xml file
- Building the Proxys
- The Abstract Proxy
- Class
- Responsibilities
- Collaborations
- Code
- The Cast Proxy
- Class
- Responsibilities
- Collaborations
- Code
- The Milieu Proxy
- Class
- Responsibilities
- Collaborations
- Code
- The Story Proxy
- Class
- Responsibilities
- Collaborations
- Code
- The Series Proxy
- Class
- Responsibilities
- Collaborations
- Code
- The Abstract Proxy
- 6. Mediating the View
- Mediator Life Cycle
- Communicating with the Component
- Communicating with the Application
- Notification Interests
- Handling Notifications
- Collaboration with Proxys
- Avoid Retrieving Other Mediators
- Mediator Multiplicity
- Determining Granularity of Mediation
- Building the Mediators
- The Application Mediator
- Class
- Responsibilities
- Collaborations
- Code
- The Chooser Mediator
- Class
- Responsibilities
- Collaborations
- Code
- The Editor Mediator
- Class
- Responsibilities
- Collaborations
- Code
- The Application Mediator
- 7. Applying Business Logic
- Two Shades of Logic
- Domain Logic
- Business Logic
- Why the Distinction?
- Command Life Cycle
- Building the Commands
- The Startup Command
- Class
- Responsibilities
- Collaborations
- Code
- The Edit Story Command
- Class
- Responsibilities
- Collaborations
- Code
- The Apply Selection Command
- Class
- Responsibilities
- Collaborations
- Code
- The Remove Selection Command
- Class
- Responsibilities
- Collaborations
- Code
- The Apply Changes Command
- Class
- Responsibilities
- Collaborations
- Code
- The Discard Changes Command
- Class
- Responsibilities
- Collaborations
- Code
- The Add Item Command
- Class
- Responsibilities
- Collaborations
- Code
- The Startup Command
- Registering the Commands
- Application Facade / initializeController()
- Class
- Method
- Responsibilities
- Code
- Application Facade / initializeController()
- Two Shades of Logic
- 8. Advanced Model Topics
- Handling Synchronous Behavior
- The Story Proxy
- Class
- Method
- Code
- The Apply Selection Command
- Class
- Methods
- Code
- The Story Proxy
- Handling Asynchronous Behavior
- Separate Invoker and Responder(s)
- Single Invoker/Responder
- The Service Request
- Class
- Code
- The Search Story Command
- Class
- Code
- The Story Reading Proxy
- Class
- Code
- Reusing the Model Tier
- Step 1: Create a New Flex Library Project
- Step 2: Add Library Project to Flex Build Path in App Projects
- Extra Credit: Refactor the Startup Process
- The Application Facade
- Class
- Code
- The Startup Command
- Class
- Code
- The Prepare Controller Command
- Class
- Code
- The Prepare Model Command
- Class
- Code
- The Prepare View Command
- Class
- Code
- The Refactored Projects
- Handling Synchronous Behavior
- 9. Advanced View Topics
- Managing Pop Ups
- Past Approaches
- A Different Approach
- The Add, Change, and Delete Story Use Cases
- The Pop Up Request
- Class
- Code
- The Pop Up Action Event
- Class
- Code
- The Pop Up Interface
- Class
- Code
- The Confirmation Pop Up
- Class
- Code
- The Story Pop Up
- Class
- Code
- The Abstract Pop Up Mediator
- Class
- Code
- Story Pop Up Mediator
- Class
- Code
- The Confirmation Pop Up Mediator
- Class
- Code
- The Manage Story Command
- Class
- Code
- Deferred Instantiation
- The Application Sections TabNavigator
- Class
- Code
- The Application Sections Mediator
- Class
- Code
- The Application Sections TabNavigator
- Dynamically Adding View Components
- The Game Board
- Class
- Code
- The Game Board Mediator
- Class
- Code
- The Game Board
- Flex Mobile Mediation Strategy
- Typical Flex or AIR Mediation
- Flex Mobile Mediation
- A Flex Mobile Example
- The IMyMobileApp Interface
- The MyMobileApp Application
- The Application Facade
- The Startup Command
- The Application Mediator
- The Mediate View Command
- The List View
- Managing Pop Ups
- 10. Onward
- Using a Debugger with PureMVC
- PureMVC Utilities
- Other Resources
- About the Author
- SPECIAL OFFER: Upgrade this ebook with OReilly