We always try to improve our ability to apply our skills to solve problems. The principles of software development have greatly helped me write better code. This includes testing, modulation, using OO, if necessary, etc.
Here is an example of how I achieved some modulation in my JS. This may not be a good way to achieve this, but it serves as an example of what I mean and contains a few questions of its own.
framework.js
Framework = { CurrentState : { IsConfigurationLoaded : false, IsCurrentConfigurationValid : false, Configuration : undefined
Question:
How do you apply the principles of software development to improve the readability, maintainability and other quality attributes of your JS?
Other related (more specific) questions that will help in answering:
I once wrote a simple JS module testing platform that had simple statements and a test helper method using lambda. What do you think of javascript unit testing?
How important is it to determine the boundary between your code and the framework?
JS is mainly used in a browser or on a website. Does this decrease / nullify certain problems?
Do you suggest using OO classes and principles?
Using undefined and / or null? Should this be prohibited?
Using try / catch? Suggested?
When do you switch from JSON to classes? Do you use Util methods that work with data?
Using a prototype? Suggested? What a good case when you have not used it?
javascript software-quality
Scoobie
source share