PureMVC
Home
About
Code
Docs
FAQ
Forums
News
Showcase
Contact
Jobs
Welcome,
Guest
. Please
login
or
register
.
June 20, 2013, 06:31:20 AM
News:
ATTENTION: Spambots must die! Humans must visit
http://contact.futurescale.com
to request forum access.
PureMVC Architects Lounge
PureMVC Manifold
Port to AS3
Standard Version
Async Macro Command
Pages: [
1
]
« previous
next »
Author
Topic: Async Macro Command (Read 1433 times)
lulumOriss
Jr. Member
Posts: 14
Async Macro Command
«
on:
December 23, 2011, 02:39:19 AM »
Hi,
I would like to know the best practice to set the following issue:
How can I create an async macro command which will execute a task list, each one needing values from the previous one?
i.e., I store data in a remote database which returns the id of the last row. After what, I store this id in my local database.
I've thought storing each temporary data in a proxy but I'm not sure it's a good idea.
Thanks. lulu.
«
Last Edit: December 23, 2011, 04:13:32 AM by lulumOriss
»
Logged
Tekool
Sr. Member
Posts: 196
Re: Async Macro Command
«
Reply #1 on:
December 23, 2011, 03:20:31 AM »
A good way of doing this is to use a Proxy which take commands name into parameters and execute them sequentially. It is the responsability of the command to call the proxy the right way to tell it to execute the next command in the list when the result is received from the server.A PureMVC extension to do this automatically would probably be a good idea. So I think that your idea of handling it within a proxy which temporarily stores server VOs is the good way of handling it.
Logged
philipSe
Sr. Member
Posts: 136
Re: Async Macro Command
«
Reply #2 on:
December 23, 2011, 03:46:09 AM »
If each task is a retrieval from the remote database, then the Loadup utility might be applicable. Loadup allows you to specify a set of dependent retrievals and then say 'loadResources' and it takes care of the dependencies. Each task is a separate proxy instance (whether of different proxy classes or same proxy class), and the proxy (or proxies) must implement the ILoadupProxy interface.
See
http://trac.puremvc.org/Utility_AS3_Loadup
----Philip
Logged
lulumOriss
Jr. Member
Posts: 14
Re: Async Macro Command
«
Reply #3 on:
December 23, 2011, 04:24:27 AM »
@Tek: In my MVC understanding, I consider Proxies as a storage object with limited actions. I'm going to watch this way out.
@phillipSe: I'm not sure to understand the Loadup utility but I saw this issue as a generic mechanism, which can execute various tasks.
Thanks both.
lulu.
Logged
puremvc
Global Moderator
Hero Member
Posts: 2791
Re: Async Macro Command
«
Reply #4 on:
December 23, 2011, 08:44:27 AM »
Look at the AsyncCommand utility. And note that the initial notification that is passed to the AsyncMacroCommand may be modified as it is passed from sub command to sub command.
-=Cliff>
Logged
lulumOriss
Jr. Member
Posts: 14
Re: Async Macro Command
«
Reply #5 on:
December 23, 2011, 08:54:18 AM »
Uh, here's a thing I've never heard about. This is exactly what I need.
Thanks.
lulu.
Logged
Tekool
Sr. Member
Posts: 196
Re: Async Macro Command
«
Reply #6 on:
December 23, 2011, 11:37:07 AM »
Exact I forget this one as I'm used to the JavaScript version which lacks the port of this utility.
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements and General Discussion
-----------------------------
=> General Discussion
=> Getting Started
=> Architecture
=> Public Demos, Tools and Applications
===> Fabrication
-----------------------------
PureMVC Manifold
-----------------------------
=> Port Authority
===> Contributor Central
===> Client Side
===> Server Side
=> Port to AS2
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to AS3
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to ColdFusion
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to C++
===> MultiCore Version
=====> Demos and Utils
=====> Bug Report
=> Port to CSharp
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Dart
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Haxe
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Java
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to JavaScript
===> Demos and Utils
===> Native JS Branch
=====> Bug Report
===> PrototypeJS Branch
=====> Bug Report
===> Objs Branch
=====> Bug Report
===> MooTools Branch
=====> Bug Report
===> ExtJS Branch
=====> Bug Report
=> Port to Objective C
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Perl
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to PHP
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Python
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Ruby
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to TypeScript
===> Standard Version
=====> Bug Report
=====> Demos and Utilities
===> MultiCore Version
=====> Bug Report
=====> Demos and Utilities
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.11
|
SMF © 2006-2007, Simple Machines LLC
Loading...
Copyright © 2006-2008 Futurescale, Inc.