-
Notifications
You must be signed in to change notification settings - Fork 6
Backbone interop #1
Comments
I suppose @mattpap and @tswicegood would be most interested in this. |
@lidavidm is there a way to make to make a RESTful api to the actual environments and packages? I can think of a quite logical layout:
|
Sure, but then the server would have to parse that URL structure and turn it back into a command list - this would have to be duplicated for each app or put into a separate library. The idea behind just sending the command list is to minimize the burden on the server implementation. |
FWIW that's basically the structure conda-ui has at the moment. |
Also, the JS API itself is structured that way already (an Env object, a Package object, etc.) Perhaps we could figure out a way tag each method with a URL and generate at least the code to map between URL and API call/command list. |
@lidavidm the long term goal would be to have the server component externalized into a As for generating the URLs, I think we can come up with a basic structure to parse for installation and removal. For example,
That doesn't help with commands like
Thoughts? |
Alright, so we map But for Launcher/any other serverless app, we would still need some sort of Backbone interop, right? |
Yes. We'll need to basically be able to pivot at request to fill the Backbone model with data from either the REST API or the actual Node-based API. |
a174464 and 23df45a add a RESTful mode to the client.
EDIT: https://github.com/conda/conda-js/tree/master/agent now contains sample servers (flask Blueprints that can be included in other applications), and this library has been updated with a full RESTful mode. |
Anaconda Launcher and Conda UI both use Backbone to structure their app; presumably Wakari Express is going to go down this route as well.
Backbone is designed to use AJAX to fetch data from REST APIs.
conda-js
is structured more like RPC. Would it be useful to include Backbone collections/models in conda-js (or an optional support library) to resolve this mismatch?Write Backbone interop collections/modelsDo we want full Backbone compatibility, or are we planning on making direct API calls in most cases?EDIT: not sure how much value Backbone interop would have for us. As written, conda-ui and anaconda-launcher mostly make API calls directly and use Backbone.Collection/Model mostly to pull data from the server, not to update it, and so all we need is a few sync methods.
The text was updated successfully, but these errors were encountered: