Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

Yeah why not? As long as they release all their code under the MIT licence (which they've said they will do), there is no reason not to embrace and extend. The parent project can choose to incorporate Microsoft's code, or not.

From the article, Microsoft have said they will contribute patches upstream rather than forking their own version. But as long as you're sure everybody is releasing their code under the same free licence, 'embrace and extend' is not a problem in the free software world. In many cases it can be beneficial.

Outside of obfuscation, how exactly do you close source a JavaScript library that your browser can access via HTTP? I suppose Microsoft could incorporate it directly into the browser, but that doesn't seem likely.

Outside of obfuscation, how exactly do you close source a JavaScript library that your browser can access via HTTP? I suppose Microsoft could incorporate it directly into the browser, but that doesn't seem likely.

"Close" can mean two things here. Yes, the source will remain visible, since its Javascript. So that's one sense of "open". However, it doesn't need to remain open source in the sense of the license. Microsoft could, in theory, add some features and relicense it under proprietary terms; the MIT license allows that. That is, seeing the source doesn't mean it's open source in the licensing sense.

In fact, this has already happened to a Javascript library: EXTJS. Not quite in the sense you're talking about -- it was GPL'd -- but we still had to port away from it.

We might've been willing to release some of the Javascript source -- after all, GP is right, it's not like we can hide it -- but the author was claiming it applied to the web app serving the Javascript, also.

Although that's patently absurd, it's also untested in court, and it proved that he's exactly the kind of assmunch we don't want to work

Uh you did look and see that ExtJs has a commercial license and always has had one, which you could use to create a proprietary blend with?

Not saying your decision was rash or unfounded, just wanted to point out to the discussion that Ext and Josh Shlocum considered their options and chose to offer dual licenses as there was not a single license available which met their needs.

That being said, good luck with that closed source thing you've got going on...

It was dual licensed (commercial or LGPL) before the switch to (commercial or ) GPL. I don't know if they gave a coherent reason for the switch (although it was probably to discourage use of the free version) but they did make some bizarre claims about what needed to be GPL (which hasn't been tested in court) although I think they later got a little more realistic about server side being unaffected.

Closed source, for now. There's always the chance it will be opened in the future, but even if it was, there are other licenses to consider -- for example, we link against plugins which are MIT-licensed, and that's not GPL compatible.

And we do contribute back to open source projects we use. So, really, EXT's loss is jQuery's gain.

Now, the commercial license would be worth it. We're not against paying for things -- most of us use TextMate, for example, with legitimate licenses, and we have paid for Photoshop

Well, it might even be open source. You get the source, and you can change it.That is why "open source" is an unfortunate term.It would not be free software, because the user would be some freedoms short.

Yeah, I was going to say the same thing. Considering some of the smaller scale, and a few of the larger, OSS projects have code so badly written, so badly commented that obfuscated javascript looks easy to read by comparison, how do you close a JavaScript project?

Javascript is copyright just like anything else. Just because you can see the code doesn't mean you're free to use it for your own stuff. For example, you can not legally use non-free Javascript off of any random website.

The difference being, sparky, is that the source is not closed, you can read it. It maybe closed in terms of copyright, but it's still open in terms of source access. As opposed to closed, compiled binaries where the source is not available.

What he's saying is that although Microsoft will be distributing the JQuery framework as-is, they may decide to use it in a closed-source product, with custom changes that don't get sent upstream. I'm not saying that Microsoft will do that, because I'm not in a position to speak for them, but it would definitely not be outside of their usual MO. Furthermore, parents point is that there is nothing in the MIT license that prevents them from doing this. Whether you agree with the philosophy of the MIT license or not is out of scope and off-topic.

Due to the client-side script nature of JavaScript, I am struggling to be able to imagine a situation where it makes sense to release jQuery or any other JavaScript web library as closed source.

Just because you can access the source doesn't mean you have license to do anything with it. There own extensions, especially if contained in separate source files, do not need to be covered by the same license.

Just because you can access the source doesn't mean you have license to do anything with it. There own extensions, especially if contained in separate source files, do not need to be covered by the same license.

But if your business model depended on keeping the code confidential you wouldn't send it over the wire to browsers to execute, whatever the license says, since you can be sure that people will poke around and probably half-inch bits and pieces of it. If you want it confidential, you don't send the source to the user.

Sure, Microsoft has taken stuff that is under a liberal license in order to not have to write it themselves - the BSD TCP/IP stack from back in the day comes to mind.

