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

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Re: PureMVC without singleton's? on: August 24, 2008, 02:28:53
Has anyone looked at Luke Bayes' approach to this for Flex?: http://code.google.com/p/flexmvcs/

----
This build differs from PureMVC in the following ways:

    * Removed unnecessary use of Singletons.
    * Added IService as a first-class participant and member of IFacade.
    * Created asynchronous commands that trigger events when complete.
    * Added composite command that facilitates synchronous and asynchronous command chaining with support for arbitrary composition depth.
    * Added MXML Facade definitions. Application Facades can be defined using MXML instead of only ActionScript.
    * Added support for Modular Flex applications, including composite Facades for each loaded module.
    * PureMVC is trying to be more than we need, we need clean, intuitive support for Flex and ActionScript. Not ECMA, Java or other languages.
2  Announcements and General Discussion / General Discussion / Re: Website issues on: April 27, 2008, 02:10:15
Hey Cliff,
it's definitely a stellar effort you've put in, but I would just +1 having the forum not open in a frame! Just not the done thing nowadays and has had me right click -> this frame -> open in new tab with each visit to the site :(. Can't bookmark either (and there's lots of good posts to del.icio.us!)

Very minor usability issue though!
3  Announcements and General Discussion / General Discussion / Re: IRC Channel for puremvc?! on: April 27, 2008, 11:50:58
Ha, yes you are indeed.

Was good to meet you after the London Adobe talk. We've gone through setting an irc server up for our team, and once we've setup IRCCAT and configured an Eggdrop bot will probably have some good info for you - unless any other puremvc'ers are already down with managing an irc channel and can provide detailed info?

Anyway be back in touch soon.
4  Announcements and General Discussion / General Discussion / IRC Channel for puremvc?! on: April 22, 2008, 09:00:06
Hi,
wondering whether we can get this going on freenode. Would assume cliff wants to setup the bot (or anyone else running channels on freenode?) but think it would be ideal to have a channel we could also sit in to discuss dev issues around puremvc.

cheers,
justin
5  Announcements and General Discussion / Architecture / Re: Implementing Undoable commands in PureMVC on: January 08, 2008, 07:54:53
Hi Cliff / Dragos,
 is it possible to get access to the examples repository to check out any progress on this? I have to rework the command history component of an application I'm building, and have got a few days to focus solely on command history in PureMVC, so interested in looking at Dragos' solution.

cheers,
justin.
6  Announcements and General Discussion / General Discussion / Re: Meditor, handle of notification without switch statement... on: January 02, 2008, 04:36:39
If anyone's interested, this topic has also been covered indepth here: http://forums.puremvc.org/index.php?topic=22.0
7  Announcements and General Discussion / Architecture / Re: Implementing Undoable commands in PureMVC on: December 03, 2007, 04:08:59
Hi Cliff,
 yep still around - and just read your post re: contributions. Very interested to help out when I can, and it sounds like a good idea to start here.

Just about ready for a closed-beta launch of a major app we're releasing, which uses PureMVC, WebORB, and APE. Looking to get a chance to refine things and perhaps create some puremvc demos off the back of what I've learnt so far.

Dragos, I'm looking through your example now and would be interested in seeing your example implementation if possible.

cheers,
justin.
8  Announcements and General Discussion / Architecture / Implementing Undoable commands in PureMVC on: October 15, 2007, 07:57:41
Hi there,
 I'm interested in people's thoughts on this approach to implementing undoable / redoable commands within a PureMVC application:
1. create an IUndoableCommand interface in controller namespace with methods undo() and redo()
2. create a CommandHistoryProxy as below
:
public class CommandHistoryProxy extends Proxy implements IProxy {

private var _commands:Array;
private var _index:uint;

public static const NAME:String = 'CommandHistoryProxy';

public function CommandHistoryProxy() {
super(NAME);
init();
}

private function init():void {
_commands = new Array();
_index = 0;
}

public function putCommand(command : IUndoableCommand) : void {
_commands[_index++] = command;
_commands.splice(_index, _commands.length - _index);
}

public function previous():IUndoableCommand {
return _commands[--_index];
}

public function next():IUndoableCommand {
return _commands[_index++];
}

public function hasPreviousCommands():Boolean {
return _index > 0;
}

public function hasNextCommands():Boolean {
return _index < _commands.length;
}
}
}
3. create a concrete ItemSelectedCommand command which implements IUndoableCommand. Its execute method does something like this:
:
undo_item = INode(note.getBody());
var command_history_proxy : CommandHistoryProxy = facade.retrieveProxy(CommandHistoryProxy.NAME) as CommandHistoryProxy;
command_history_proxy.putCommand(this);
Its undo and redo methods change state and send appropriate notifications
4. A ComandHistoryMediator which listens for ApplicationFacade.ITEM_SELECTED notifications (to toggle visibility of undo / redo buttons), and contains a CommandHistory view component which:
  • contains undo and redo buttons
  • has public methods to set the visibility of each
  • dispatches CommandHistory.UNDO and CommandHistory.REDO methods
The CommandHistoryMediator defines onUndo and onRedo methods which simply retrieve the appropriate command
:
var command:IUndoableCommand = command_history_proxy.previous() and then calls command.undo / command.redo

I was also wondering what the best approach for implementing multiple arrays of command histories would be? Is the type parameter of the sendNotification method an appropriate place to specify the type of the command history to store? For instance, if CommandHistoryProxy was reworked to store arrays of command histories as a hash, using the sendNotification's state method I might do something like sendNotification(ApplicationFacade.ITEM_SELECTED, item, ApplicationFacade.APPROPRIATE_STATE), so the execute method of ItemSelectedCommand might do
:
command_history_proxy.putCommand(this, ApplicationFacade.APPROPRIATE_STATE
I'm also wondering whether it makes sense to subclass Notification to implement getUndoBody() and getRedoBody() depending on the command history requirements. Is that a sensible case for subclassing?

cheers,
justsee
Pages: [1]