On Feb 3, 6:17 am, Guillaume Andrieu <[email protected]> wrote: > On 2 February 2011 20:22, Garrett Smith <[email protected]> wrote: > > Hi Garrett. > > Thanks for your critic eye to this article. But I'd like you to expand a bit > on this: > > > JS Libraries are by and for incompetents. > > I wonder if you're not pushing the critic one step too far. Libraries are a > necessary component of every ecosystem around a language. Do you mean > general-purpose libraries specifically? > I just need some more to start really considering myself as an incompetent > (I admit the sin to have learned what I know of Javascript through the use > of several general libraries :) ).
There have been a number of discussions about general purpose libraries on CLJ. The main issuers are: 1. The quality of code is not very high 2. They only support a small number of current browsers and are not very tolerant of new browsers 3. The same functionality can be delivered using small, custom libraries that have a small fraction of the code in a general purpose library A consequence of using most general purpose libraries is that because they only support a small number of current browsers and don't tolerate new browsers very well (a consequence of their poor code quality and architecture), they not only disenfranchise perhaps 5 or 10% of web users who don't have a compliant browser, but also require constant upgrades and maintenance because of new or upgraded browsers. This is the antithesis of the web. My favourite chuckle is over enterprises that deliver web applications that only run in one version of one browser (IE 6 being the the worst culprit). They end up with web applications that are more restrictive than the desktop applications they replaced - I'm sure "more restrictive operating environment" wasn't in the business case for changing to browser-based apps. Many developers of web applications want to approach it like a traditional desktop application, where the size of the code base is (more or less) irrelevant. I think a classic example is that a simple "Hello world" app created in Visual Studio can auto-generate 10,000 lines of code and an application of a couple of megabytes. That may be fine for desktops, but when web application frameworks require users (that is, end users or visitors to a site) to download 600kB libraries just to get started, things are going awry. And if you look at the functionality used in most web applications, you'll find the general purpose library can be easily replaced with something a lot more compact. The bloated size of many web sites (in part because of the overuse of scripting) is a large part of the reason for the rise of bespoke mobile sites. If the time and effort spent learning a general purpose library is instead spent learning javascript, then far better outcomes can be achieved. A poster child for abuse of the web by framework based applications is MobileMe. Surely it tells you something about the site architecture when, after many years of development, a company that bets its future on mobile computing can't create an online site that works on both its own desktop and mobile devices. -- Rob -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
