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] 2
1  Announcements and General Discussion / General Discussion / Re: Business logic in Controller on: March 29, 2012, 12:02:44
Thanks Cliff!
2  Announcements and General Discussion / General Discussion / Business logic in Controller on: March 26, 2012, 03:08:26
Hi Forum

During my reading about MVC, I encountered a term that I found interesting.
The term is  Fat Stupid Ugly Controllers (FSUC). It belongs to Padraic Brady, who is pretty famous in PHP community.
He has a pretty cool book about Zend framework, and he wrote a chapter about MVC http://bit.ly/GQrmwJ .

His idea is that controllers should be as thick as possible and our business logic should be in the Model.
In PureMVC we have a separation for Business Logic and Domain Logic, and the best practice is maintaining BL in the controller
and the DL in the model.

So I have two question:
1 - Is PureMVC using a different approach to Controller role, different from classic MVC?
2 - Is the reason for it is AS3, and the fact that the language is multiplatform?

Thanks,
Eli
3  Announcements and General Discussion / General Discussion / Re: Transient proxies question on: January 24, 2012, 01:55:15
Just to clarify.
Let's say that I have a number of asynchronous actions A,B,C,D,E,F.
In my application, I have a lot of places like:
:
after A ended
{
    if (B started)
    {
       start C;
    }
}
So I should create a transient Proxy that will hold AsyncActionsVO that will have public
properties for each state?
That means that after user's action and after some asynchronous action ends, I will make the
check  in the commands?
4  Announcements and General Discussion / General Discussion / Transient proxies question on: January 23, 2012, 10:31:34
I am dealing with the situation where I need to use a large number of transient proxies.
Something like 4-5.
My question is - shouldn't I make some custom proxy that will save information about all the states?
5  Announcements and General Discussion / General Discussion / Re: PureMVC for games on: January 16, 2012, 02:07:05
4ucai

Yes PureMVC is viable for developing games. It is viable for almost any large scale project that you will have.
That being said, you might also want to check frameworks like PushButton or Flixel, for rendering complicated graphics and maybe some of the game logic.
PureMVC does not handle the work with complex display list.

6  Announcements and General Discussion / General Discussion / Re: One notification - multiple actors handling it on: January 15, 2012, 02:22:45
This is great concept Cliff. I found it in the book too.
In this case, should I unregister the proxy after I use it?

The thing is that this process is naturally happening a lot, so I will have to initiate it a lot of times.
So shouldn't I instead have an instance of this proxy all the time, and just change the data when needed?

For example, continuing the example you gave:
:
var startHow:String = facade.retrieveProxy(AppConstants.START_ACTION).getData() as String;
handleStartAction();
facade.registerProxy(new Proxy(AppConstants.START_ACTION, AppConstants.IDLE) );
This way I will be able to know what is the status of the game all the time.
7  Announcements and General Discussion / General Discussion / Re: One notification - multiple actors handling it on: January 12, 2012, 03:57:38
Thanks Cliff

That makes me wonder though:
Avoid retrieving a Mediator from a Command and operating on it.

Shouldn't commands handle the business logic of the application? Sometimes mediators hold the information that command needs.
For example, let's say we have two buttons in our veiw - 'start' and 'start_and_jump'.
Both of them are firing the same notification ANIMATE_BEFORE_START, which will start an animation in different view component.
After the animation ends I will fire "START_GAME" which will invoke "START_COMMAND".
In the "START_COMMAND" I would like to be able to know whether I should jump or not after I start, so my solution is to ask the initial mediator about what happened.
Naturally the perfect solution was to have 2 different notifications, or to pass an additional parameter with the notification, but sadly I can't do it in this case, since the actions are asynchronous.

8  Announcements and General Discussion / General Discussion / One notification - multiple actors handling it on: January 10, 2012, 04:08:44
Hi Forum

I have a bunch of notifications, that a lot of actors are registered to.
Think of a control button which fires a notification which has more than 5 different listeners.

My question is, should I make a command that will handle the notification and operate all the actors, or should I handle this notification in each place separately?


Thanks
9  Announcements and General Discussion / General Discussion / Re: Would you like to see a JavaScript Developer's Guide to PureMVC book? on: January 07, 2012, 02:11:55
Sure, I would like to see it :)
10  Announcements and General Discussion / General Discussion / Re: Basic terminology question - Business Logic, Domain Logic and Domain Model on: January 06, 2012, 09:35:41
Thanks Cliff

First of all, I would like to know who is your client so I could play with the application :)
Second, as always you answer is great, thanks!
11  Announcements and General Discussion / General Discussion / Basic terminology question - Business Logic, Domain Logic and Domain Model on: January 06, 2012, 04:23:55
I am reading the "ActionScript Developer's Guide to PureMVC" right now, and also trying to get some help in the Best Practices document and this great forum.
At this point, I start to realize, that in order to truly understand PureMVC, there are number of key terms that are needed to be figured out.
The problem is that I'm not sure there is a precise definition for some of them(at least not in the context of PureMVC).
For example, what is the accurate definition of Domain Model? This term is being used in both documents.
Is Domain Model similar to Model from PureMVC?
Also, I think that I understand the difference between Business Logic and Domain Logic, but how are they connected to Domain Model?
The best practices document says:
Commands house the Business Logic of our application; the technical implementation of the use cases our application is expected to carry out against the Domain Model. This involves coordination of the Model and View states.
but the next paragraph says:
The Model maintains its integrity through the use of Proxies, which house Domain Logic, and expose an API for manipulation of Data Objects.
So I am confused, Business Logic represents the use cases, which are the Domain Model. But why Domain Logic is not related to Domain Model?
12  Announcements and General Discussion / General Discussion / Re: Proxy related logic in the command on: January 03, 2012, 09:09:40
Thanks Cliff!
13  Announcements and General Discussion / General Discussion / Re: Mediator having a reference to a view on: January 03, 2012, 09:09:06
Hi Cliff

A) Have A_View's parent in the display list encapsulate interaction with A_View (i.e. expose a method that SystemMediator can call and have that method do the interaction with A_View)
B) Mediate A_View and then A_View's mediator can make calls to A_View's methods and set its properties.

Can you explain what do you mean in B?
What do you mean by "mediate A_View"?
As I see it, A_View's mediator always can make calls to A_View's methods.
I guess I'm saying that I don't see the difference between A and B.

Eli
14  Announcements and General Discussion / General Discussion / Proxy related logic in the command on: January 03, 2012, 03:01:31
Let's say I have a proxy, with some properties in it.
And I have a command that has to access the API of the proxy, depending on some logic related to the properties of the proxy.
Where should I have all the logic, inside the command, or inside the proxy?

For example:
:
if (myProxy.a > myProxy.b)
{
    myProxy.foo()
}
else
{
    myProxy.foo2()
}

or just
:
    //figureFoo compares myProxy.a and myProxy.b and calls the relevant function in myProxy
    myProxy.figureFoo()

The reason I am asking, is that the logic is pretty complicated, and I want the proxy to be clean.



15  Announcements and General Discussion / General Discussion / Re: Mediator having a reference to a view on: January 02, 2012, 09:14:02
Hi V
Your question is not clear enough.
Naturally, in case your mediator has a reference to a view component, it should access the component's API(not the components children).
But I am not sure that this is what you are asking.
Can you elaborate?
Pages: [1] 2