Site Meter dotAtelier: JavaScript good Practices

dotAtelier

The construction of reality through art, language and programming. Virtual reality as artistic practice.


JavaScript good Practices

Kommentare: 0     Stars : 0

Bobby van der Sluis has written a list of good practices when using JavaScript.

JavaScripts should be unobtrusive. They should make using the site easier rather than cluttering it up with unwanted events. Menus that are hidden and only show when the mouse is over them are a good example. Special effects can assist the user in recognising what is happening.

Good JavaScript should be reusable and well-documented so that you and other people can work out what it does at another time. It should also work properly and not conflict with other JavaScripts on the same site. Ideally it should be in small chunks of code avoiding spaghetti-code. With blogs, however, this may not be so easily achievable if one piece of code conflicts with another. Scripts should be in separate files rather than in-line, keeping them separate from the html which they operate in.

Accessibility is also important and often forgotten. Mouse-over events should be complemented with keyboard events to allow non-mouse-users to access the JavaScript effects. This is important for blind internet users.

Eintrag kommentieren

Registrierte Nutzer können sich hier einloggen

Name:

E-Mail:

Homepage:



Sicherheits-Code (bitte aus obigem Bild entnehmen):

Kommentar eingeben:

   

Zurück zu den Einträgen

Texte finden
 
RSS-Feed
  Für alle Rubriken