← Back to team overview

dhis2-devs-core team mailing list archive

Re: D2.js Writeup

 

On Sun, Nov 16, 2014 at 11:08 PM, Jan Henrik Øverland <
janhenrik.overland@xxxxxxxxx> wrote:

> Good questions asked on the purpose of the d2. One idea could be to build
> on the good work Morten has done with dhis2.* and streamline some of those
> processes. We could probably benefit in terms of performance from cross-app
> harmonization like shared local/idb stores etc? Seems unnecessary that
> every app should have their own stores in different namespaces with 16k
> options/sets? Would be great if d2 could handle this behind the scenes and
> make sure that it "just works".
>

If we go for AngularJS and auto-generated Services, we could actually
create a more generic storage proxy that can wrap the services, so we can
provide a cached result for whatever endpoint we want.. we could even more
it smarter, and only have a certain number of items in the cache etc,
another discussion point maybe.

We should also have a brief discussion about jQuery.. AngularJS already
provides a lot of the same functionality (through jqLite I believe), but it
might be worth using $.* instead of angular $http etc.. if we want to have
less dependency on ajs.

An example would be to auto-generate classes that talk to the web-api
(using $.ajax), and then expose them through angular.service (so they can
be used both with and without ajs), this will require more work probably..

--
Morten

References