In the Alloy docs, it mentions you can have a singleton or instance of a collection. You define one way or another using the instance tag:
<Alloy>
<Collection id="localLibrary" src="book" instance="true"/>
<Window>
<TableView id="table" />
</Window>
</Alloy>
I understand the general idea behind a singleton vs instance... but I do not understand the direct advantage/application of exposing it one way or another to the controller.
Specifically, what is the difference between this controller code:
var library = Alloy.Collections.book;
library.fetch();
and this controller code:
var library = $.localLibrary;
library.fetch();
Is it saying "grab all" instead of "grab just this one?"
Any clarification would be great, tia.