Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
October 23, 2017, 06:07:57 AM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
Pages: [1]
Print
Author Topic: Unified Assets loader  (Read 17772 times)
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« on: July 27, 2008, 09:28:45 AM »

Hi, I've been working on an assets loader, with the aim of it being a simple, stripped down framework that can easily be extended, and to be primarily used within the pureMVC framework (though it dosn't have to be)

Why do we need another "bulk loader"? Well, I think that the ones out there at the moment rely too heavily on Static data registries (no need in pureMVC, right), and have too much internal logic to "decide" what type of loader to use, and then to parse it. 

What I wanted was a loader that allowed me to treat all the many ways of loading data in the same way, yet to do so in the same way that the native classes would.

I mean that if I load an xml file, I want it to be loaded as a string, and allow me to parse it into an XML myself.

please take a look, its in an early stage at the mo, I'm happy with the architecture, but it needs proper testing. You can have a look here http://revisual.co.uk/?p=80.

In the spirit of the open source community I would like to offer this up to you guys as a pureMVC utility (if you like it), that I would be happy to develop and maintain. :~)

cheers

fleecie
« Last Edit: July 27, 2008, 09:46:31 AM by fleecie » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW
« Reply #1 on: July 27, 2008, 10:04:20 AM »

Hi Fleecie,

Checked out your demo post. This utility looks pretty cool, and would certainly be a welcome addition to the PureMVC Project. Send me an email via the contact page, and we'll work together to get a project setup in the Manifold!

-=Cliff>
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #2 on: September 08, 2008, 07:07:08 AM »

well, I think its pretty much ready to go now for beta release
http://revisual.co.uk/?cat=58
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW
« Reply #3 on: September 08, 2008, 12:12:31 PM »

I had a brief look at the code with respect to repository readyness and had a few first thoughts:

  * The package space shouldn't have camelcase in it. i.e. org.puremvc.as3.utility.assetLoader.* should be org.puremvc.as3.utility.assetloader.*.

  * In addition to camelcase, the commandMap classes fall as a sibling to the utility's package rather than within it. org.puremvc.as3.utility.commandMap.* should be org.puremvc.as3.utility.assetloader.commandmap.*. (Though I'm not clear on why they're separated to begin with, as I haven't dug that far in).

  * I'd suggest doing an 'organize imports'. (ctrl-shift-O) on each class to remove unneeded imports. For instance in:

ChainNoteNames
Code:
package org.puremvc.as3.utilities.commandMap.etypes
{
        import org.puremvc.as3.utilities.commandMap.patterns.observer.ChainNotification;
       
        public class ChainNoteNames
        {
                public static const POPUP_ALERT:String = "popupChainAlert";
                public static const INVOKE_COMMAND_CHAIN:String= "invokeCommandChain";
               

        }
}

  * Consistency of naming on the use of "que"/"queue". Most everywhere, in command names and methods, queue is being used, but in a few places, like LoaderProxy, it is used both ways: "queSortFunction" and "queueLength".


I like the deconstructors. Smiley
-=Cliff>
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #4 on: September 08, 2008, 01:04:57 PM »

thanks, I really need some feedback from someone out side of my head space :~}
the command map is actually not part of the asset loader, but another util i'm working on. 
It allows chains of commands to be defined externally (in xml). I'm prototyping it at the mo, but its working far better than I thought it would. You are quite welcome to dig around if you like, but It probably wont make much sense without a test case.  I thought I'd take things a step at a time and get the assetloader done first.
cheers
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #5 on: September 18, 2008, 04:23:32 AM »

hi chris....

made all your changes, and am working on a tutorial at the mo....

was wondering, I read a post here where you mentioned two ways of dealing with external assets...

data assets as proxies and display objects as mediators.

now, I've just lumped all types of assets as data, and wrapped the loader in a proxy, but, should there be a mediator implimentation of this for those purists who wish to keep their data and display assets separate... or is that over kill?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW
« Reply #6 on: September 18, 2008, 08:00:26 AM »

Personally I like for asset loading to happen in the view. IMHO, it makes the best separation of View and Model tiers.

However I empathize with the 'put all the loading of stuff in one place' line of thought as well.

It is therfore a decision I'd choose to leave up to the implementer.

If you make the choice for them by providing only one way to do it, then only the people who like the way you've chosen will use it happily. The rest will grumble or not use it at all.   

-=Cliff>
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #7 on: September 18, 2008, 08:05:01 AM »

lol
very well put
thanks FYHO Smiley
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #8 on: September 19, 2008, 05:01:16 AM »

OK,
I have now created a proxy wrapper (DataLoaderProxy) and a mediator wrapper (AssetLoaderMediator) for the UnifiedLoader Class (changed the name to avoid conflicts with the flash.display.Loader Class);

so you have a choice to use a proxy, a mediator, or mash em up:~)
Logged
Neil Manuell
Courseware Beta
Sr. Member
***
Posts: 109


View Profile Email
« Reply #9 on: October 03, 2008, 03:35:15 AM »

and the first of my tutorials are here

http://revisual.co.uk/?page_id=189
Logged
Helmut Granda
Full Member
***
Posts: 47

Flash Developer.


View Profile WWW
« Reply #10 on: March 30, 2009, 03:42:42 PM »

Has this project been abandoned?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW
« Reply #11 on: March 30, 2009, 04:23:12 PM »

It's on the list to evaluate for inclusion in the repo, but there are several asset loading solutions vying for favor in addition to the one that is built into StartupManager. So rather than jamming every one into the PureMVC.org repo, and thus confuse everyone about which to use, it is still gestating. Check out the project, see what you think and report back. What do you like or dislike about it. This will help immensely.

-=Cliff>
Logged
Pages: [1]
Print
Jump to: