PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: eco_bach on August 10, 2009, 06:04:51



Title: Q: Best practice, where to store constants?
Post by: eco_bach on August 10, 2009, 06:04:51

Constants used by notifications that are mapped to commands, and might be used by more than one mediator, I store  in the Appplication Facade.

Other constants NOT mapped to any commands, I keep in the relevant view component. The latter would be used in both events dispatched by the component as well as the component's mediator.

Can anyone share their rationale for storing public constants and-or provide feedback on whether the above is recommended?
 


Title: Re: Q: Best practice, where to store constants?
Post by: Jason MacDonald on August 11, 2009, 06:03:07
I store all my constants in a seperate constants file with the exception of notifications sent by proxies, which are stored in the proxies themseleves.