<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Tips for cleaner javascript code? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762647#M70655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roberto,&lt;/P&gt;&lt;P&gt;Can you repost the link? &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;PW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Nov 2014 21:35:12 GMT</pubDate>
    <dc:creator>PatrickWild3</dc:creator>
    <dc:date>2014-11-15T21:35:12Z</dc:date>
    <item>
      <title>Tips for cleaner javascript code?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762645#M70653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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(). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 18:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762645#M70653</guid>
      <dc:creator>MarioFlores</dc:creator>
      <dc:date>2014-04-04T18:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tips for cleaner javascript code?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762646#M70654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;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. &lt;BR /&gt;&lt;BR /&gt;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(). &lt;BR /&gt;&lt;BR /&gt;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.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a very common situation. I believe that this happens because &lt;/SPAN&gt;&lt;A href="http://www.crockford.com/javascript/javascript.html"&gt;Javascript is probably the world's most misunderstood&amp;nbsp; programming language&lt;/A&gt;&lt;SPAN&gt;. First of it all, it has "Java" on its name but the ideas and philosophy of the language has little or nothing to do with Java. Its much more like LISP in C clothes. I recommend you to read the amazing Crockfords' Book - &lt;/SPAN&gt;&lt;A href="http://www.amazon.com/JavaScript-Good-Parts-ebook/dp/B0026OR2ZY/ref=sr_1_1?ie=UTF8&amp;amp;qid=1396889887&amp;amp;sr=8-1&amp;amp;keywords=javascript+the+good+parts"&gt;Javascript: The Good Parts&lt;/A&gt;&lt;SPAN&gt;. After that, take a look at &lt;/SPAN&gt;&lt;A href="http://requirejs.org/docs/whyamd.html"&gt;AMD&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules"&gt;modularization of javascript code&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are looking for a framework that provides you ways of organizing your code (much like the mvc pattern), you may wan't to take a look at &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks"&gt;this link&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762646#M70654</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-04-07T16:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Tips for cleaner javascript code?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762647#M70655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roberto,&lt;/P&gt;&lt;P&gt;Can you repost the link? &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;PW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 21:35:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/tips-for-cleaner-javascript-code/m-p/762647#M70655</guid>
      <dc:creator>PatrickWild3</dc:creator>
      <dc:date>2014-11-15T21:35:12Z</dc:date>
    </item>
  </channel>
</rss>

