Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
May 29, 2017, 12:03:59 PM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.
Pages: [1]
Print
Author Topic: Packaging in Dart (or, what's up with all the 'MVC' classnames?)  (Read 12087 times)
puremvc
Global Moderator
Hero Member
*****
Posts: 2867



View Profile WWW
« on: March 09, 2012, 12:23:41 PM »

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 PM by puremvc » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2867



View Profile WWW
« Reply #1 on: January 09, 2013, 11:15:49 AM »

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
Jump to: