[ALOY-644] Alloy should use no persistence when no adapter type is specified
|Fix Version/s||Alloy 1.2.0, 2013 Sprint 09|
DescriptionCurrently when no adapter type is specified in an Alloy model, one is specified by default. On Mobileweb it is the localStorage adapter, on all other it is the SQLite (sql) adapter. This behavior is confusing and undesired in many cases where the developer does not want persistence at all, but just a model to manage the current state of the app. All default adapter types will be removed and a sync adapter with no persistence should be used instead.
- Tony Lukasavage 2013-04-29
test case: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-644
Functional testing should show console warnings for both the
model.save()calls in the index.js controller, instead of failing with a sync error exception as they did in the past. The app should function properly without persistence, changing the color and counter on the first tab and then adding the "+" to the end of each row on the 2nd tab. Since no persistence is being used, the models should be reset on each run. This fix modified the central alloy.js file that affects all processing of models. In addition to asserting that the test case behaves as expected, most if not all test apps in the [models folder of the repo](https://github.com/appcelerator/alloy/tree/master/test/apps/models) should be tested to ensure that they still behave as expected. I have done this myself and they all do, but additional testing would also be beneficial.
- Federico Casali 2013-07-29 Verified as working as expected. No persistence is being used and no exception errors are raised. Titanium SDK 3.1.2.v20130726192706 Alloy 1.2.0-alpha Appcelerator Studio 18.104.22.168307252418 CLI 3.1.2 Node 0.8.22 Closing.