Author Topic: ...that makes me angry...  (Read 21981 times)

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,184
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
...that makes me angry...
« Reply #75 on: October 19, 2009, 10:26:00 »
Well, that site made use of JavaScript which has nothing in common with Java, apart from the first four letters. However, JavaScript is not actually needed on most websites, and it should be a rule that Javacript should only be used for enhancing the presentation of a website, and a website should never depend on JavaScript (though there are some expections, like video or audio platforms of course). However, since JavaScript can be used to delay-load malicious payload, it's much safer to use a whitelist for pages that are allowed to execute JavaScript.

Java, on the other hand, is completely unnecessary.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
...that makes me angry...
« Reply #76 on: October 19, 2009, 12:00:14 »
Jojo, as a professional webapp developer, I must say that I completely disagree with you. :) Mostly. I do, however, agree that Java and JavaScript have very little in common, apart from the fact that they're both curly-brace languages. And JavaScript is properly called ECMAScript, anyway. :P

<rant>
In my opinion, the notion that JavaScript is simply there to add 'sparkle' to a website is outmoded. Nowadays, JavaScript powers the web -- web systems like Scalix and Bespin, to take two completely different apps, rely fundamentally on JavaScript.

Now, whilst it *used* to be the case that JavaScript was a thoroughly underpowered language, it is now, perhaps, one of the most powerful languages in the world, largely because of its prevalence, functional programming roots, and prototypal inheritance system. I know that, as a C programmer, JavaScript appears messy and untidy, and that prototypal inheritance seems, well, counter-intuitive. But let me tell you, as a C, Java, Haskell, and now Javascript programmer -- there's a lot more to JS than meets the eye. Strap on a really good framework, like MooTools, and you can do just about anything you like, often in more elegant ways.

I agree that JavaScript can be used nastily -- so can plain vanilla HTML, if you know what you're doing. Heck, so can the .Net framework, or addons for Fx, IE, or Op, or even desktop widgets for your platform of choice. That's no reason to throw the baby out with the bath water. To my mind, rather than blocking JavaScript, you're better off using a system like AdBlock, which can use a blacklist for sites like the one linked to (and unlinked) earlier. Best of all, the blacklist is contributed to by many people, not just you. It's generally pretty good, but if something does sneak through, you can just add it.

Basically, I guess that what I'm getting at is that dismissing JavaScript out of hand is not, perhaps, the best approach. :)

Oh, and sorry if I ruffled any feathers with this rant -- I certainly didn't mean to. :) Since I've been working as a full-time webapp developer, programming primarily in Java (server-side) and JavaScript (clientside), I've become a bit of Javascript fanboy -- I do believe that it's a widely under-appreciated and under-valued language.

If you really want to appreciate Java, I think that you have to come at it separately from C -- looking at it from a functional perspective (ie the lambda calculus -- awesome stuff) -- is, in my opinion, a better approach.
</rant>


Clones: If you're in Windows, pressing [Ctrl]+[Shift]+[Esc] will bring up the task manager, allowing you to close any windows doing annoying things. Simpler, and less problematic, than turning off your machine.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,184
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
...that makes me angry...
« Reply #77 on: October 19, 2009, 19:12:34 »
It doesn't matter if JavaScript is / was an underpowered language, untererstimated or whatever - It's just plain annoying in most cases. While it may enhance the user's experience of a website (i.e. by using ajax, or to control a video player or whatever), "static" websites (i.e those without multimedia like videos or audio) should simply not rely on JavaScript, since there's no good reason to do that. Most things that JavaScript is actually used for can nowadays be done by using CSS.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.