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 [2] 3
Print
Author Topic: Fabrication - Simplified PureMVC multicore modules  (Read 71902 times)
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #15 on: October 12, 2008, 07:42:46 »

Darshan,

Partway through setting up the projects, I find the routing demo needs to be refactored into the PureMVC namespace first. It would be helpful if you could give it a name, say FabRouting, and refactor the classes into that namespace.

org.puremvc.as3.multicore.demos.fabrouting.common.*
org.puremvc.as3.multicore.demos.fabrouting.shell.*
org.puremvc.as3.multicore.demos.fabrouting.simplemodule.*

Also, the Fabrication Undo demo, if you would like to put it in the repo should get the same treatment (i havent seen the code for it yet).

org.puremvc.as3.multicore.demos.fabundo.*

Thanks,
-=Cliff>
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #16 on: October 13, 2008, 07:52:13 »

Hey Cliff,

Partway through setting up the projects, I find the routing demo needs to be refactored into the PureMVC namespace first. It would be helpful if you could give it a name, say FabRouting, and refactor the classes into that namespace.

Thanks. I can do that, np. And yes the undo demo is also without a base package. I was trying to keep the package depth down in the demos. I will use the org.puremvc.as3.multicore.demos package for future demos.

About the repository, is it going to be a separate repository for the project and each demo? I was thinking of having one repository for everything with the below structure,

fabrication
   framework
      trunk
      branches
      tags
   examples
      fabrouting
         trunk ...
      simpleundo

Framework/trunk is the main line for the utility. Each example is under fabrication itself. I am not sure whether the trac integration would work with such a setup.

peace,
darshan
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #17 on: October 13, 2008, 12:58:09 »

Repositories are one per project. This is the way the site works now, and automated tools that are being built make it important that it stay that way.

Also, we will need unit tests for your classes and asdoc. Compare to the Pipes utility if you're unfamiliar with unit testing or just looking for the level of documentation to provide.

If actual development companies who must deliver sound architecture to their clients are to adopt such a framework as Fabrication, API docs and unit tests are absolutely necessary. Sure, there are no warranties expressed or implied, yada yada, but that doesn't absolve us of the need to provide this. Imagine if Flex had no ASDocs. (I'd like to see the unit tests, myself).

-=Cliff>
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #18 on: October 14, 2008, 08:37:00 »

Repositories are one per project. This is the way the site works now, and automated tools that are being built make it important that it stay that way.
Ok, thats fine by me.

Also, we will need unit tests for your classes and asdoc. Compare to the Pipes utility if you're unfamiliar with unit testing or just looking for the level of documentation to provide.
I have improved the asdoc usage in the code considerably since the initial release. Regarding unit tests, I haven't written any unit tests yet, but I did run the PureMVC unit tests to verify that I didn't break any PureMVC internals. Fabrication was initially for an internal project in my company. I was under some time constraints at that time. I will start writing unit tests for it in a few days.

peace,
darshan
Logged
freakinruben
Newbie
*
Posts: 4



View Profile Email
« Reply #19 on: October 15, 2008, 02:56:28 »

Hi Darshan,

I've just implemented fabrication in my application and it works great (saves me a lot of headaches right now ::)), so thanks for that!
I was wondering why the proxy classes don't have a FabricationProxy so they can routeNotifications too. Is this a design choice you've made or something that isn't implemented yet. If it's a design choice, what solution is there for sending notifications from the proxy to other modules? (with a special command/mediator to handle proxyRoutes, I'm just bringing back the JunctionMediators)

I'm also curious what you think about the idea to store notifications that should be routed but can't be because there isn't a router connected to the module which sends the routeNotification. One module for example is routing some notifications to the log about what is happening in his initialization fase (in which he isn't yet connected...). As soon as the router will get connected, the stored notifications will be send along.

Thanks in advance,
Ruben
« Last Edit: October 15, 2008, 03:29:33 by freakinruben » Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #20 on: October 15, 2008, 06:27:50 »

Hey Ruben,

I've just implemented fabrication in my application and it works great (saves me a lot of headaches right now Roll Eyes), so thanks for that!
Cool, Thanks.

I was wondering why the proxy classes don't have a FabricationProxy so they can routeNotifications too. Is this a design choice you've made or something that isn't implemented yet.
It wasn't a design decision, I just hadn't implemented it at the time of the initial release. I have added a FabricationProxy since, and it does have routeNotification. ;-)

I'm also curious what you think about the idea to store notifications that should be routed but can't be because there isn't a router connected to the module which sends the routeNotification. One module for example is routing some notifications to the log about what is happening in his initialization fase (in which he isn't yet connected...). As soon as the router will get connected, the stored notifications will be send along.
This would be a hard to do this at the initialization phase of the module because the internal pipe fittings need to be created before routing can work. I recently refactored the bootstrapping code. Instead of accepting a router, you set the router on the module loader. The module looks up this router as part of its initialization and connects to it. I was debugging some stuff where i forgot to set router on the module loader. So I basically added a rule that the router must always be set on the module loader.

