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: Packaging in Dart (or, what's up with all the 'MVC' classnames?)  (Read 20770 times)
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« 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>
« Last Edit: March 09, 2012, 12:25:19 by puremvc » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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.
Logged
Pages: [1]
Print