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

Show Posts

* | |

  Show Posts
Pages: 1 2 3 [4]
46  Announcements and General Discussion / General Discussion / How will PureMVC ported C# effect backend-only developers? on: February 25, 2008, 08:30:02
WebORB from http://www.themidnightcoders.com/ is releasing a new version for .NET this week that includes PureMVC generation for .NET projects. That means some degree of code gen for Server-side to Flex stuff...it'll be interesting to see exactly how that works.

My question here is wondering what PureMVC for C# is going to look for those of use not producing browser pages. Is the definition of 'View' going to be broad enough to include SOAP or WDSL output?

47  Announcements and General Discussion / Getting Started / Where'd my argument go? on: February 24, 2008, 06:26:37
Very likely, this issue isn't caused by the framework itself but it strikes me as quite strange and Flexcoders hasn't pickup on it.

I've refactored the sample Book App that David Deraedt has posted at: http://www.dehats.com/drupal/?q=node/26. My version sits at

The problem is the detail view is never passed a populated current slide - something that should happen at the 'change' event of the datagrid:

               change="selectSlide(event.target.selectedItem as Slide)"
               dataProvider="{slides}" >

Placing a breakpoint on the change property and observing the
event.target.selectedItem value shows the event is carrying the
expected info. But when execution reaches the handler:

       public var selectedSlide:Slide;
       private function selectSlide(pSlide:Slide):void
               selectedSlide = pSlide ;  // pSlide is now null.
               dispatchEvent(new Event(SELECT, true));

the param is null. If I remove the explicit cast to 'Slide' when calling the handler and change the signature to 'Object' ... again null.

Changing event.target.selectedItem as Slide to event.target.selectedItem.myIdentity   & the handler's signature to accept a Number _will pass the expected value.

Why no compile _or runtime error? I find that if I intentionally misspell the dataField property of one of the DG's columns, that column comes up blank but others render as expected and, again, no error reported.

Is it possible the framework is somehow masking something that prevents an error condition from bubbling high enough?

What could cause the value of 'selectedItem' to show as valid at the point that the event Handler is called but 'null' when that function is hit?


48  Announcements and General Discussion / Getting Started / Re: The Role of Enums on: September 09, 2007, 07:32:47
Thx Cliff...makes sense to show other patterns in action. And I can understand seeing enum in a static list application. It looks like in this case at least, the enum is responsible for feeding the proxy...or at least being sure the proxy doesn't get ingestion.

Yes? and which pattern tends a proxy where dynamic (server-side) data feeds the view?

mny thx
49  Announcements and General Discussion / Getting Started / The Role of Enums on: September 09, 2007, 12:30:23
In attempting to adapt the Arch101 sample I come to the usage of enums in the model. I think I understand them to function as an entity used to enforce type checking.


The 2 sample enum structures provided are both used to populate a dropdown in view components. The statement that creates the constants on which the enums are based will hardcode the items into the class.

public static const ADMIN:RoleEnum 
    = new RoleEnum( 'Administrator', 0);
public static const ACCT_PAY:RoleEnum
    = new RoleEnum( 'Accounts Payable', 1);
& so on.

But what if the contents of the list is itself, db-driven and not known at compile time.

Can those static constants be generated at runtime?

50  Announcements and General Discussion / Getting Started / Re: Does Extends == Inheritance && Implements == Composition? on: August 23, 2007, 04:56:46

Thankx Cliff...i'm slowly getting closer to comfortable with composition. I'd posted here cuz I'd giving up on having the same question replied to at the flexcoders list. Then of course, someone _did pick up the thread and took a bit of a different angle than you.

Any thoughts most welcome

Not exactly. The method described in the docs is actually combining
implementing an interface with composition. So you might give your
class a private var called myED that is an instance of EventDispatcher
(thats the composition part). But by implementing the IEventDispatcher
interface, you allow other classes to make calls like this:

myClass.dispatchEvent(...) instead of myClass.myED.dispatchEvent(...)

