PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: lukasbuenger on June 25, 2010, 08:15:49



Title: ConditionalCommand
Post by: lukasbuenger on June 25, 2010, 08:15:49
Hi everybody!

PureMVC saved my life and washed my brains. However, something that I've been missing for some time now is a strict and well-defined method that allows you to validate data before and after an operation is executed. Therefore I wrote a little extension to PureMVC which introduces ConditionalCommand, an extension to the Command pattern. It allows you to implement pre- and postconditions without changing the overall behaviour of the native pattern.

I attached two archives. One contains a flex demo, the other one the source files and some asdocs. You'll need Flex SDK 4 to compile the demo and the extension was written on top of PureMVC 2.0.4 which is included in the demo archive.

I'd be glad to read your thoughts on this.
Lukas


Title: Re: ConditionalCommand
Post by: puremvc on June 25, 2010, 04:53:27
Hey, this is pretty spiff.

I read through all the code but really had to run the demo to get the gist of it, and it certainly looks like a useful utility.

If you would like to donate it to the project it'd really be appreciated. I can put it into a repository (and make you a project owner with a puremvc.org email address). Both projects are packaged properly, but you'll need to put proper attribution headers in each file in the source code like:

:
/*
PureMVC Utility - Conditional Command
Copyright (c) 2010 Lukas Buenger  <lukas.buenger@puremvc.org>
Your reuse is governed by the Creative Commons Attribution 3.0 License
*/

and

:
/*
PureMVC Flex Demo - Conditional
Copyright (c) 2010 Lukas Buenger  <lukas.buenger@puremvc.org>
Your reuse is governed by the Creative Commons Attribution 3.0 License
*/

-=Cliff>


Title: Re: ConditionalCommand
Post by: lukasbuenger on June 27, 2010, 10:40:23
Hi Cliff!

Thanks! I'd like to donate this to the project. I put the headers into the files and attached them once more. I'll comment the demo files as soon as possible.

Lukas



Title: Re: ConditionalCommand
Post by: lukasbuenger on June 28, 2010, 03:38:16
Fixed some spelling errors and there's a multicore version as well. Demo's still fine.


Title: Re: ConditionalCommand
Post by: puremvc on June 29, 2010, 07:40:14
Sweet, I forgot to mention doing a MultiCore version if possible. This helps with adoption of a utility, since it makes migration from Standard to MultiCore less of an issue.

I'll get this into a repo soon.

Cheers,
-=Cliff>