The Future of AngularJS – O’Reilly Radar

In AngularJS by bchesleyLeave a Comment

Data Persistence

One last major piece of the puzzle that is AngularJS 2.0 is the persistence story. AngularJS started with pure XHR request support (through $http and $resource). Sockets were introduced through third-party services and integrations. Offline support was done through LocalStorage on a per-application basis. These have become common enough in applications nowadays that rethinking the core AngularJS communication and persistence story was necessary. To this extent, the following are planned:

Phase 1 of AngularJS 2.0 would come with support for Http communication (using ngHttp), Local Storage, Session Storage, and IndexedDB access (through ngStore), and WebSocket API (through ngWebSocket). Each of these would be optional modules that could be included on a per-project basis.

Phase 2 would build on top of this to build offline-first applications, which would be able to check connectivity status, cache data offline, and more.

Phase 3 would finally aim to build an ngData module which would allow developers to build Model classes which represent your data, and act as an abstraction layer on top of Phase 1 and Phase 2 modules. Thus, it would be able to handle offline access, querying network, fetching pages and so on.

via The Future of AngularJS – O’Reilly Radar.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.