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]
Author Topic: Where would you place X?  (Read 5019 times)
Jr. Member
Posts: 15

View Profile Email
« on: February 19, 2010, 04:56:35 »


I would like to know where do you usually place such classes as extended Notifications or class of constants for a specific View Component. Should they fall into model or view directories or they shouldn't be littered with these classes?
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: February 22, 2010, 07:36:25 »

If there are constants for a specific view component, I usually define them on the component itself. The only other actor that should know or care about the API of the view component will be its Mediator, so it is reasonable for the Mediator to refer to these constants defined on the component itself.

I never extend Notification, since it would require me to use facade.notifyObservers instead of the sendNotification convenience method on all Notifiers. If I did extend Notification, I'd define the classes in a 'common' folder same folder sibling to the the 'model', 'view' and 'controller' folders (for a standard version app).

Pages: [1]