peace,
darshan
Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #21 on: October 15, 2008, 09:22:42 »

Any chance we can get a peak at the updated source code while we wait for it to be set-up in SVN? This is something I could really use in my AS3 project but waiting till it's in SVN might be too long for my project.

Again, great work and thanks for sharing this.
Logged
realien
Jr. Member
**
Posts: 16


View Profile Email
« Reply #22 on: October 16, 2008, 10:31:22 »

I'm using fabrication in a prototype and had 2 questions

1) I saw there is a repository for the Fabrication utility, but no track page yet that I can see, is there an offical trac page and svn for this now, as I'd like to be using the most up to date code ?

2) When I get a FabricationModuleEvent in my listener as a result of a FabricationModuleEvent.MODULE_INITIALIZED from the FabricationModuleLoader, the module property of the FabricationModuleEvent is null, so I have to get the event.target.loadedModule property, maybe this is correct, can you confirm ?

thanks
Grant.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #23 on: October 16, 2008, 10:44:27 »

Hi realien,

The Fabrication utility is in the process of being moved into the repository, but it's not all the way there yet. I'll post here as soon as its finished

-=Cliff>
Logged
realien
Jr. Member
**
Posts: 16


View Profile Email
« Reply #24 on: October 16, 2008, 11:57:29 »

thanks!
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #25 on: October 17, 2008, 07:41:59 »

Hi All,

I have release Fabrication 0.4 on Google Code[1] for the moment. Cliff, let me know when the repository setup is done and I will look into migrating things over. I think this is a big release for Fabrication and also for PureMVC development in general. Hope you like it.

[1] : http://fabrication.googlecode.com/
[2] : http://www.codedrunks.com/index.php/2008/10/17/fabrication-04-released/

peace,
darshan
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #26 on: October 17, 2008, 07:45:58 »

Jason,

What you are looking for is present in the 0.4 release. And the example you are looking for is here. Hope it was in time for your project.

Grant,

I am sorry, but things have changed with 0.4. You need to listen to FabricatorEvent.FABRICATION_COMPLETE. And you will get a valid reference to the event.target.module in this event handler. Check out the simple_routing example[1].

[1] : http://fabrication.googlecode.com/svn/examples/simple_routing

peace,
darshan
Logged
marks416
Sr. Member
****
Posts: 52


View Profile Email
« Reply #27 on: December 02, 2008, 12:47:38 »

Please add some documentation like pureMVC so other can use it easily.

Thanks

Mark
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #28 on: December 02, 2008, 11:50:22 »

Hi Mark,

I am working on improving the documentation. I have added several pages to the wiki to get things rolling on this front. You can check out the below links.

peace,
darshan

[1] : Features
[2] : Getting Started
[3] : Using modules with Fabrication
[4] : Using reflexive notification interests
[5] : Using reflexive mediator registration
[6] : Building Fabrication
« Last Edit: December 03, 2008, 12:06:19 by Darshan Sawardekar » Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #29 on: January 02, 2009, 03:55:41 »


I am working on improving the documentation. I have added several pages to the wiki to get things rolling on this front. You can check out the below links.

peace,
darshan

[2] : Getting Started


Hi Darshan,

Hope I'm posting this in the right place!

Am trying to make my first steps with both PureMVC and Fabrication with AIR 1.5, but after [attempting to] following the steps in your Getting Started above, I'm getting the following error in Flex (3):

:
override public function execute(note:INotification):void {
        registerMediator(new HelloFabricationMediator(note.getBody()));
       
        sendNotification("now", new Date());
}

1180: Call to a possibly undefined method HelloFabricationMediator.   HelloFabrication/src/controller   

I've added the following libs to the project:
  • PureMVC MutiCore 1.0.5
  • MultiCore Pipes 1.1
  • Fabrication Air 0.5.3

I've copied/pasted the code from your Getting Started example for AIR

It almost looks like view/HelloFabricationMediator needs to be imported in the HelloFabricationStartupCommand, but if I add an import view.HelloFabricationMediator; (and the same to HelloFabricationMediator for the following error for respondToNow(note:INotification) ), I get a whole page of run-time errors when I try and run the app, starting with the line:

Error: Unable to perform reflection for classpath view.HelloFabricationMediator. Check if getClassByName is defined on the main fabrication class (and then a bunch more).

Wondering if you might have any ideas as to where I'm going wrong?


Cheers,
-Chris



Logged
Pages: 1 [2] 3
Print