Select to view content in your preferred language

ArcGIS JavaScript API and jQuery

1494
2
02-14-2014 11:44 AM
ErnestoCarreras3
Regular Contributor
I'm new in ArcGIS JavaScript API. I found tons of samples of ArcGIS JavaScript API and DOJO. They were very interesting for me but I know JQuery and I???d like to use it when developing. Are there any resources and samples about using ArcGIS JavaScript API and JQuery? Thanks!
0 Kudos
2 Replies
ReneRubalcava
Esri Frequent Contributor
There's a sample on using jQuery with the Esri JS API.
https://developers.arcgis.com/javascript/jssamples/framework_jquery.html

It's an older example and not AMD compatible.
The basics of using any 3rd party framework with the Esri JS API is you still need to use the Dojo loader, so you still have to wrap modules in
// define a module
define()

// initialize application
require()

But inside those modules, you can use jQuery as normal.

Here is a sample using Angular in much the same way
https://github.com/odoe/angular-esri

Here are some samples using other frameworks like Backbone and Knockout with the Esri JS API
https://github.com/driskull/framework-samples-js
0 Kudos
ZachLiu1
Deactivated User
I use jQuery 70% Dojo 30% in my applications and I haven't met any conflicts yet. So I assume they are almost compatible with each other. So you really like jQuery (and there are so many reasons), go head and use it when you can.

The point is Esri API is on top of Dojo and Dojo has its own advantages.So learning more about dojo will only benefit your work. The best case is you get the best from both.
0 Kudos