TracNav
AS3 Standard : Bookstore...
- Downloads
- Installation
- Release Notes
- View Source
- Discussion
Project Owner...
- David Deraedt
Demo - Flex + WebORB / Bookstore
This demo illustrates the use of PureMVC to perform CRUD operations using a RemoteObject.
Techniques Illustrated
- PureMVC initialization in a Flex application
- Call of an AMF Service using the RemoteObject class
- Use of a Value Object reflecting the server-side business object's data.
- Update of views as a consequence to those calls
Discussion
This demo was primary intented to understand the main differences between the PureMVC and Cairngorm frameworks regarding the architecture of a basic Flex Remoting application performing simple CRUD (Create Read Update Delete) operations. It uses a Bookstore as an illustration. A datagrid shows a list of Books. The user can select a Book, edit it, or delete it. He/She? can also create new Books.
This example uses Commands to call the Service methods and to listen to their response. To do so, the Commands additionally implement IResponder, a Flex interface.
When a response is received from the Service, the Commands send a Notification so that the views that display the corresponding are updated accordingly.
Please note that this is not the recommended way to use remote Services with PureMVC. The best practices suggest that a Proxy (ie the Model layer), not a Command, should do this job. One of this example's goal is to show that it is also possible to do so the "Cairngorm way".
