Javascript Best Practices at Techday7 (developer’s life)

Nov 24th, another Techday7 event. This time Ramkumar and  karthi are presenters and they presented about Javascript best practices and Titanium alloy framework.

here is slide show about Javascript best practices by Ramkumar M

Few quick points:-

* About GC in Javascript, GC is automatic.Objects are collected there is no references longer. Javascript Uses Mark and Sweep GC method.

* Avoid the global scope. In the Global scope the Object never null, so never garbage collected. It’s time taking and trivial process to get the reference of global scope. If need to use global scope assign yourself null after the use.

* Use var. Don’t forget to use var for all your variables. The Variables without var may considered to global. You are making javascript to struggle for finding the scope of your variable

* Get Use of Self-Calling Functions. Have any one noticied jQuery using self calling functions

* Don’t D.R.Y. Make the reusability. Make use of Namespace