Open Source and Javascript 38
mr_burns asks: "I was wondering what people's opinions were about GPLing or otherwise OSS licensing javascript code. I have some pretty cool code I want to share with everybody, but I don't want to be screwed. I look forward to establishing a method of collaboration such that we can all take ECMA-262/javascript to the next level. Why should Slashdot and other DB driven sites rely on a servers processing power when the client machine is mostly idle? I think colaboration between client side and server side scripters in an OSS context could make things much more efficient. What pointers do the OSS community have that could guide the way, and what are your opinions on the matter? Thanks in advance for any feedback y'all can give." What do you all think? Is Javascript robust enough for this sort of thing?
Re:Javascript-required Website = Lose Sales Fast! (Score:1)
Who knew?
No! Not Javascript... (Score:1)
Re:No! Not Javascript... (Score:1)
The browser is supposed to be a thin client. You want a site that has to do some data crunching, don't offload it on my Pentium 90 or my friend's 486 (yes, beleive it or not we don't all run 500 MHz PIII's with full T1 feeds), do it on your massively studly server box.
GPL? JustDoIt. (Score:2)
Re:Javascript-required Website = Lose Sales Fast! (Score:1)
Javascript is a robust language. (Score:1)
As far as Javascript in Browsers go, agree with the other posts that say javascript should be avoided in internet web pages. Using javascript in internet web pages limits the potential audience. Javascript can be used well in company intranets, though. (Where everything is fairly standardized so everyone is using the same browser with the same security settings). Javascript can make intranet sites become very useful to a company.
Be careful to seperate javascript as a language from any implementation of it. Just because IE's implementation of it produces staticly-sized text boxes does not mean that it is a bad language. That is just one way of using the language. The language itself has evolved to be a very powerful scripting language (not far behind perl in my opinion). The most common use of it just happens to be client-side web scripting. Try using javascript as a normal scripting language and the good design of the language will come through. Do not limit javascript to a client-side scripting language when it is so much better in other places.
Rick Wash
Re:There are solutions... (Score:1)
Anyway,
I was bored so I found Rhino for ya....
www.mozilla.org/rhino
Re:No! Not Javascript... (Score:1)
Even leaving aside the horrendous security implications of Javascript, I turn it off because if I don't, Netscape crashes about 18 times a day.
Re:Javascript-required Website = Lose Sales Fast! (Score:1)
I did read the source, Coward!
To run Flash you need aftershock which uses some JavaScript. Nevertheless, the mouseovers and funny visual effects are all Flash. Hence the following line:
<!-- EndAftershock filmticker8.swf -->
Re:Answering the question... (Score:1)
Re:There are solutions... (Score:1)
Released under NPL... differs from MPL I suppose.
http://www.mozilla.org/js/
Re:No! Not Javascript... (Score:1)
I did see a very nice use of Javascript today, though. The page had links to a whole bunch of large images, and moving the mouse cursor over a link brought up a thumbnail of the image. This made the page download faster, since you didn't have to grab thumbnails for all images - just the ones whose description interested you. And most importantly, the site would work just fine without the scripting.
Unfortunately, I think that makes a grand total of about three sites I've seen that use Javascript well. B-
Re:No! Not Javascript... (Score:1)
There are uses for Javascript, such as form validation.
If you do form validation on the server-side you are doing multiple _bad_ things:
a) Waste of bandwidth
b) Higher CPU usage on the server side due to dishing out pages, error pages and simple error checking
Finally, Javascript IS lightweight, it just some people over use Javascript and do all sorts of cr*p with it.
And like all things, you want a scripting language on your CLIENT as well as on your server.
If you want to do low-level stuff, there are always plugins and API plugins that you can use on both the client and server side.
Javascript is a good thing and the idea (of having a client scripting language) at least will be around for a long time.
Huh? (Score:2)
So one should worry that companies are using their Intranet web servers to steal "assets" from their own computers? OK.
--
just how dangerous is javascript? (Score:1)
Not dangerous at all. I'll be the first to agree with you that Active X is a volatile technology. But I've been programming with JavaScript for a while and, as far as I can tell, the worst you are looking at is being involuntarily sent to someone else's smutty site. Which in itself isn't particularly dangerous (unless your company logs browser connections).
Maybe you could perform a denial of service attack by with an infinite loop but that is pretty tame in comparison to the types of things you can get up to with Active X
...not that I would know!
Re:Answering the question... (Score:1)
Thanks but no thanks! (Score:1)
While the Odean web-site is only viewable when JavaScript is enabled, it is, nevertheless, a Flash page. You can tell in a very simple way, so pay attention. First select View Page Source and you'll see this text window pop-up (don't be frightened, now). This contains the HTML tags that define the document.
Inside you'll notice an EMBED tag. Now, if I am not mistaken, this mean that the document contains executable content, i.e. a plug-in [dictionary.com]. With me so far? You'll also notice that the EMBED tag calls a file with the
Oh, BTW thank-you for your offer from teaching me some JavaScript. If you need some basic lessons in web-page content, however, you'll know exactly where to find me.
Love and kisses...
Re:Answering the question... (Score:1)
Answering the question... (Score:1)
If you were asking, "is Javascript a good language?", my answer is a qualified "maybe". JS is OK, but it doesn't thrill me. I like the prototype-based language, but overall it's caught in the middle between too OOP and too loose.
Problems I have with JS:
- Variable scoping is strange, and has never been clear to me.
- It's great as a browser scripting tool; it's not very good as a server-side tool *at all*.
- It's nominally standardized via ECMA, but Netscape keeps trying to leapfrog the standard and innovate at the speed of light (they're up to Version 1.4! I've never even used 1.3 stuff, and hardly ever used 1.2)
I'm not a big Javascript fan. I use it only because it's the only built-in scripter for the browsers out there. If there were a Perl/Python/Tcl DOM/scripting layer, I'd use that.
Re:No! Not Javascript... (Score:1)
agreed (Score:1)
And, before you flame, yes I do know about Java, CORBA, RMI, etc etc etc. These are way too heavyweight for what I'm talking about.
Intranet JavaScript (Score:2)
The original poster is correct that the real sexy DHTML stuff is only really practical on an Intranet where you have complete control over the client browsers.
--
Re:Javascript:- WARNING of Severe Security Risks (Score:1)
Re:Javascript-required Website = Lose Sales Fast! (Score:1)
And you still seem to be denying that the Odean (oops, I really must learn to care about my spelling) web page uses Flash. I am utterly impressed: I wish I could lie to myself so convincingly just for the sake of an argument. You even stooped to the level of playing mere semantic games. Wow, this is life! I really feel I am slumming it with the plebs.
Love and kisses (please don't misinterpret: this isn't any kind of offer)