Archive for the ‘Misc Frameworks’ Category

The Swiz Framework

The Swiz framework has some good ideas, there is no doubt about that. The mission statement “Swiz imposes no JEE patterns on your code, no repetitive folder layouts, and no boilerplate code on your development.” sounds like a direct reaction to Cairngorm.

So first of all… “imposes no JEE patterns”, what’s a _bean_ loader? Are we talking about a soy bean? I suspect a bean that starts with a j, ends with ava. 😛 That’s cool though, because I like the looks of Swiz’s bean loader. (I’m guessing the JEE they are referring to is the locator pattern that Cairngorm uses.)

Next on the list: “no repetitive folder layouts”. Well, crap. I actually don’t think this is a good idea. One thing I like about both Cairngorm and Ruby on Rails is that you always know where code should go… even 6 months down the road or jumping into someone else’s project. As far as repetitive goes, Flex is missing a tool as good as rake. There is nothing wrong with a well-structured set of directories.

“… And no boilerplate code on your development”. Now we’re talking. 🙂

However, I think much of Cairngorm’s boiler plate can be fixed by writing some bases classes. Delegates, for example, are the worst offenders. Often each one is loading some xml, sending it to a factory for parsing, and then returns a result or fault object. That could be easily fixed (and I’ll post the code for that in a future blog on my own Cairngorm-derived framework).

I spotted one potential area of tight-coupling that I did not like. The autowiring metatags [Autowire(bean="foo")] hardwire a controller to a specific bean by id inside the controller. I think you could achieve a more reusable design by injecting the beans from outside of the controller.

All in all, Swiz looks very promising with some innovative ideas– once the kinks are worked out.

Mate Framework (an unfair review)

My initial and totally unfair impression of the mate framework: meh.

All ya gotta do is look at a sample “event map” to see that you have an unmanageable glob of xml code that is going to grow into a massive disorganized pile of poo.

Even if the map was somehow trimmed down, organized and specialized– you gotta question whether a block like this:

    <!-- parse results into an array collection the photo coordinator can use -->             
    <MethodInvoker generator="{FlickrHelper}" method="parsePhotos" 
arguments="{resultObject}" />                
    <!-- set the photos --> 
    <MethodInvoker generator="{PhotoCoordinator}" method="setUp" 
arguments="{lastReturn}" />    
    <!-- start show --> 
    <MethodInvoker generator="{PhotoCoordinator}" method="start" />

really is more readable than the same calls made in pure actionscript code. The fact that you need a comment over every line of xml code should be warning enough.