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
|
Pages: 1 [2] 3 4
|
16
|
Announcements and General Discussion / Public Demos, Tools and Applications / Re: User Manager Demo (Puremvc + weborb + php + mysql)
|
on: August 25, 2008, 01:31:33
|
Thanks creynders. Thanks for the excellent demo. There's just one thing though, I think it would be better to handle the loginpanel through a separate mediator instead of the ApplicationMediator...
Great job!!
Well you are right, the LoginPanelMediator should handle the LoginPanel and LoginProxy notifications, but how the LoginPanelMediator will change the View to UserManagerPanel? That was the reason i prefered handle all View Changes in ApplicationMediator, but you are absoluty right on this thought because the LOGIN_FAILED should be handled in LoginPanelMediator because it's part of LoginPanel and it won't change the Main App view. But the LOGIN_SUCCESS shouldn't be handled in LoginPanelMediator, because if i handle it on LoginPanelMediator the unique thing i will do is send another notification to the ApplicationMediator hear and change view and i think it's not a good practice because you are duplicating code. When i have a little more time i will make this changes to the Demo Thanks for your thought Daniel Gomes
|
|
|
17
|
Announcements and General Discussion / General Discussion / Re: Proxy to view problem
|
on: August 25, 2008, 12:35:26
|
Yes, only in mediators you can handle the notification, look at this example:
SubComponentMediator.as
protected function get subComponent():SubComponent { return viewComponent as SubComponent; } override public function listNotificationInterests():Array { return [ApplicationFacade.RESULT_FROM_PROXY_SUCCESS] } override public function handleNotification( note:INotification ):void { switch ( note.getName() ) { case ApplicationFacade.RESULT_FROM_PROXY_SUCCESS: //let's call the subcomponent function subComponent.myFunction(); break; } } and in your proxy just need this:
ExampleProxy.as
private function getResult(event: ResultEvent):void { CursorManager.removeBusyCursor(); // notify all interested members sendNotification(ApplicationFacade.RESULT_FROM_PROXY_SUCCESS); }
You can call function of your components inside of his mediator, the component was his mediator to handle the notification from proxy to tell him what to do.
Hope it helps,
Daniel Gomes
|
|
|
24
|
Announcements and General Discussion / Architecture / Re: How to share Proxy in a multicore context?
|
on: August 21, 2008, 08:14:53
|
Hi amahi,
I'm learning Multicore Pipes, and for what i am reading and what i understand about it, i think that you can pass the proxy data as a message through a pipe for the other modules to catch up the message from the pipe. I think to do it you need to use a filter on the modules that will receive that message from the pipe.
Daniel Gomes
|
|
|
26
|
Announcements and General Discussion / Architecture / [Multicore] Pipes - Architecture Best Practices with Flex Library
|
on: August 20, 2008, 02:56:09
|
Hi guys, Today i started my new "adventure" with PureMVC Multicore + Pipes, i just start reading some articles about pipes and see how the Pipes Demo works and try to understand it. My first goal with Multicore and Pipes is recode my User Manager Demo that was made in PureMVC Standard, because for me that is the best way to learn and understand it. My main goal is learn how i can work with PureMVC with an External Library with Independent Modules that the Application don't need to know and vice-versa. So when i started, i got some questions about architecture. The application will the equal to this "User Manager Demo", the difference it will have Multicore Pipes and will have an External Flex Library that will contain the Login and User Manager Modules. So my questions are, what is the best practice to make this modules totally indepedents of the Application? And what is the best file structure and architecture for it? My first thought about file structure was something like this: -APP -Common Files -Controller -Model > VO -View > Components -Flex Library -Modules -Login -Controller -Model > VO -View > Components -UserManager -Controller -Model > VO -View > Components But maybe i will have some common files to be shared with Application and Modules, and other question came. Where is the best place to put common files that sometimes are specific for an application and how to share them with Modules and Application? Suggests and ideas are welcome. Thanks, Daniel Gomes
|
|
|
27
|
Announcements and General Discussion / Public Demos, Tools and Applications / User Manager Demo (Puremvc + weborb + php + mysql)
|
on: August 20, 2008, 12:52:22
|
Hi guys, Today i finished my first Demo App with Puremvc, it's based on "Login Demo" created by Jens Krause and on "Employee Admin" created by Cliff Hall. Why i did it? I'm a new to PureMVC, just started with it 5 days ago. I have a small knowledge about OOP and Design Patterns and i tried make a simple App to understand all this concepts with PureMVC using Remote Services (server-side) and CRUD Operations. What did i do? I joined this two applications into a single one, with this features: * Login/Logout * List, add, update and delete users (except the admin user) * Refresh users list button * Main.mxml with Deferred instantiation * All data comes from database using remote services (weborb|php) * Server-Side CRUD operations * Tried to make code reuse to my next step is turn this Demo into an Pipe Multicore Demo with modules in a Flex Library Project Technologies used: * Flex 3 * Puremvc Standart 2.0.4 * Weborb (php) 3 * PHP * MySQL Feel free to comment or suggest anything on this Demo You can see live Demo here. Hope it helps, Daniel Gomes
|
|
|
28
|
Announcements and General Discussion / General Discussion / Re: Declaration of Notification Names ?
|
on: August 19, 2008, 10:43:03
|
Hi rbhdra, Well, i'm not the best person to advice you but i can tell you for me what makes sense. First, if you are using AS3 port it will depends if is multicore or Standard. When i developed my first app i always try to make my code more reusable possible and separate it into modules. In my first application what I did was as follows: Where had to declare a notification it was always in place that made the code more reusable, that is, imagine you have a "module" Login where you need to declare the following Notifications: "TRY_LOGIN", "LOGIN_SUCCESS" and "LOGIN_FAILED" from my point of view i declare them in LoginProxy because it is something about the Login. In case such an application to have a ViewStack which has two components such as Login and then UserManager, here i declared the notifications in ApplicationFacade because both modules did not "know" each other, but the application has to be aware of them. I'm studying MultiCore but for me when i start with multicore make sense declare some Notification in ApplicationFacade and other in Proxy of each Module (for me i think it always depend on the kind of the notification to declare). I do not know if you understand my "philosophy" that thought and that seemed the right one, probably can not even be the better way. I hope I have helped, and don't forget that is just my point of view Daniel Gomes
|
|
|
30
|
Announcements and General Discussion / Getting Started / Re: ViewStack: Change view but dont load view components
|
on: August 18, 2008, 01:45:44
|
Hi Cliff, After your post i changed my code and follow exactly the FAQ structure and the timming problem continues, i attach the source code. This is still not as good as following a protocol so, I'm refactoring the code in the FAQ and creating a demo today that eliminates the guesswork. More soon. Ok, i will wait for some news and thanks for your help, but was been a really nightmare trying make it work Daniel Gomes
|
|
|
|
|
|