Singletons and events work fine, but I usually prefer using a microarchitecture... Let's say... I like the order feeling of using a top level framework.
At this time I am finishing a simplified architecture (I call it Uriana) based upon a resources and controller pattern which I think fits properly with Mobile projects, though I've been testing it with desktop and web projects too and It's working fine. The idea is to separate software in two layers. Control, which manages information transfering through the entire application and also handles the business logic, and Resources Layer, which handles through Mediators all data, services, views and components logic. I started it because I didn't like too much the mediators/proxies approach of pureMVC (I found many situations where I had doubts of where should I place some logic) and because I found that framework not to be so developer friendly. In some way it's close to PureMVC, but I find it quite more simple and at least as powerful as the referenced one. Using the Uriana Framework a project consists of 1 main controller which is connected through framework events to a set of procedures and resource Mediators and handles all communication issues. The controller may also have a set of subcontrollers associated, each one with it's own set of procedures and Mediators, which allows the developer to choose the proper organization for their projects. Controllers talk each other through a jerarquical process to transfer framework events to all those procedures or Mediators which have declared to be interested in catching them. (Framework Events extend the Event class). So a procedure or a Mediator is expected to declare to it's controller whith events it will raise and which events it is expecting to catch, so communications are properly handled. The framework structure is: - Core library: Controller, Procedures, FrameworkEvents and Mediator definitions. - Core Extensions: Set of resource handlers (localization, filesystem, logging, validators and so) and their Mediators. (They're for FLEX/AIR projects and usable at mobile projects). - services: It abstracts the access to http services and offers Mediators and handlers to connect to an scalable Service Servlet that I've also created and I find quite simpler than other alternatives). At this time, I'm also considering adding Granite DS and Blaze support). - templates: Specifies a default structure for projects (desktop, mobile and web). - application: Basic controllers, procedures and mediators to handle Web and desktop rutinary tasks. - mobile: Basic controllers, procedures and mediators to handle mobile projects. Core is the only library required to use the framework, though services, application and mobile require the Core Extensions too. I've structured it that way because it gives flexibility to the development team to choose the libraries they want to use from the ones I'm providing and allows to structure the software in layers which could be targetted using any other library the team could like more than the ones I've created. The truth is I was so happy doing that project, but current news about FLEX, AS future have worried me so much and I keep thinking that maybe all that work could not be of help or of interest to the community. Perhaps it has been a complete waste of my time :( I am still testing the framework at enterprise complex mobile, web and desktop projects and it lacks from documentation, so I think I will wait to have a first closed package (libraries and documentation) to release a first version... Of course if any of you finds the project interesting or are curious about it, feel free to contact me :) Kind Regards. Carlos. 2013/3/7 Sebastian Mohr <flex.masul...@gmail.com> > 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/ > [4] http://www.springactionscript.org/ > [5] http://www.swizframework.org/ > [6] http://www.as3commons.org/as3-commons-eventbus/introduction.html > [7] http://code.google.com/p/masuland/wiki/LoginExample > [8] https://code.google.com/p/masuland/wiki/NanoarchitectureCmd > [9] https://code.google.com/p/masuland/wiki/NanoarchitectureCtl > > > -- > Sebastian (PPMC) > Interaction Designer >