But I believe this is something different. Even though this probably gives them some code they don't have to write, this is just to use a popular and growing JavaScript library to give ASP.NET MVC some much needed street cred, especially among open source leaning developers.

But as a web app developer, isn't getting patches for any browser useful? If you look at the jQuery bug track, many of the outstanding bugs are IE related. It will be very nice if Microsoft takes it upon themselves to fix these, benefiting anyone using the framework in the real world.

Submitting a patch and that patch being useful to anyone using a non-windows platform are two different things.

JavaScript doesn't run on windows, it runs on browsers.

The Asp.Net team, from whom this announcement comes, have been pretty good for the last few years in making sure that their stuff works in the big 4 browsers: IE, Firefox, Safari, Opera. So their patches would have to work in Firefox and Safari to pass MS internal QA. You can then run it on Windows, Linux, Mac, whatever.

Last time I checked, it was ~50kb, minified, and included all sorts of visual effects that I have no desire to use. I wouldn't call that lightweight. Why any of the visual stuff is part of the core distribution is beyond me.

I don't like the increase in size too, it used to be exactly right. One requirement for my ajax stuff is that page loading should feel instantaneous, not the feeling big libraries are loaded in the background, or even worse, show some ajax indicator. The 15K mentioned is indeed incorrect. That said, you confuse the minified version with the packed version. The packed version is much smaller, but has a relatively big client side penalty as decompression is done in javascript. When you have compression on the

from TFA:Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your.NET applications. jQuery helpers will also be included in the server-side portion of.NET development

so much for "if we want changes, we'll submit a patch like everyone else"

Moreover, these are different times. Balmer just admitted that Microsoft lost a generation of programmers who now build web apps using more open tools. They want to appeal to those developers. Embrace and extend is not an option, that is what scared them away, among others. We've seen the new two-faced MS before. I'm not sure where this limbo dance will take them. But I don't think it's a coincidence that this is announced just a few days later, it is exactly the new MS as Balmer likes us to see them. jQu

Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your.NET applications. jQuery helpers will also be included in the server-side portion of.NET development (in addition to the existing helpers) providing complementary functions to existing ASP.NET AJAX capabilities.

Javascript frameworks deal with the major hurdles of modern web design: Abstracting browser differences, and avoiding reinventing the wheel with the kind of AJAXy effects that are increasingly more common these days.

I wonder how this will affect Prototype. It's always had different design goals than jQuery, but will this diminish it's popularity?

Also, will the jQuery API eventually be integrated into the browser instead of being a huge JS blob for every page?

Also, will the jQuery API eventually be integrated into the browser instead of being a huge JS blob for every page?

I imagine not, since it would make upgrading a major pain. As long as the site controls which version of jQuery you have, they can opt in to the latest and greatest version without having to wait for the browser manufacturers.

True, although it would be interesting if future browsers could detect certain versions of jQuery via the <script> tags in webpages, and accelerate those versions. That way, the latest version could always be included if needed, but for older versions browsers could provide a native implementation.

Of course, that doesn't mean its a good idea. If Microsoft managed to fuck up CSS, JavaScript and pretty much everything they have implemented so far, I sure as hell don't think they'd implement jQuery any b

jQuery is entirely contained within its own namespace. Multiple versions of jQuery can coexist on the same page, so upgrades wouldn't be a problem, sites could just include the latest version if the version shipped with browsers wasn't suitable.

One thing I would like to see in the future is some apt-like repository for commonly used javascript libraries. E.g., if I use Yahoo! js libs, the page would just ask for whatever lib version it was designed for, and the browser would load it from a local repository. Some libs are huge, and there should be no need for downloading it again and again from different sites.

Of course, this could be done today by simply point the src attribute in your script tag to yahoo's repository, but this would not be good o

Because jQuery is like XML (or JSON these days), Web 2.0 and AJAX. If you don't have it on your CV these days, you should convince your current employer they need to use it so you can add it to your CV.

Running 10,000 queries isn't a benchmark because it's a likely use of the library, it's a benchmark because 10,000 queries will create measurable timing differences where the difference in each one is too small to measure. An immeasurable timing difference might not seem like much, but for effects that have to run smoothly or synchronized, it can create undesirable visual effects. I've seen the difference in MooTools versus jQuery, for instance, in that a MT app often has smoother motion and fade effects th

