Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: ConditionalCommand  (Read 7838 times)
lukasbuenger
Newbie
*
Posts: 5


View Profile Email
« 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
« Last Edit: June 25, 2010, 08:25:58 by lukasbuenger » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
lukasbuenger
Newbie
*
Posts: 5


View Profile Email
« Reply #2 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

Logged
lukasbuenger
Newbie
*
Posts: 5


View Profile Email
« Reply #3 on: June 28, 2010, 03:38:16 »

Fixed some spelling errors and there's a multicore version as well. Demo's still fine.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 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>
Logged
Pages: [1]
Print