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: Issues with Fabrication, please help  (Read 7990 times)
Steffen Egelund Jensen
Newbie
*
Posts: 7


View Profile Email
« on: March 18, 2009, 03:27:05 »

Hi Darshan

I have had the pleasure of introducing my fabricator gem to two teams at where I work and thus also introducing the Fabrication framework. The primary goal of this is to get feedback to be able to improve the fabricator gem but also improve team development speed.

It seems that we have run into some issues / bugs with the framework and hope that You can help:

1. Release 0.6 of fabrication do not include AirApplication, as workaround we got the source code from subversion and this helped us create an Fabrication AirApplication.

2. ReactTo do not seam to work when you have a non referred component which uses ReactTo. Example we have a module1 that requests an ui component from module2. Module1 has no explicit reference to the ui component from module2, it just add it using Addchild. When module1 requests the component from module2, module2 creates the component and it's mediator, and sends the component to module1. Only addEventListener seems to work in the component for this scenario, reactTo methods leads to Nullpointer exception.

3. onRegister never executes when using Reflexive mediators with mx states. We have downloaded your demo Using Reflexive mediators with Application states and extracted the states-code to a component referenced in the application mxml file. Thus we use <mx:states instead of <fab:states in the component but this results in broken functionality(states), since the code never calls the onRegister method on the mediator of the deferred sub-component. We use this code to register the mediator (new ConfirmMediator(resolve(testView)..confirm).

Last I would love to know what the intentions are with Fabrication. Is it going to be further improved/developed on or is left for others to pick up? The reason I ask is, that we would really like to use Fabrication in production.

Thanx in advance
Steffen
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #1 on: March 22, 2009, 11:41:56 »

Hi Steffen,

Sorry for the late reply. I thought I was subscribed to this forum, but wasn't and missed your posts.

1. Release 0.6 of fabrication do not include AirApplication, as workaround we got the source code from subversion and this helped us create an Fabrication AirApplication. If you are using air use the 0.6 air swc.

This is because I bundled the air swc and the flex swc separately. If you bundle the air classes which extend WindowedApplication in the swc, and use them in a flex only project then the compiler complains about not being able to find the WindowedApplication and other air classes.

2. ReactTo do not seam to work when you have a non referred component which uses ReactTo...

I am not sure I am completely clear about this. I use reflection to get a list of reaction handlers. Perhaps cross module references are not working with this. Can you post some sample code?

3. onRegister never executes when using Reflexive mediators with mx states. We have downloaded your demo Using Reflexive mediators with Application states and extracted the states-code to a component referenced in the application mxml file.

States should also work with Reflexive mediators. Can you post the mxml you used.

Last I would love to know what the intentions are with Fabrication. Is it going to be further improved/developed on or is left for others to pick up? The reason I ask is, that we would really like to use Fabrication in production.

To be honest Fabrication has not really received a lot of feedback or users. I am using it in nearly all my flash/flex work so I intend to keep it alive as much as I can. If you feel you or anyone else would like to contribute, I would be happy to add you guys to the project.

One of things I do not know though is whether Fabrication is being used in any production systems. Having said that it is really a layer on PureMVC so it should work fine.

From a technical point of view, there is one of feature that I see being added in the future. As soon as I can find time to implement it.

Shorten the reactTo and respondTo syntax using namespaces.
:
// instead of this
public function respondToValueChanged(note:INotification):void {

}

// use namespaces like this
notification function valueChanged(note:INotification):void {

}

// and similar reaction methods
reaction function myButtonClick(event:MouseEvent):void {

}

Apart from that nothing much is on the horizon apart from bug fixes.

peace,
darshan
Logged
Ondina
Sr. Member
****
Posts: 86


View Profile Email
« Reply #2 on: March 23, 2009, 01:51:11 »

Hey Darshan

To be honest Fabrication has not really received a lot of feedback or users.

Don't get discouraged because of it. You are doing a great job.

I started with puremvc about a month ago. I can tell you how it was for me.

In the beginning it feels like you come into a garden full of exotic plants and fruits after  living in a desert  for a long period of time. Lots of appealing colors and scents, meaning lots of examples, lots of utilities, lots of posts (info that you don't understand yet) on the forum.

As I got it from reading different post, I'm not the only one who had a hard time dealing with this diversity and deciding where to start, what to use first ..etc

I went through all the utilities offered in here.
I also tried your examples and found Fabrication being a great utility!!
It was very tempting to start with it right away, also because who wouldn't want to write less code?

But one of the reasons I continued with the original version of  puremvc was  something I would describe it like this:
You first need to know how to build full sentences before using acronyms or at least know what word  each letter represents.
You know, like in:

CRUD Create Read Update Delete
CYBER Can you be real?
CLICK  Creating Literacy In Computer Knowledge
CLIFF Clean Lifestyle Is Freedom Forever

The other reason was that I wasn't sure that I could combine Fabrication with the original puremvc style used in the most available examples or that I could “translate” the examples into Fabrication slang.

And one more reason for spare feedback  from users might be that there are probably 2 extremes:
One is  represented by the newbies (like me ) who have LOTS of questions, maybe more than the advanced members are willing to answer and so instead of embarrassing themselves by asking “silly” questions they don't ask anything.
The other extreme are the pros, either with an already solid puremvc-knowledge or with a solid background in MVC patterns of other kind. They don't ask much because they KNOW. Maybe they know also the answer  to Life, the Universe, and Everything.

Anyway ... I “fabricated” a method for you:

public function respondToUserFeedBackOnTheForum(note:INotification):void {
   if(note.getBody()==null || note.getBody()!=null){
   darshansMood = good;
   sendNotifiaction(FabricationProject.KEEP_ALIVE);
   }
}
Don't you like my IF statement? :)

Cheers, Ondina
Logged

~ Ondina ~
Steffen Egelund Jensen
Newbie
*
Posts: 7


View Profile Email
« Reply #3 on: March 23, 2009, 03:33:24 »

Hi,

Thank you for your answer,

As a comment I have posted some updates to the fabricator gem post and would love to read your thoughts about the template app, view handling etc.

As a side note, I have added the startup manager utility to fabricator and are in the process of finishing the next "beta" version.

2. ReactTo do not seam to work when you have a non referred component which uses ReactTo...

I am not sure I am completely clear about this. I use reflection to get a list of reaction handlers. Perhaps cross module references are not working with this. Can you post some sample code?
We will try to make a clean code example and post here. Though I do not think it has anything with cross module to do.

3. onRegister never executes when using Reflexive mediators with mx states...

States should also work with Reflexive mediators. Can you post the mxml you used.
We investigated this further and found a bug report at your google project which really looks like our problem: http://code.google.com/p/fabrication/issues/detail?id=4 is this fixed or

Apart from that nothing much is on the horizon apart from bug fixes.

peace,
darshan

Sounds good that there will be bug fixes and that it is still used. I was also very confused about the lack of user support for a framework like Fabrication, but perhaps I appreciate it more because I had to manually write all the wire code in my previous Multicore project. 

Kind regards
Steffen
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #4 on: March 23, 2009, 08:30:28 »

@Ondina, @Steffen. Thanks for your kind words. Yeah, I understand the layering creates a barrier to entry to a lot of people. Hopefully projects like Steffen's gem, we help lower this barrier.

@Steffen. I haven't tried the updated gem yet, will try it out tomorrow.

We investigated this further and found a bug report at your google project which really looks like our problem: http://code.google.com/p/fabrication/issues/detail?id=4 is this fixed or

I haven't been able to figure out a solution to that bug so far, without a monkey path to the flex framework. The problem relates to a MXML Container component nesting. The Container class of the flex framework traps the childAdd event with a capture phase listener and does not bubble it up. To do reflexive mediator registration I am listening for a top level childAdd event that matches the created component to the expected component via the ./../.re syntax. With that event bubbling up Fabrication can't detect when the component becomes available. I am open to any suggestions/workarounds at this point...

peace,
darshan
Logged
Pages: [1]
Print