I've gotten off to kind of a slow start here with my blogging. It seems this space will in fact be more of a dribble than a torrent.
In the year that I have been developing with the ESRI Flex API I have come to learn the importance and value of using a good architectural design pattern. I am a big fan of the Model-View-Controller (MVC) pattern and use it in most if not all of my projects. Using the pattern has saved my ass on numerous occassions -- and neglecting to use it has come back to bite me.
Although there are a number of popular Flex MVC frameworks available (eg. Cairngorm, pureMVC, mate, Model-Glue, among others) --these can be overkill for simple web mapping applications -- particularly for beginners. Ive found that many folks have chosen to avoid these what can be larger more complicated frameworks in favor of their own home-grown MVC solutions. I believe that can be a good option -- particularly for smaller projects.
Once such pattern is the EasyMVC pattern by Tom Bray. Be sure to check out the recorded seminar for all the details. This is the MVC pattern that I use most frequently. In this post I have provided the ESRI Flex API MapSwitcher sample using this pattern.
Here is the application in action as well as the application source.
I am certainly not advocating this as the best MVC pattern out there... but I believe its a good place to start place for beginners and small projects. In future posts I will likely use either this pattern -- or the pattern used by the ESRI Sample Flex Viewer (for posts in that context).
In the meantime, happy Flexing and welcome to MVC.