jQuery announced that the next version of their popular library will leverage the power and versatility of Microsoft(tm)(r) Silverlight(r) for delivering the next generation of.NET based media experiences and rich interactive applications for the Web.

"Freetards and other goddamn hippies need not apply." said jQuery's new maintainer, an oddly familiar, angry fat man. Going by the name of Stephan Ballmerano; he sports a beard, dark glasses, cape, and top-hat.

I'm just getting into the use of JavaScript for server and client interactions. I've been pretty impressed with what's available when you take the class-like approach. For the most part, I have had no issues with JavaScript browser differences (well, back to IE 6 anyway)
It appears jQuery would make my scripts smaller, but I can do that by packing my scripts too.
Why should I use a library that redefines what JavaScript does so well already on its own?

The most imprtant feature of jQuery is that you can select groups of HTML nodes using CSS selectors, and modify them in bulk with a single function call instead of iterating over some array. I didn't use it too much, but this approach is extremely powerful and simplifies code a great deal. There are also simple and usable Ajax APIs and other assorted goodies, but the CSS selector idea is really brilliant.

I have used jQuery extensively and it is easy to learn and easy to handle. In fact, I had been using JavaScript for quite a while before jQuery, but after I started using jQuery, read some source, wrote a few plugins, etc. (even some patches, including performance related ones), I feel my understanding of the weird and advanced things in JavaScript is also much much better - and it didn't require any hard work or thinking:)

I have used Prototype extensively and it is easy to learn and easy to handle. In fact, I had been using JavaScript for quite a while before Prototype, but after I started using Prototype, read some source, wrote a few plugins, etc. (even some patches, including performance related ones), I feel my understanding of the weird and advanced things in JavaScript is also much much better - and it didn't require any hard work or thinking:)

Undoubtedly Prototype is very nice as well. Never used it though, after Dojo (which was pretty heavy at the time, with lots of server requests) I decided to pick a new framework; jQuery and Prototype were the candidates at the time, and I picked jQuery. Not sure why I picked it over Prototype at the time, though, but this was already some time ago.

Either way, the last part of your 'rewrite' seems to imply there are some specific cases where you'd pick Prototype over jQuery (or vice versa). Care to elaborate

On the speed front: that isn't sufficient enough of a reason, and here's why:

The benchmarks are based on DOM selector tests. The code for the benchmark is not provided, so we don't really know in what manner he selected DOM elements, or if he even used the elements after selecting them. For instance: mooTools may be slower in pickin

I was just thinking to myself that the name might have a large part in jQuery's current popularity. Imagine the following conversation:

Boss: So what did you pick for the website?
You: mooTools.
Boss: moo- what? Is that related to the flaming fox, thundering bird or that blasted penguin?
You: Er..not directly..
Boss: Out of my office! Bring me back acronyms or combinations of characters of the english alphabet with common words! Cute animals are not an element of success!

but all the shitty microsoft-based sites that were thrown up in a day that will be including jQuery UI elements. Users will begin to see jQuery elements and associate them with shitty websites and they will become considered tacky/cliche despite their quality and usefulness. This is what I fear.

Care to elaborate? I searched the bug tracker for http headers and Carewolf, but didn't see anything relevant, although that may be because the complete fuckwit who redesigned the website recently decided that it would be a good idea to use a font size that is half the size configured in the browser (flagged as !important no less). And no, don't tell me to adjust my settings. If I have to adjust my settings to make your design readable, then you have utterly failed as a designer on the most fundamental

it's slow, buggy, and prone to being abused. why are we still using it?

Slow? Not with the next generation of JIT JavaScript compilers coming up in Firefox 3.1, Google Chrome, and WebKit. And I'm sure IE will get there someday. Buggy? Not sure what you even mean by that... particular implementations may be buggy, but a programming language cannot itself be buggy. Prone to being abused? Which language isn't?

It's a fully functional language which uses a syntax almost identical to C.

It implements the awful === operator.

Boolean values can be True, False, Undefined, or Null (this is a side effect of being weakly typed)

It tries to be easy to program by assuming end-of-statement operators (';') at certain places if the function wouldn't otherwise parse. This makes it incredibly difficult to debug. I truly consider this a bug in the design.

It's a weakly typed language with a strong understanding of type. By this, I mean that any variable is actually a reference which can hold values of any type (though they're all just objects anyway.) This isn't so much a bug as a design decision, but it's important for understanding the below--

The object which 'this' references has several different meanings depending upon the context.

