مشخصات کتاب
-
cliff hall
-
2012
-
انگلیسی
-
399
-
75
-
0
ActionScript Developer's Guide to PureMVC
دوره آموزش MVC
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Classic MVC Architecture 1
The PureMVC AS3 Reference Implementation 3
The Role of PureMVC in Your Application 4
Pay No Attention to the Man Behind the Curtain 5
Meet the Workhorses 6
Actors at the Boundaries 6
Use a Proxy as a Data Source for the Application 6
Use a Mediator as a Secretary for a View Component 9
Actors Between the Boundaries 12
Let SimpleCommands Do Most of the Thinking 12
Use a MacroCommand to Execute Several SimpleCommands 13
The Rest of the Gang 14
Notifications 14
The Core Actors 15
The Facade 15
Packaging Your Classes 16
Ordinary Classes 16
Framework Classes 16
Typical Package Structure 16
Standard and MultiCore Versions 17
Writing Portable Code 19
2. Building an Application with PureMVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Choosing the Platform 21
It Was a Dark and Stormy Night 22
StoryArchitect, A Tool for Writing Fiction 24
Statement of Purpose 24
Determining Scope 25
Describing the Domain 26
Imagining the User Interface 26
Persistence Strategy 27
Erecting the Startup Scaffolding 28
Prepare the Project and Initial Package Structure 29
Create an Application Constants Class 29
Create a Startup Command 30
Create the Application Facade 31
Initialize the Application Facade and call startup() 32
Building from the Outside In 33
Step 1: Value Objects 34
Step 2: View Components 34
Step 3: Proxys 35
Step 4: Mediators 36
Step 5: Commands 37
3. Modelling the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Designing the Schema 39
Reviewing the Entities 40
Creating the Schema 41
Creating the Value Objects 51
A Simple Case 51
A Slightly More Complex Case 53
An Advanced Case 58
Creating the Enums 66
Enumerating the Enums 67
The Base Class 67
An Enum Subclass 68
Testing the Entities 69
A Flex Unit Test Class 69
4. Implementing the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A Tale of Two Views 74
The Application 76
The Chooser 79
The Story Chooser 80
The Editor 82
The Editor Controls 84
The Details Component 87
The Item Info Component 89
The Notes Component 91
The Timeline Component 94
The Story Tile 96