PureMVC Architects Lounge

PureMVC Manifold => MultiCore Version => Topic started by: puremvc on March 09, 2012, 12:23:41



Title: Packaging in Dart (or, what's up with all the 'MVC' classnames?)
Post by: puremvc on March 09, 2012, 12:23:41
You may wonder why I chose to name all the PureMVC classes (but not the interfaces) with an MVC prepended (e.g., MVCMediator, MVCNotification).

PureMVC contains a couple of classes whose names conflict with classes in the dart:html library. As a result, if you import both libraries, you can't compile.

To resolve the conflict, you must either ...
1) Avoid use of both libs in the same program. (err, no.)
2) Make developers prefix one of the libs on import and add to all class and interface uses in code. (ugh. mvc.Notification or html.document everywhere, even for non-conflicting classnames.)
3) Name your class something different. (grrr. MVCNotification instead of Notification.)

As much as I hate the wild west, claim-staking feel of number 3, I accepted the compromise. They owned Proxy and Notification because they got there first. But none of the interfaces (e.g., IMediator, INotification) were in conflict, so I left them as is.

I hope this will change in the future, here is a post on Google+ about the problem and why we need proper packaging in Dart. https://plus.google.com/u/0/108661011132885730615/posts/GXn9GVExhpN

-=Cliff>


Title: Re: Packaging in Dart (or, what's up with all the 'MVC' classnames?)
Post by: puremvc on January 09, 2013, 11:15:49
Well, since this topic was posted, I've switched the framework back over to using the standard class and interface names. The only gotcha is you have to prefix, e.g., mvc.Mediator instead of MVCMediator.