Hi Fred, I am not using modules in my app because the whole app functionality is required at startup (may I should :-) )
I am using hierarchical contexts for a very specific use that I will try to explain shortly: My app is using a small set of components (let's say 20) that are instantiated several times each. Each component consists of several collaborating classes (several UI, PM and DM ), coupled through dependency injection and messaging. If I use one single context for everything, dependency injection won't work, because it's class-based and there are several instances of each. So each component has its own "child" context, with "local" DI and messaging, and will communicate with the global parent context for global DI and messages. Maurice -----Message d'origine----- De : Frédéric THOMAS [mailto:webdoubl...@hotmail.com] Envoyé : jeudi 7 mars 2013 17:44 À : dev@flex.apache.org Objet : Re: An Eventbus for Apache Flex applications Hi Maurice, Good to know, yes I was a bit scared about the reflexion-based injection, when you talk about Multiple hierarchical IOC contexts, do you mean, using modules ? -Fred -----Message d'origine----- From: Maurice Amsellem Sent: Thursday, March 07, 2013 5:25 PM To: dev@flex.apache.org Subject: RE: An Eventbus for Apache Flex applications Hi, I have developed a rather heavy mobile app using Parsley, which is running with very good performance. I am using all the features of Parsley ( Injection, Message/Event bus, Commands, Multiple hierarchical IOC contexts) and the impact on performance is very low overall. The only real issue related to IOC (which is true for all IOC frameworks, not only Parsley) is to not use reflexion-based injection on UI components, because of their hundreds of properties. Parsley's fast injection <FastInject> is great for that. I don't know the equivalent on other frameworks. Hope this helps. Maurice -----Message d'origine----- De : Frédéric THOMAS [mailto:webdoubl...@hotmail.com] Envoyé : jeudi 7 mars 2013 16:28 À : dev@flex.apache.org Objet : Re: An Eventbus for Apache Flex applications 100% true but I guess if you want a light weight app to run on mobile, you will vant to avoid the weight of an IoC. -Fred -----Message d'origine----- From: Christophe Herreman Sent: Thursday, March 07, 2013 3:55 PM To: dev@flex.apache.org Subject: Re: An Eventbus for Apache Flex applications This really depends on the type of application you are building and the size and experience of the team. If you are working on a small project with a very small team, then a singleton/static implementation will work just fine. The problem comes when you work on larger apps that perhaps contain modules and have a larger team of developers. In that case you need to have some rules amongst the team to decide when and how the eventbus can be used. If not, you'll quickly end up with an eventbus that is abused and handles way too much communication. This makes it hard to debug, maintain and test the code. In this scenario I would advise a strategy in which the eventbus is injected and managed in a central location (an IoC container). - Christophe 2013/3/7 Frédéric THOMAS <webdoubl...@hotmail.com> > Hi John, > > I said "inspired" by those frameworks, which, for puremvc multicore at > least doesn't use the singleton pattern but the multiton's one, I > guess is better than completly reinvent the wheel and it might be > light enought extracting what it needs only but maybe some else has a > better solution. > > -Fred > > -----Message d'origine----- From: John Cunliffe > Sent: Thursday, March 07, 2013 3:11 PM > To: dev@flex.apache.org > Subject: Re: An Eventbus for Apache Flex applications > > > I think Sebastian knows these frameworks like most flex developers. > The questions really is how to not tightly couple our components > WITHOUT an extra framework. And so far I've only seen the Singleton > pattern solution - which imho is an anti-pattern really as soon as > testability is required... > but maybe I just like IOC too much. ;-) > > Regards > John > On 7 Mar 2013 15:04, "Frédéric THOMAS" <webdoubl...@hotmail.com> wrote: > > Hi Sebastian >> >> I never been motivated anymore to build my own multicore MVC >> framework as soon as I've seen the one of puremvc back in 2009 IIRC >> (with the use of multiton combined with async command or piped >> events), then, I used the Parsley approach which I prefered from far >> as it integrated the IOC pattern and much more, anyway, you might be >> inspired by the puremvc one [1] or even though I never tried it, the >> robotlegs-signals' one [2]. >> >> -Fred >> >> [1] https://github.com/PureMVC/****puremvc-as3-multicore-**** >> framework/wiki<https://github.com/PureMVC/**puremvc-as3-multicore-**f >> ramework/wiki> >> <https://github.**com/PureMVC/puremvc-as3-**multicore-framework/wiki< >> https://github.com/PureMVC/puremvc-as3-multicore-framework/wiki> >> > >> [2] >> http://newtriks.com/2011/08/****12/example-as3-modular-**<http://newt >> riks.com/2011/08/**12/example-as3-modular-**> >> application-using-robotlegs-****signals/<http://newtriks.com/** >> 2011/08/12/example-as3-**modular-application-using-**robotlegs-signal >> s/<http://newtriks.com/2011/08/12/example-as3-modular-application-usi >> ng-robotlegs-signals/> >> > >> >> -----Message d'origine----- From: Sebastian Mohr >> Sent: Thursday, March 07, 2013 10:52 AM >> To: dev@flex.apache.org >> Subject: An Eventbus for Apache Flex applications >> >> Hi, >> >> I am just building a mobile Flex application for a client of mine. I >> wonder if I could build this Flex application with a custom Eventbus, >> but, without the usage of a Microarchitecture (like Mate [1], >> Robotlegs [2], Parsley [3], SpringAS [4] [5] and Swiz [6]). >> >> As you probably already know, I usually build my Flex applications >> with a MVC structure and a Microarchitecture in the back. The result >> of the application MVC structure can be openly reviewed and discussed >> in my LoginExample [7]. >> >> Since there are folks on this mailing list claiming that Flex >> applications with a MVC structure can also be build without the usage >> of a Microarchitecture, I wonder how these folks deal with the >> Command [8] and Controller [9] pattern in their Flex applications? I >> would also be curious how they create a custom Eventbus, so that >> thrown events could still be caught inside of Flex Modules especially >> in Mobile projects? >> >> Is there anyone on this mailing list who can give me an advice how to >> build a custom Eventbus so that I still can use the Command [8] and >> Controller [9] pattern? >> >> Thank you! >> >> >> [1] http://mate.asfusion.com/ >> [2] http://www.robotlegs.org/ >> [3] >> http://www.spicefactory.org/****parsley/<http://www.spicefactory.org/ >> **parsley/> >> <http://www.**spicefactory.org/parsley/<http://www.spicefactory.org/p >> arsley/> >> > >> [4] http://www.springactionscript.****org/<http://www.** >> springactionscript.org/ <http://www.springactionscript.org/>> >> [5] http://www.swizframework.org/ >> [6] http://www.as3commons.org/as3-****commons-eventbus/** >> introduction.**html<http://www.as3commons.org/as3-**commons-eventbus/ >> introduction.**html> >> <http://**www.as3commons.org/as3-**commons-eventbus/introduction.**ht >> ml<http://www.as3commons.org/as3-commons-eventbus/introduction.html> >> > >> [7] >> http://code.google.com/p/****masuland/wiki/LoginExample<http://code.g >> oogle.com/p/**masuland/wiki/LoginExample> >> <htt**p://code.google.com/p/**masuland/wiki/LoginExample<http://code. >> google.com/p/masuland/wiki/LoginExample> >> > >> [8] >> https://code.google.com/p/****masuland/wiki/****NanoarchitectureCmd<h >> ttps://code.google.com/p/**masuland/wiki/**NanoarchitectureCmd> >> <https://**code.google.com/p/masuland/**wiki/NanoarchitectureCmd<http >> s://code.google.com/p/masuland/wiki/NanoarchitectureCmd> >> > >> [9] >> https://code.google.com/p/****masuland/wiki/****NanoarchitectureCtl<h >> ttps://code.google.com/p/**masuland/wiki/**NanoarchitectureCtl> >> <https://**code.google.com/p/masuland/**wiki/NanoarchitectureCtl<http >> s://code.google.com/p/masuland/wiki/NanoarchitectureCtl> >> > >> >> >> -- >> Sebastian (PPMC) >> Interaction Designer >> >> > -- Christophe Herreman http://www.herrodius.com http://www.springactionscript.org http://www.as3commons.org