So those are only a few of the issues. It feels like it's trying to be several different languages all at once. Coupled with the issues above (particularly the inconsistent use of 'this' and the implicit semi-colons), well frankly, if any design could be considered buggy, I'd say that it's Javascript's.

Nearly every gripe with Javascript stems from the first and last items on your list. 99% of the javascript I come across is written as if it is C, which causes all sorts of confusion with scope and efficiency.

Second and third, true enough, but Javascript is not alone.

Other languages with tons of theoretical cred share the newline/semicolon problems (Haskell, for example).

If more programmers understood functional idioms, Javascript wouldn't have such a bad reputation.

Nearly every gripe with Javascript stems from the first and last items on your list. 99% of the javascript I come across is written as if it is C, which causes all sorts of confusion with scope and efficiency.

Yes, and I think it's a bad design to model the statements of a language against a different language, but completely change the semantics. An extreme example would be using the '+' symbol for subtraction.
But I don't think that the typeof issues I mentioned are fundamental to functional programming languages. And I don't think that reusing bad design (===) excuses the language just because "Javascript is not alone."

Other languages with tons of theoretical cred share the newline/semicolon problems (Haskell, for example).

I haven't seen many other languages do this, but I still think it's a bad design. I'm su

You're basically arguing that since JS is not the language YOU want, its buggy.
JS has its oddities, to be sure, but it is not "buggy" - its just very different. It also suffers from the same thing as PHP -- its easy to get into, but hard to master - so you get hundreds of thousands of shitty developers out there, and a handful of good ones. The shitty ones give the language a bad name, while the good ones build things like Gmail.

I guess that it depends upon your definition of "buggy." You can design a language where the Integer object has a destructor named "toString" if you want to. And if someone did that, I would consider the design to be broken.

That's an extreme case, but it illustrates the point. Javascript takes common programming paradigms, structure, and syntax, and turns them on their heads. It would be nice if the designers had chosen to make Javascript look a little less C-like, but I suppose that it might not hav

I guess that it depends upon your definition of "buggy." You can design a language where the Integer object has a destructor named "toString" if you want to. And if someone did that, I would consider the design to be broken.

No, the definition of "buggy" is not open to interpretation. If your language defines a destructor named toString, then that is a feature of the language, not a bug. Any implementation which does not correctly implement it is therefore buggy, but the language itself is not.

Now, anyone is certainly free to argue whether a destructor named toString, or any particular feature of JavaScript, is a good idea, but saying that the language itself is "buggy" or "broken" is, by definitio

No, the definition of "buggy" is not open to interpretation. If your language defines a destructor named toString, then that is a feature of the language, not a bug. Any implementation which does not correctly implement it is therefore buggy, but the language itself is not.

Now, anyone is certainly free to argue whether a destructor named toString, or any particular feature of JavaScript, is a good idea, but saying that the language itself is "buggy" or "broken" is, by definition, incorrect.

While you're correct about "buggy" (which describes a deviation between specification and implementation), you're way wrong about "broken". Things most certainly can be "broken by design", which refers to the state of things when a specification says something that just can't be argued to be correct without the application of hallucinogens.

Whether or not JS fits that bill is a matter of debate. (I'm not too fussed either way there TBH; I just prefer to use other things.)

I'd forgotten about that one, but yes, that bugs me, too. It's slightly less irritating to me since Javascript doesn't explicitly declare an Associative Array object. But they do declare an Array object, so it seems to me that the typeof should return 'array' just like it does for strings, dates, etc.

This was a bug. The original implementation used tagged pointers and the tag bits for objects were zeroes. Null was also represented by zero. The typeof method forgot to treat null as a special case so, coincidentally, the type came out as object. Netscape tried to change this (and various other bugs) when ECMA standardized the language, but MS (who'd done an almost perfect job of reverse engineering the language) insisted on backwards compatibility.

Arguments over the use of "this" aside, I guess that strong vs. weak typing is somewhat subjective. Wikipedia implies that there's plenty of debate and wiggle-room over what qualifies as a strongly typed language. There's enough implicit casting in the language for me to consider it weakly typed. In fact, this was a design decision so that Javascript would be easy to use for non-programmers.

Actually, I was making fun of the fact that you had no argument either. It was my way of saying that you had no substance to that particular point, therefore any response to the contrary need not have any substance. I chose "so's your face" because the fact that I've never seen your face would add a little extra stupidity to the comment. For all I know, you had your face switched with John Travolta's and are, therefore, quite a good looking man.