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  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 24, 2008, 06:25:27
OK, thanks again.
2  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 24, 2008, 12:06:42
Related to my above question here some exmaple.

The EmployeeAdmin uses a DeleteUserCommand which uses a proxy to delete an user and then sends a notification.

For adding an user - similar - logic (calling the proxy to add the user and sending a notification) is done in the UserFormMediator.

I'm wondering why ít's implemented in a different way.
3  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 23, 2008, 11:39:00
I have another question which is going through my head.
In the EmployeeAdmin only 2 commands are defined except the StartupCommand. In other places dispatchEvent(..) is used.

Is there a good rule when to use Commands and when to dispatch events. This does not seem to be consistent, I'm wondering what the difference is between the two.

Cheers,
Marcel
4  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 23, 2008, 05:16:26
Yes updating the id is also vital for possible updating etc.

Thanks for your clarification.
5  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 23, 2008, 12:23:24
Thanks Cliff,

I read about this SQLProxy already and it really helped.

So the approach for doing both the sql insert and adding the item to the internal array collection is good?
6  PureMVC Manifold / Demos and Utils / Re: EmployeeAdmin - A PureMVC AS3 / Flex Demo on: July 22, 2008, 01:27:46
I have question related to this demo.

Currently the demo uses in memory data. In case I want to use SQLite what would be the best place to execute the sql statements? I assume the UserProxy.

:
// add an item to the data
public function addItem( item:Object ):void
{
// add logic here to database insert?

// when database insert successfull then also add item to users ac to display the new record in the binded view
users.addItem( item );
}

I'm wondering if the above pseudo code is the way forward, or are there any better alternatives?

Cheers,
Marcel
Pages: [1]