In the second case you would also have to make myED public of course.
The way they recommend doing it is really a great example of
encapsulation, because it hides the implementation (the fact that a
member var is doing the actual dispatching) and just makes your class
appear to have event dispatching capabilities (which is really all the
other classes should care about). Hopefully that all makes sense.

I can also think of plenty of cases where extending EventDispatcher
would be perfectly adequate and appropriate, so I wouldn't say that
composition is always better than inheritance.
51  Announcements and General Discussion / Getting Started / Does Extends == Inheritance && Implements == Composition? on: August 20, 2007, 05:57:12

In the context of making sure I'm getting my head around the fundamentals correctly....

When I read this statement from LiveDocs EventDistpatcher

In general, the easiest way for a user-defined class to gain event
dispatching capabilities is to extend EventDispatcher. If this is
impossible (that is, if the class is already extending another class),
you can instead implement the IEventDispatcher interface, create an
EventDispatcher member, and write simple hooks to route calls into the
aggregated EventDispatcher.

my understanding of Inheritance and Composition leads me to think this is also a true statement:

In general, the easiest way for a user-defined class to gain event
dispatching capabilities is to use inheritance. If this is impossible
(that is, if the class is already extending another class), or you
employ the logic in Advanced AS3 Design Patterns you can favor
composition over Inheritance and save yourself the opportunity to
extend some other case in the process.

52  Announcements and General Discussion / Getting Started / Re: Implementing a logging system on: July 26, 2007, 07:17:08
The springy thingy looks cool and I don't doubt that is indispensable in larger project tho I might be the first one to admit that something about those things are just too....ummm....organic. I feel like i'm hurting 'em if I pull too far. And I _can't not _try to pull too far.

But as useful as I'm sure they are in some situations I'm wondering if the goal of getting a big picture map of relations and interactions doesn't require more persistence than the springie thingie. Have you seen the movie 'Stranger than fiction' where graphic overlays animate without demanding foreground focus. Shows a way that multiple points of focus can share the stage. Layers of focus.

But first things first....

I toyed around a little bit with implementing XRay and eventually got the object browser working but it was much too much hit or miss. The first place i tried to instantiate an xray connector tossed an error like '1067: Implicit coercion of a value of type '. Other attempts convince me that there are appropriate places to apply logging and not-so.

What I'm after at this stage is some general direction (or production system examples) as to the best way to add support for the Logging API.

53  Announcements and General Discussion / Getting Started / Implementing a logging system on: July 23, 2007, 06:57:51

I've had the chance to play around with Arch101 and danieleUg's ApplicationSkeleton enough to grasp the generalities. To my mind, the route to the next level is adding a layer of 'something' to see how stuff changes.

I think it would be useful to add a logging layer to provide a better visual sense of the circuitry involved. What's the route taken - how is the map drawn.

In the AS<3 days I'd just toss trace statements in at various points and watch the order of execution. That approach seems a) not feasible in as3; b) non-pure. Logging has changed at a fundamental level.

So my question at the point is, in a real world - production app, - given one of our existing demo apps - how would a team implement a logging system that helps bring junior members up to speed? How can logging be implemented in a centralized, generalized fashion?

54  Announcements and General Discussion / Getting Started / Working with CodePeek on: July 15, 2007, 10:23:21
When I load CodePeek into FB2 I get:

2   Could not resolve <mx:WindowedApplication> to a component implementation.   CodePeek.mxml   CodePeek   line 11   July 14, 2007 7:45:07 PM   4

Could be due to my newness to Flex Builder itself. After extracting the folder (to default My Docs\Flex Builder 2) I have to Create New Flex Project named 'Code Peek', right? Any other steps and/or preference settings required?

55  Announcements and General Discussion / Getting Started / Best Practices on: July 09, 2007, 04:10:51
Greets....just got here and have spent the time needed to catch up on the blog & what not. Given your penchant to literary illustration I spent a couple more minutes wondering if there might be some Zen-esque intent that presents 404s for the .swf and .zip and a blank page for the doc.

If so, I'm prepared to despair of all hope of ever getting my head around MVC.
Pages: 1 2 3 [4]