How to use Backbone.js with the JS API

2837
3
02-18-2014 05:45 AM
BrianBeck
New Contributor III
I am starting to develop a new Javascript application using the Esri Javascript API.  I'd like to organize my app using MVC structures.  I have heard about Backbone.js, but I've never used it.

I was looking at the documentation and tutorials for Backbone.js and it looks very promising.  However, it looks like Backbone.js has built in functionality for interacting with a database from a model.  I have not been able to figure out how to override this built in behavior so Backbone.js models can communicate with feature services using esri/tasks/query or esri/layers/FeatureLayer.applyEdits.

Does anyone have experience doing this or have any idea how I might accomplish this?
3 Replies
RobertoPepato
Occasional Contributor II
I am starting to develop a new Javascript application using the Esri Javascript API.  I'd like to organize my app using MVC structures.  I have heard about Backbone.js, but I've never used it.

I was looking at the documentation and tutorials for Backbone.js and it looks very promising.  However, it looks like Backbone.js has built in functionality for interacting with a database from a model.  I have not been able to figure out how to override this built in behavior so Backbone.js models can communicate with feature services using esri/tasks/query or esri/layers/FeatureLayer.applyEdits.

Does anyone have experience doing this or have any idea how I might accomplish this?


Hello Brian,

Have you seen this blog post series? I think that it could help you with some insights.
0 Kudos
KenBuja
MVP Esteemed Contributor
There was a talk at last year's Developer Summit (Working with Application Frameworks and ArcGIS API for JavaScript) that compared Angular, Backbone, and Knockout. The slideshow and video of the talk are both viewable. The authors built the same application using the different frameworks, which are available here.
0 Kudos
JorgeVinagre
New Contributor III
Hi
This post is quite old but i woke up to this recently.
Odoe.net has a github project here  that uses angular.
My main doubt on this is how do I encapsulate esri widgets in angular directives, for example...

I will definitly look into this subject
0 Kudos