Hey guys,The way bamboo.js works at the moment is that if you'd like to query a dataset's info, you first create an instance of a Dataset, then call its query_info function. This results in the info being cached within the dataset.I'd like to refactor bamboo.js by moving all the query functions into the main bamboo namespace and out of the Dataset object. The Dataset will then be a higher level object that if the developer chooses, can query through. So basically you will be able to dobamboo.query_info(dataset_id)as well asvar ds = new Dataset({id: dataset_id})ds.query_info()The reasoning behind this is that I'd like to create a bamboo-angular module that can easily be re-used and tested. I've been using bamboo.js with angular quite a bit lately, first with the Bamboo UI and now with the Drishti site. Since the ajax calls from within bamboo.js are external to angular, a manual update needs to be triggered to have it reflect on the web page. Initially, I did this on the angular controller but having the need to do this in different controllers led me to create a bamboo-angular service that can be re-used.I had to have is such that for every bamboo call, a new dataset object would be created and used to run the query. With this approach, the caching becomes useless since the dataset is discarded after the call.Angular's testing also relies on the ability to swap out an object with a mock object, especially for ajax calls. Its also difficult to swap out the Dataset object which makes the service hard to test.This shouldn't affect existing code, however, while doing this, I'd also like to implement something I've been meaning to for a while, which is to make all the bamboo calls asynchronous by default with the option to make them synchronous (the opposite of what it is now). This will affect existing code.Thoughts, go-aheads?--
Larry Weya
Hi Larry,
The changes you've described sound like improvements that will make bamboo.js more useful. Sounds good to me.
--
You received this message because you are subscribed to the Google Groups "bamboo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bamboo-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hey,
Its NOT moving bamboo.js to angular but rather making the API calls into functions within the bamboo namespace which make it easier to integrate into angular (and generally, I think).