JavaScript Best Practices
JavaScript is only one actor in a much bigger performance. It plays a role, but is dependent upon it’s support cast (Style Sheets, HTML). The best JavaScript code will be useless when combined with poorly structured HTML and badly written CSS. Likewise, the most logically structured XHTML will perform badly if combined with poorly written JavaScript. All three elements need to pull together to make a well functioning and rich user interface.
Structure (HTML/XHTML/XML), Style (CSS & non content images), Behavior (JavaScript).
These three items are interdependent but the user interface should be constructed to function without the JavaScript and CSS. The principle of “progressive enhancement” is based on the idea that you should begin with your core content. The core content is structured using markup. That marked up content is then enhanced. That enhancement might be stylistic, using CSS, or it might be behavioral using DOM scripting.
Contact Us
- info@mediahive.com
- 732.741.7370

