Moving from Flex to ArcGIS API JavaScript

2068
3
04-14-2014 08:36 AM
LisCollins
Occasional Contributor
Any suggestions on the best methods to move from Flex API to JavaScript?

Most of my online maps were made using in Flex and I want to change them to the JavaScript API.

Thanks!
0 Kudos
3 Replies
MichaelVolz
Esteemed Contributor
ESRI has a WebApp Builder for Javascript in Beta testing.  You can join that testing to get in early and help with bugs.  I would suggest reading up on Javascript and then waiting until this builder is released as you can then have items that you would just need to extend instead of starting from scratch with.
0 Kudos
williamcarr
Occasional Contributor II
I recently made the transition myself. My advice is to learn up on javascript syntax as much as possible. Code academy or another training site would be a good time investment just to get brushed up. I didn't take this step and it bit me in the ass. Be weary of mixing AMD and Legacy, this also cost me time. Working with Flex was a lot easier. JS is a finicky mistress.

Good Luck
0 Kudos
RobertoPepato
Occasional Contributor II
My personal advice is: Do not try to make any analogies between javascript and any other programming language (maybe this statement can be relaxed if you came from functional languages and paradigms, but I think that this is not the case for mostly Esri programmers). This is because probably, as Douglas Crockford says: Javascript is the world's most misunderstood programming language. Try to understand the specific idiosyncrasies of javascript, like for example: the this keyword in javascript can be bind to different things depending on the context in it was ca....

Don't try to understand Javascript as a pure OO language. Can you use objects in javascript? Surely you can! Can you use OO basic concepts like inheritance (yes, but maybe not the way you're thinking). In my opinion, the strengths of javascript are connected with its functional design. Try to learn about functions as first class citizens, high order functions, closures, currying, lazy evaluations, generators and etc. These concepts can really speed up your understanding and productivity when programming in javascript.

Read good books and references about Javascript (you'll find plenty of it on the internet). Javascript: The Good Parts from Crockford is an excellent starting point. Be sure to read about and understand the dojo toolkit. The Esri javascript api is built on top of it and understanding it will make your life easier. Also, pay attention to the ecosystem in addition to the language. Javascript is a pervasive language and you'll find it from browser to server (node.js), from task automation (grunt) to dependency management (npm, bower) to unit tests (karma, mocha) and even more.

Last but absolutely not least: Try to join the development community by contributing to an open source project. It doesn't need to be a GIS project (but it will probably be nice if it is 🙂 ). Find a project that fits your current level of understanding and try to understand how others are growing the project. Read and play with someone else's code is a good exercise for learn new stuff.

Well, those are my personal opinions regarding my experience (still) learning JS. Hope that helps.

Regards,

Roberto Pepato
0 Kudos