logankoester / backbone-datarouter

A router abstraction built with jquery-mobile, localstorage caching, and backbone collections in mind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preload callback is never called when one or more collections fail

logankoester opened this issue · comments

This behavior makes sense in the abstract ("one or more failures != success"), but in practice it is surprising.

The preload callback is used to continue initializing an application once the local cache has been populated with data.

A preload error (typically encountered when an app is being initialized without a reliable network connection) does not necessarily imply that data is unavailable and the app cannot continue, because generally the expired cache data is still available and can be used as a fallback.

By default, it would be better to allow the application to continue loading normally unless the developer wishes to override this behavior by binding to miss:#{resource}:error.