maflores16

Tips for cleaner javascript code?

Discussion created by maflores16 on Apr 4, 2014
Latest reply on Nov 15, 2014 by patrickrwild
I'm currently developing an application in JavaScript which is coming along really nice. However the code is a giant mess; I cannot find problems easily or even know where to add new features sometimes. I'm a fan of OOP design and my stronghold is mainly Java, but when I try to implement the same ideas in JavaScript it doesn't work out as well as it should.

I'm not entirely sure if this is because I lack knowledge on JavaScript, or it just cannot be done after initiating a map method and using dojo.connect().

Anyways, my question is: Is there any tips or main pitfalls when trying to create an object oriented JavaScript code with the ArcGIS API? I mainly want this to split features in different .js files. Right now it's literally just a massive .js file with all my code.

Outcomes