Chetan Crasta wrote:
I couldn't guess why presentational javascript is a bad thing, so I
did a quick search and I found two articles that appear to address the
issue:

http://www.bobbyvandersluis.com/articles/presentational_javascript/index.html
http://www.digital-web.com/articles/separating_behavior_and_structure_2/

From the articles, it appears that the only disadvantages are: People
who surf with Javascript disabled won't see the page as the designer
intended; It may be difficult to modify the design of a page when the
presentation is handled by both CSS and Javascript.

 These don't seem to be huge disadvantages: I can't think of a good
reason to surf with Javascript disabled.

Yah. It's not like Javascript is used as part of malicious attacks, used to deliver attacks targeted at specific browsers/OSes. JS certainly couldn't ever do anything like turn your browser into a botnet member, or scan networks hidden behind firewalls and direct specific attacks at specific targets behind your firewall. And JS certainly can't be used to invade the privacy of site visitors.

Wait, come to think of it: malicious Javascript can do ALL of the above. (As can malicious Java and Flash.) So I can't think of a good reason to surf with Javascript enabled.

Also, since the majority of
sites use some Javascript,  one should expect some problems if one
disables it.

Good site design only uses JS *where it is necessary* for providing required functionality - such as a shopping cart. It provides a fallback (grace degradation) if JS is disabled or not entirely as functional as the designer expects in whatever browser the visitor is using.

I particularly hate sites that make no attempt whatsoever to style their pages until I enable JS there.

The second problem concerns only developers. Good documentation and
project management should mitigate it.

But do not make it any easier to deal with.

On Fri, Dec 3, 2010 at 10:30 PM, Thierry Koblentz <n...@tjkdesign.com> wrote:
If having valid stylesheets is important, one could simply apply zoom
using javascript: object.style.zoom="1";

But then your presentational layer is bound to the behavior layer :-(

--
David
gn...@hawaii.rr.com
authenticity, honesty, community
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to