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
Cliff Hall has been developing software professionally since the early 1980s. He is the author of the PureMVC framework and owner of Futurescale, Inc., where he consults as a business software architect specializing in Adobe Flex and AIR. When he isn't coding, he enjoys reading, writing, creating music and being one with the universe (all preferably from the peace and quiet of home).
Comments about oreilly ActionScript Developer's Guide to PureMVC:
If you'd look at forums for Actionscript frameworks, you'd notice that the questions revolve mostly around application's architecture and how to implement the design patterns promoted by each of these frameworks, and less around the usage of the framework.
No matter what framework you'll choose to use or are already using, this book can help you understand the MVC concepts and other principles or design patterns, like the SRP (Single Responsibility Principle), SoC (Separation of Concerns), code reusability, naming conventions, package structure. It helps you answer the big questions everyone asks themselves when they start developing a complex application: where to start, how to organize the classes, which class should do what and how to enable the communication between them in the most efficient way, in other words, how to deal with the complexity of a real-world application. Since the book focuses more on general architectural aspects than on the PureMVC framework itself, the lessons learned through reading it can help *any* software developer, and are applicable on different development platforms, not only the Flash platform. In fact, the title of this book should have been: Developer's Guide to MVC on the basis of PureMVC.
The book takes you gently through all the stages of building a non-trivial application: - from brain-storming to defining the requirements, the use cases and a startup flow - from preparing the project and package structure to building all your classes and the relationships between them You'll learn about the classes outside of the boundaries of your application (domain model and view components), and why they should be the starting point in prototyping your app. I liked the great emphasis put on 'Modelling the Domain'. Even though the example used in this book is pretty complex, it is quite easy to understand, because for each class you'll find a description of its responsibilities and collaborations, and the code itself is very well commented. I liked the fact that the example is original, not the usual Shopping app or something like that… I also liked the author's pragmatic point of view and the hands-on way of presenting the framework.
Conclusion: This book expands and solidifies your knowledge of architectural and design patterns in general and the PureMVC framework in particular. The book and example are a welcome and useful addition to the excellent documentation, demos and knowledge base on the PureMVC's website and forum.
12/24/2011
(1 of 1 customers found this review helpful)
4.0
A great help w/ PureMVC (MVC in general)
By Zermatt Chris
from Zermatt, Switzerland
About Me Designer, Developer, Ski bum
Pros
Accurate
Concise
Helpful examples
Well-written
Cons
A bit specific to AS3
Best Uses
Expert
Intermediate
Student
Comments about oreilly ActionScript Developer's Guide to PureMVC:
I've been following and dabbling with PureMVC for a while, but have always missed a thorough example and discussion of how best to set-up and organise a larger project -- most of the how-to's and blog articles out there are either very basic, a bit outdated or focus on some specific project detail, making it a bit tough to get started with PureMVC.
This book is geared towards Adobe's ActionScript 3 and Flex, but many of the tips & pointers apply equally to the (many) other ports of PureMVC.
I'm interested in PureMVC in conjunction with an AIR/Javascript project I'm tinkering with. My goal is to use PureMVC to handle the basic project organisation (the 'Core') and then be able to pick-and-choose other js libs/frameworks to handle "the bits at the boundries", especially the View components, where I'm looking to use Agility.js, Less.js and jQuery.
The only point I would have liked to have seen would have been a short section after the initial overview/planning chapters detailing the creation of a super-simple, but working app. For me it dropped a wee bit quickly into the fairly involved StoryArchitect app example.
Conclusion: If you're interested in working with PureMVC, then I wouldn't hesitate to pick up this handy reference. I'm hoping to be able to apply this to the rumored *PureMVC Native Javascript* port soon (fingers crossed).