Imagine a Beowulf Cluster of JavaScript Frameworks
1–10 of 27 posts
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#2Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#3Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#4The ability to remove unused code at compile time means you have access to a very large, full-featured library, but only have to include the parts you need. You can do something similar with a custom JQuery or YUI build, but not nearly to the same level, and with the same granularity that the closure compiler does automatically.
Unfortunately, to take full advantage of the compiler you must run with advanced optimizations turned on, which in turn means that your code has to be structured for use with the compiler. You're not going to take an existing codebase and just throw it into the compiler with advanced optimizations and have it work out for you.
But if you start a project with the closure library and the closure compiler, you can get some pretty amazing optimizations. We were seeing relatively full-featured apps at compiled, uncompressed sizes of under 10k. Full sites well under 100k with a lot of javascript is completely doable.
Couple that with the dynamically-loading module system and you've got a crazy fast front end.
To top it all off, the compiler respects and can warn about type mismatching if you annotate your code. It's a great way to both document and check your codebase.
The closure library and closure compiler are warty enough that I don't think they'll see widespread adoption the way that JQuery has, but the closure tools, or something like them, is definitely the way forward.
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#5I think his first link was supposed to point here: http://mir.aculo.us/2011/04/11/i-for-one-welcome-our-new-mic...
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#6I was pretty shocked that New Twitter has a meg of custom js - the new UI doesn't seem that complex...
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#7"Of course Mr. Fuchs is able to tell you which JavaScript library will precisely match your requirements -- his job is writing JavaScript libraries!" [Emphasis, and presumed outrage, his.]
Come now. That's simply false, and if you think about it, silly. "He writes open source frameworks for free so he's biased against open source frameworks"? Really? Thomas has never sold a JavaScript framework or written one for hire, and his libraries are MIT-licensed. It's not his "job". Furthermore, Prototype.js and Scriptaculous are not micro-frameworks. So Thomas Fuchs is arguing against major examples of his own work. Yup, must be some kind of evil hidden agenda.
I called Tom out about this misrepresentation on Twitter and he probably changed it by now, but I for one think it's important to know about the history of such things.
Other nitpicks:
Mr. Fuchs has apparently never heard of dependency hell. Very logical argument, that. Way to slyly insinuate he's a bad and inexperienced programmer, without actually introducing any actual facts.
Dustin Diaz has done a great job of putting together many of these micro-frameworks with Ender.js, but as a curator, he has to rely on the original author if he wants to make a change.
Really? How is that a counter-argument?
I'd be very surprised if someone has read Thomas' little essay on micro-frameworks and genuinely come away with the idea that what he really supports is taking a bunch of other people's OSS projects and mushing them together with an integration layer.
The whole point about micro-frameworks is you don't have to make them "go together". You wield them individually like scalpels instead of spinning them en masse like Edward Scissorhands.
There are a LOT of problems with an undertaking like Ender.js, but that's not the fault of micro-frameworks "not being made to work together." It's the fault of doing something that, from the outset, is fairly expected to be more trouble than it's worth - however noble it may be.
One might argue that an integration layer that hooks up a bunch of other micro-frameworks is no better than -- and in a lot of ways, worse, and more complex, and less reliable -- than a monolithic library. So I call "red herring" on the Ender.js argument. It doesn't really support Tom's attack on Thomas' article against monolithic frameworks, because it is one... just made from parts, like Frankenstein.
I could go on, but I'm even boring myself at this point.
What I'd like to know is: Why is the suggestion "You don't need all that code all the time" considered so radical & threatening?
--
And yup, full disclosure: I married Thomas Fuchs, but I used Prototype & Scriptaculous for well over a year before I ever met him.
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#8Tom indirectly calls Thomas Fuchs (author of Scriptaculous, Zepto, Emile, core committer to Prototype.js, etc.) disingenuous because... " Of course Mr. Fuchs is able to tell you which JavaScript library will precisely match your requirements -- his job is writing JavaScript libraries !" [Emphasis, and presumed outrage, his.] Come now. That's simply false, and if you think about it, silly. "He writes open source frame…
I have tremendous respect for both you and Thomas and I'm sorry if the anything in my post came off as disrespectful. My point in saying that his "job" was writing JavaScript frameworks (which I have since updated to better characterize his relationship to them) was not that there was anything untoward going on. My point is simply that he is comfortable making the tweaks and modifications necessary to wield the power of multiple disparate libraries. Quite simply, he is a JavaScript hacker of the first order and is more comfortable taking on that job himself than at least 80% of JavaScript developers out there.
I felt like I had to write this post when I read this:
A whopping 100% of sites or apps using these libraries don’t use all the features they provide.
I have been talking to many, many developers who started with a "simple" app that became very popular and soon exceeded its original scope. To deal with this increase in complexity, they start building many of the features not available in microframeworks, but that come standard with so-called "monolithic" frameworks. My point is that many people need that level of sophistication, but there is a widespread misconception that, for whatever reason, picking a "monolithic" tool is never the right choice.
The suggestion that "You don't need all that code all the time" is not the problem. The insinuation in the JS community seems to be "You never need all that code," which I believe to be false.
Again, no outrage on my part. I just think that we need to address the reality of how modern web apps are built.
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#9Tom indirectly calls Thomas Fuchs (author of Scriptaculous, Zepto, Emile, core committer to Prototype.js, etc.) disingenuous because... " Of course Mr. Fuchs is able to tell you which JavaScript library will precisely match your requirements -- his job is writing JavaScript libraries !" [Emphasis, and presumed outrage, his.] Come now. That's simply false, and if you think about it, silly. "He writes open source frame…
https://github.com/madrobby/emile/pull/7
While you already argue against something like ender.js being valid, Tom's argument, which preceded your comment (and which seemed confirmed by Thomas' post, imo), was that including emile in Ender.js has actually been a pain because he couldn't get Thomas to answer him, let alone change something for him. I believe the irony that was being pointed out was that Thomas then gave ender a shout-out after ignoring it (from an outside and likely wrong perspective).
I say all of this in more of a objective bystander, rather than someone who wants to interject his own opinion on the actual topic. I don't need that kind of stress.
Full disclosure: I found myself quite attracted to Thomas the few times I met him. I think it's the accent.
Re: Imagine a Beowulf Cluster of JavaScript Frameworks
#10It's very modular and consistent. It's easy to pick and choose just what you want to include. You can do it by hand or use the builders on the MooTools site that let you roll custom distributions of the library.
It's like having a micro- and full-stack library in one package.