[ALOY-81] Add the ability to create singleton component objects
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-19T11:52:06.000+0000 |
Affected Version/s | 2012 Sprint 14 |
Fix Version/s | 2012 Sprint 14 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2012-06-30T18:25:23.000+0000 |
Updated | 2014-06-22T13:21:10.000+0000 |
Description
from Rick Blalock:
{quote}
Is there a way to distinguish how a MVC triad should be used? e.g. if it should be instantiated or a singleton?
For instance, if you want a singleton in CommonsJS:
var MySingleton = {};
module.exports = MySingleton;
Or something that's to be instantiated:
function MyThingy() {}
module.exports = myThingy;
How would I do a singleton type MVC set in Alloy?
{quote}
Talking with Rick the multiple_views sample should show how to do this. He will try the sample and if any issues come up I'll up specific tickets.