nddrylliog/agora2 — comment on commit 78a4013e9fee62c3142a233c8bca6feac230e0e8
File: javascripts/agora.coffee line 28
By romac:

Agreed. Although I'm not sure we should do a local search. But yeah, we'll
have to design this class accordingly.

What about writing a 'RemoteBackend' class which will communicate with the
API and do all the retrieval, search, etc., then write a 'Local' one which
will display the same interface but will use the RemoteBackend one to fetch
the results and then cache them ?

This way, we don't need to care about what local stuff we'll do, as we'll
be able to implement it anytime.
We'll also be able to keep two references to the backends: one to the
Remote one, in case we want to force an actual call to the API, and one to
the Local one, which we're mainly gonna use.

What do you think ?