05 December 2007 ~ 11 Comments

easyMVC: Somebody wrote another flex framework

I can’t believe I am doing this, but I am releasing a little bit of code that I wrote a while back. I have shared this with several people and all have expressed happiness over having had it enter their life. So I give to you easyMVC 0.1.

A long time ago I started writing a series of articles on how to get started using Cairngorm. I wanted to stress that in order to start gaining the benefits of the framework you did not have to jump in with both feet. I was aiming to display that you could use most of the pieces of the framework independently. And in writing some code to demonstrate how this could work, I ended up writing a very simplified version of Cairngorm. It has a ModelLocator, and a ServiceLocator and some other stuff. But I realized I was just re-writing Cairngorm and I was not interested in that. Cairngorm is a great framework and brighter minds than mine spent lots time preparing it. So I put the code away and gave up on the articles because I had other things to do.

Then a few months ago I needed to through together a quick flex project. I didnt feel like investing the time into setting up Cairngorm because it was just a couple views with a little bit of logic. I started looking to the other frameworks but found that even though they require less setup code than CG they still required a lot of configuration. So I decided to resurect my little framework. It wasnt much of a framework yet (frankly it still isnt) but I worked on it and it did what I needed for my application.

I decided that I might like to use that again, so I refactored the code out of the project and set up a swc. Then a little while later I was talking with some friends and I ended up sharing some of the code (first mistake). I spent some time explaining why I thought my framework was different, things like not having to write any classes that are not explicitly required for your application. It being event driven, but you don’t have to declare any custom events to get started. Little things like drop in the code and start on your application with out having to configure anything in particular. These seemed to be things other developers were having problems with. So I gave them my code. And I am happy to report that, it seems to have made their lives happier too :)

EasyMVC is not intended to pull anyone away from Cairngorm. Its nowhere complete or comprehensive as Cairngorm. But it does seem to suffice for those smaller apps that don’t warrant all that setup.

You can download the code for the project here EasyMVC 0.1 and I have set up a project site over here EasyMVC Project Site.

Let me know if you have any thoughts or questions.

*****
Updated: Fixed the link to the project site. Thanks gang for the heads up.
*****

Tags: , ,

11 Responses to “easyMVC: Somebody wrote another flex framework”

  1. Peter Bell 5 December 2007 at 10:52 pm Permalink

    Cool – Can’t wait to play with it! Was looking for something lighter weight than Cairngorm to cut my teeth on . . .

    BTW, second link is broken – one “t” too many
    htttp://projects.simb.net/easyMVC/
    should be
    http://projects.simb.net/easyMVC/

  2. Erno 5 December 2007 at 11:47 pm Permalink

    Sounds interesting..

    “EasyMVC Project Site” -link dont work. There is htttp.

  3. Gareth 6 December 2007 at 6:05 am Permalink

    Looks like you added an extra ‘h’ to the project site URL. Nice little framework/idea here. I’ll have to download it and check it out a bit.

  4. Gareth 6 December 2007 at 11:53 am Permalink

    That’s the letter I meant to type :)

  5. Maxim Porges 7 December 2007 at 12:40 pm Permalink

    Hmm… seems like a lot of people have been having these “lighter Flex framework” thoughts recently. Check out Corfield’s blog for similar thoughts on the subject, as well as this post I wrote a while ago.

    I’ll also be presenting on the “no framework-framework” for cf.o() 2008. Perhaps I’ll take a look at what you have in easy MVC as a point of reference.

    - max

  6. Paul Andrews 9 December 2007 at 5:31 pm Permalink

    Nice job Simeon. I’ll check it out and it may well replace my own hand-rolled efforts.

    Thanks for posting the project.

    Paul

  7. dnk 12 December 2007 at 3:06 pm Permalink

    Just a heads up, but Tom Bray had done a mini project/framework under the moniker “EasyMVC” back in October.

    Just a heads up as both exist in the flex world and could cause some confusion.

    http://www.tombray.com/category/easymvc/

  8. Simeon 12 December 2007 at 4:01 pm Permalink

    Thanks dnk, that does present an interesting problem. When I started this project earlier this year there were no search results for easyMVC in google.

    If I search now I see that I have top ranking for the term. As well as having posted example code with the framework in it back in august, I suppose I might be able to say mine was out first. There was just no project site.

    I am not too hard up for the name, but if you would like to verify first use of the name on the framework feel free to check the svn history for this url http://svn.simb.net/public/flexcf/branches/easyMVC/

    However all this is moot until someone actually uses my framework :) I couldnt find any code posted for his, so I cant even bow out to the better framework.

    But thanks for bringing this to my attention.

  9. Jon 21 January 2008 at 6:29 am Permalink

    Hi Simeon,

    I wroteup Tom’s EasyMVC solution, it does not require a download, hence no source files (though there are demo files to see it’s implementation) instructions can be found here: http://clockobj.co.uk/2007/10/17/simplified-cairngorm-easy-mvc-for-adobe-flex/

    I don’t think Tom ever intended to maintain a Framework as such, but to present a simplified implementation of Cairgorm that has been used by his company. Also his presentation was to better understand how Cairgorm works and the whole point of using an MVC framework like this. His presentation was in September on the Adobe Developer Network as part of their Technical Tuesday Screencasts.
    I can confirm that it is being used by several Adobe Flex houses including our own.

    It is not my place to discuss the clash in name but please feel free to have a look at the details of the framework introduced by Tom.

    Regards,

    Jon

  10. Beck 24 January 2008 at 3:21 pm Permalink

    Looks likes good, but what about a License??

  11. Jonecir 2 December 2008 at 5:33 pm Permalink

    Where can I download this easymvc?


Leave a Reply

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIEhpISBNeSBuYW1lIGlzIFNpbWVvbiBCYXRlbWFuIGFuZCBJIGFtIGEgd2ViIGFwcGxpY2F0aW9uIGRldmVsb3BlciBzcGVjaWFsaXppbmcgaW4gdGhlIEFkb2JlIEZsYXNoIFBsYXRmb3JtLiAgSSBhbSBhbiBBZG9iZSBDb21tdW5pdHkgRXhwZXJ0IGFuZCBhbiBBZG9iZSBDZXJ0aWZpZWQgVHJhaW5lciBmb3IgRmxleCBhbmQgQUlSLiAgSSBhbSBhbHNvIHRoZSBQcmluY2lwbGUgSW5zdGlnYXRvciBmb3IgUE5XIFJhaW4gTExDIGFuIFJJQSBjb25zdWx0aW5nIGFuZCBtZW50b3JpbmcgY29tcGFueS48L2xpPjxsaT48c3Ryb25nPndvb19hZHNfcm90YXRlPC9zdHJvbmc+IC0gdHJ1ZTwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2ltYWdlXzE8L3N0cm9uZz4gLSBodHRwOi8vd3d3Lndvb3RoZW1lcy5jb20vYWRzL3dvb3RoZW1lcy0xMjV4MTI1LTEuZ2lmPC9saT48bGk+PHN0cm9uZz53b29fYWRfaW1hZ2VfMjwvc3Ryb25nPiAtIGh0dHA6Ly93d3cud29vdGhlbWVzLmNvbS9hZHMvd29vdGhlbWVzLTEyNXgxMjUtMi5naWY8L2xpPjxsaT48c3Ryb25nPndvb19hZF9pbWFnZV8zPC9zdHJvbmc+IC0gaHR0cDovL3d3dy53b290aGVtZXMuY29tL2Fkcy93b290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