Some people may want to flame me for not liking frameworks but keep an open mind while I briefly explain.
**Why I don’t like frameworks**
Frameworks are great for getting from 0 to 60 really fast, most of the time. They take care of redundant tasks for you by providing code to manage those tasks. If this is true, and I believe it is, then why don’t I like them?
The majority of the frameworks out there add a bunch of extra junk you don’t need or won’t always use. Sometimes they have weird configurations and approaches. Most times the only thing it provides is a common code-base a new developer can jump in and be productive because they already know the chosen framework. If the latter is the benefit, give me a few days with the new developer and I’ll get them up to speed and productive.
I won’t spend much time here because this isn’t really what my post is about but the truth is I like to home-roll my own “framework”. There is absolutely nothing wrong with you not using a framework…nothing AT ALL. (“Maxim Porges has an entire preso”:http://maximporges.blogspot.com/2008/05/cfobjective-2008-presentation-materials.html he did, and I liked, at cf.Objective()) You choose what design patterns you want to implement and have at it. This is my preference regardless of language except PHP because “CodeIgniter”:http://www.codeigniter.com makes PHP fun. “Spring”:http://springframework.org makes Java a lot cleaner for me as well but those are about the only two. Well…enter “Mate”:http://mate.asfusion.com.
I talked about “Laura’s preso at cf.Objective() in another post”:http://www.johncblandii.com/2008/05/cfobjective-2008-review-cf8-ne.html and due to my excitement I instantly wanted to see what it was about. Mate is “presently in an Alpha stage”:http://www.asfusion.com/blog/entry/mate-flex-framework-in-public-alpha but feels like a v1.
The event handling is what I longed for my own custom code-base to include (namely the one I built at “Limelight”:http://www.llnw.com) but never had the time to explore it. Mate is a gem in this area. Simply let your events bubble, setup “EventHandlers”:http://mate.asfusion.com/page/documentation/tags/eventhandlers (to do any number of tasks; ex – call a service, set a value on a class, call a method on a class, dispatch another event, etc) for the event(s), and you’re good to go. You could stop there, I have so far, and be pleased with Mate.
The joy is being able to dispatch an event 20 levels into your UI and without setting a globally available property/calling a globally available method (ie – ModelLocator, etc) you can have another view/component receive an update regardless of the location in your app (direct ancestor or otherwise). It is really nice.
Now, another thing I don’t like about frameworks that Mate solves is the majority of the time your app is 100% geared to **that** framework. Mate doesn’t force you to extend any specific classes, unless you want to, so you could strip Mate from your app and merely have to rework your event handling and maybe a few other things, pending how deep you got with things.
I absolutely have enjoyed using it. Personally I am building an AIR app with it and at “Limelight”:http://www.llnw.com I’m redoing a presently built Flash 8 app in Flex w/ Mate. In 3 days of development (mind you, a little in the morning and at night including learning Mate) I have my personal app in a clickable beta and not with dummy code. It is 100% final app code already at the place to tie in data and be ready for an alpha build. The app at “Limelight”:http://www.llnw.com has only had about 3 hours of work on it and is almost in the same state.
Kudos to “Laura and Nahuel of AsFusion”:http://www.asfusion. You have changed my (Flex dev) life.