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

Pages: [1]
Print
Author Topic: Objects Specific to View Components API  (Read 3140 times)
mdw1980
Newbie
*
Posts: 5


View Profile Email
« on: November 24, 2008, 05:47:13 »

So I'm starting to build a little framework built on top of PureMVC multicore and I'm creating a set of base components for it. In particular, I'm creating a component that will serve as a base class for a "module". Not unlike Modules in Flex, these modules will serve as a base to create a "cored" component that can run standalone or when loaded into another Module (SWF).

I'd like my Module component to define a list of required items to be loaded before it can be initialized. Think of it as the Module defining the "holes" that need to be filled, but not defining exactly what asset to load into that hole. The ModuleMediator would then retrieve the list of "holes", and fill them by loading the assets it wishes. The list of "holes" would be, lets say, an Array of objects that extend a base class. Lets call it Asset.

My confusion lies in where to place the objects that define the holes. In other words, where would (non display) objects that are specific to a view component's API be placed in the package structure of an application? My initial thinking is that the view component framework should perhaps be separated from this base MVC framework. Then I thought for a second that maybe the objects specific to the view component should just be placed in a sub package of the blah.blah.view.component package.

Perhaps I'm even going about this all wrong. I'm not sure. So I look to the community! Thanks in advance.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: November 24, 2008, 09:33:47 »

If these components need to be loaded and shared between modules, you might put them in a separate library, used by the modules.

-=Cliff>
Logged
Pages: [1]
Print