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
PureMVC Architects Lounge
Announcements and General Discussion
General Discussion
ApplicationFacade, why all the constants?
Pages: [
1
]
« previous
next »
Author
Topic: ApplicationFacade, why all the constants? (Read 12398 times)
elux101
Newbie
Posts: 2
ApplicationFacade, why all the constants?
«
on:
March 03, 2008, 03:55:30 »
Hello guys,
I've been looking into using PureMVC for a new project. It's clean and I like the concepts of Commands, Mediators and Proxies. But, what led to the design consideration to add the entire system's states as string constants in the application facade? In a system with many modules that are loosely coupled, for every module its commands and states will have to be listed in the facade. This list will become huge as my application grows. Wouldn't the best approach be to write each module in its own independent package so I could easily move it to other applications? That is one of the benefits of MVC. Even from a development perspective when working on teams, multiple people can be editing the same ApplicationFacade.as file to add a completely unrelated module to the system. I think it would be better to keep those sorts of things with the controller of those modules. Am I missing the point on something here?
Peter
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: ApplicationFacade, why all the constants?
«
Reply #1 on:
March 03, 2008, 07:08:47 »
Hi Peter,
For a small application, the Facade is a central actor that all the mediators, proxies and commands know. A central location that is handy. You can just as easily use an ApplicationConstants.as class or any number of such classes if you wish. The demos are meant to show the easiest path for a simple app.
-=Cliff>
Logged
elux101
Newbie
Posts: 2
Re: ApplicationFacade, why all the constants?
«
Reply #2 on:
March 05, 2008, 10:06:17 »
Thanks Cliff. Thats a relief.
It would be helpful to see an example where this practice is used for larger applications. It would also be nice to see an example that interacts with some backend like Java, Ruby or PHP. I've been reading some things that is used with cairngorm (yuk), but they always have to define the models twice. Once on the server side, and another time on the client-side in flex. I'm having a hard time coming up with the distinction when its necessary to have server-side processing and client side since actionscript can do so much. It cannot be just for data storage.
Another thing is, as the application grows, it would be nice to have various flex application modules in individual swf's that are loaded as necessary. For example the first being just the foundation of users, groups, and security that loads additional resources as necessary.
Peter
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: ApplicationFacade, why all the constants?
«
Reply #3 on:
March 05, 2008, 11:44:11 »
Hi Peter,
Stay tuned. Very soon, you'll see the new site with demos talking to services, utilities for loading resources, all sorts of goodies coming your way.
-=Cliff>
Logged
trilec
Sr. Member
Posts: 52
Re: ApplicationFacade, why all the constants?
«
Reply #4 on:
March 08, 2008, 02:10:02 »
Thanks Cliff,
Im also in the same state as Peter, "looking into using PureMVC for a new project"
which will be AS3 (no flex) , rather large and require the use of swfaddress, pre-loaders and talking to services (ruby in my case).
The TV is on and channel is open...."Staying tuned" :-)
Curt
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...