/    Sign up×
Community /Pin to ProfileBookmark

Why use a Javascript framework?

Just wondering what the benefits of using a Javascript framework are. I understand that one benefit is that it takes care of cross-browser compatibility issues automatically.. what other benefits are there?

I find it difficult to learn new/innovative technologies if I don’t understand what problems with the older/existing technologies it’s attempting to solve.

Jquery is what I have my eye on.

Thanks.

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@rnd_meMay 17.2009 — people use libraries to compensate for lacking experience and skills.

jQuery to js for apps is like word vs notepad for making webpages.
Copy linkTweet thisAlerts:
@dmboydMay 17.2009 — Some people, regardless of their experience and skill levels, use them as a way to save time... Then there are those libraries consisting completely of visual effects.

It isn't always about experience and skill level, but when it is, some "purists" might call it laziness. I personally enjoy learning and knowing how things work, so I suppose you might refer to me as a purist since I do everything without a library. On the other hand, lack of using a library can be an advantage when it comes to speeding up the loading of a site. It all depends on your needs. ^_^

Addendum:

rnd_me was most certainly right, especially about the library analogy. You're going from something convenient to something less convenient, but possibly lighter-weight (in the case of Word vs. notepad, it's always lighter-weight). :p
Copy linkTweet thisAlerts:
@Angry_Black_ManMay 17.2009 — people use libraries to compensate for lacking experience and skills.

jQuery to js for apps is like word vs notepad for making webpages.[/QUOTE]


qft.
Copy linkTweet thisAlerts:
@Declan1991May 17.2009 — Rnd me really sums it up. But to add, the benefits of libraries are apparently simplified code, and marginally quicker development time. The disadvantages are that file size is increased, the wrong logic is used (I never understand why libraries insist on using CSS selectors, and hugely complicated ones at that), and if things go wrong (which I gather is extremely rare), they are more difficult to solve because you haven't a clue what is happening below the hood.
Copy linkTweet thisAlerts:
@Jeff_MottMay 17.2009 — callumd, people use libraries like jQuery because it greatly simplifies our code. Tasks that once took a dozen or more lines of code are simplified into one concise line.

Many smart and professional developers are using it because it lets them do great work faster and easier. jQuery is used at code.google.com, amazon.com, slashdot.org, sourceforge.net, addons.mozilla.org, and many others.

[url=http://simonwillison.net/2007/Aug/15/jquery/]jQuery for JavaScript programmers[/url] is a fairly good article to get you started. Then if you're still interested, you can take a look at the [url=http://docs.jquery.com/Main_Page]jQuery documentation[/url].
Copy linkTweet thisAlerts:
@Angry_Black_ManMay 17.2009 — if things go wrong (which I gather is extremely rare), they are more difficult to solve because you haven't a clue what is happening below the hood.[/QUOTE]

once again, qft.

as for jeff, i don't disagree that the framework can't speed things along, but the underlying moral (from my perspective alone) is that if you don't know what youre doing with JS already, you're begging for problems starting life with a framework.
Copy linkTweet thisAlerts:
@rnd_meMay 18.2009 — I agree that jQuery is widely used. It's css syntax makes it more designer-friendly, and thus easier for site creation/maintenance teams to integrate into their work-flow.


Purist will argue that it can never provide the performance, efficiency, or modularization that custom code would.

Pragmatists will argue that it's a good tool for reducing work and facilitating collaboration. Those goals might outweigh the drawbacks of a large library like jQuery in the eyes of decision makers.

It's the latest iteration of the eternal high-level vs low-level programming debate.

refer to assembly vs c, c vs java, c++ vs vb, c++ vs c#, compiled vs interpreted, strong types vs weak types. etc...

there is no universal "right" answer, it depends on what you value and have to work with.
Copy linkTweet thisAlerts:
@Jeff_MottMay 18.2009 — I agree that jQuery is widely used.[/quote]Though, my list of sites using jQuery wasn't to show how widely it's used. You claimed as fact that "people use libraries to compensate for lacking experience and skills." I thought you should be aware who those people are you were talking about.
Copy linkTweet thisAlerts:
@rnd_meMay 18.2009 — my list of sites using jQuery wasn't to show how widely it's used. You claimed as fact that "people use libraries to compensate for lacking experience and skills." I thought you should be aware who those people are you were talking about.[/QUOTE]

I wasn't talking about all those people.

I was stating an opinion; a pedantic caricature of some library users.

If i had said "people use guns for murder", it would not deny the existence hunters, police, and olympic sharpshooters.

I certainly did not say the everyone who uses jQuery does so for the reasons mentioned. Don't subalternate my particulars to universals; it's fallacious.

I was merely stating two common reasons that javascript libraries are chosen.

I elaborated on some more legitimate (imho) uses in my later post.

Also, just perhaps some of the sites you listed are indeed maintained by javascript amateurs, who knows? Really smart IT staff/developers poopoo'd javascript for a long time, though they're beginning to come around. If jQuery holds them over until they learn the nooks and crannies of javascript, I consider that progress.
Copy linkTweet thisAlerts:
@Jeff_MottMay 18.2009 — I certainly did not say the everyone who uses jQuery does so for the reasons mentioned. Don't subalternate my particulars to universals; it's fallacious.[/quote]

If someone said to you, "People who use PHP are terrible programmers," would you think he was talking about only a select group of PHP users, or of PHP users in general? Probably most would think he was talking about PHP users in general. And they should, because that's what the sentence says.

So when you say people use libraries because they have little experience and poor skills, you're not talking about [i]some[/i] users; you're generalizing about the group as a whole.

I was stating an opinion[/quote]Calling it an opinion doesn't make it one. The reasons why developers choose to use libraries is objectively testable, which means your claim is either true or false, no matter how fervently you believe it.

People who use libraries also includes Dean Edwards and Douglas Crockford. In fact, if you were to tally all the well-known and well-respected JavaScript developers, I'd wager that you'd find an overwhelming majority in favor of JavaScript libraries.

But if you don't like the results of that tally, you could always decide that—in your opinion—the side with the fewer tally marks is the more common.
Copy linkTweet thisAlerts:
@rnd_meMay 18.2009 — Well Mr Mott, some of the sites we handle at work use jQuery, which means that i use jQuery.

Do you honestly believe i was referring to myself in my joke, or are you simply trying to score petty points in some argument you instantiated by misunderstand what i originally meant, dismissing my subsequent clarifications, and continuing to parse my words together in an attempt to "undeniably prove" my foolish, invalid, and indefensible tounge-in-cheek joke posts as demonstrably false according to Mott ?

If it wouldv'e kept Mott's panties out of a bundle, I shouldv'e added the word "some" in front of people.

It was just a hastily written lead to my anaology.

I had no idea it was so confusing to some readers.

my bad.

I see no point or production in further discussion on this, but I predict that Mr. Mott will still want some shamelessly petty last word...
×

Success!

Help @callumd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...