Forums

Full Version: flare and the model view controller pattern
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good morning,

hope all are well.

This demo is my first round approach of fitting flare into a MVC pattern architecture. I basically tried to follow the implementation outline of the "Car" example from the 12th chapter of the book "ActionScript 3 Design Patterns" by William Sanders and Chandima Cumaranatunge.
The 12th chapter of this book can be downloaded for free from here.

I hope that this demo program stimulates a discussion within the flare community about different architectures for flare applications suiting varying needs. I am by no means an OO architect so this demo is meant as a starting point rather than a demonstration how to do it.

What might be worse noting about the approach chosen here is that the graph data is held twice, once as usual in the model layer, secondly in the view.
This approach is partly stimulated by a post from Wouter Van den Broeck in the sourceforge flare forum http://sourceforge.net/forum/message.php?msg_id=5066814 who explained there about his specific implementation: "I do have a 'real' data model separate from the flare data, as I consider the flare data to be part of the 'view"

In this demo here the flare Data class is also used in the model layer to hold the data (yet in a different instance than the one used in the view). This is solely due to the laziness on side of the author when it comes to writing demo programs and most likely not the way to go in normal applications. Nevertheless I hope this is not crucial for the discussion I would love to stimulate.


TO BE DISCUSSED


Cheers

martin


requires flare version 2008.07.29 or higher
I posted another thread, flare and the PureMVC framework, which achieves exactly the same result as this demo here by using the wonderful PureMVC framework
Reference URL's