views:

356

answers:

7

Our company builds websites and web applications. We are a small firm and our team of developers are always building the javascript functions from scratch or copying from other websites built by us. Every time I bring to the table the word standardization and using a JS framework like JQuery, Prototype or any other, I am told Frameworks have the three points below as arguments against them:

  • Mainly for people that don't know enough JS
  • Frameworks limit Javascript developers
  • Frameworks bloat the actual development code with a lot of things that are not used.
  • We don't use enough Javascript in our applications for us to need JS framework

In my mind it seems that Frameworks, give our team a good starting point, documentation, a community and always the option to grow on top of the framework. Could some Framework users elaborate further?

EDIT 1:

Thanks to all of you for your great responses. I really did not think that this was going to be such a hot topic. I am glad I asked the question. I posted another similar question in the following link in case you might think you want to add something. The topic of the new question is CSS related. Thanks.

+7  A: 

Arguments against:

  • Frameworks prevent you from re-inventing the wheel
  • Frameworks generally contain well tested code
  • Frameworks are well supported by the community
  • Frameworks force you to focus on the business problem you're trying to solve

</sarcasm>

  • Frameworks may have a license you don't agree/can't work with
pb
+12  A: 

By your coworkers point of view, .NET and JAVA are for people who don't know enough assembly.

Frameworks exist for a reason. They allow you go focus on the problem instead of dealing with repetitive code. They allow you to be confident (assuming you use well tested frameworks) that certain pieces of your code are reliable and well tested.

If your coworkers are against frameworks, I would seriously consider moving on.

Cody C
Agree. Should this be an comment..instead of answer?
Surya
@Cody: I agree with you 100%, I am looking for the arguments against to obtain the whole picture of the two sided coins. I am really tempted to choose your answer as the answer, but I was hoping for the points against the idea.
Geo
+2  A: 

I liked the answer of pb +

Mainly for people that don't know enough JS

I believe it is too complicated for them, so they use this excuse. FW allows you to build much more complex applications.

Frameworks limit Javascript developers

bullshit

Frameworks bloat the actual development code with a lot of things that are not used.

what is it today extra 100k-200k? especially if you use the CDN versions (at google for instance). And this is assuming you use nothing in the FW.

Itay Moav
100-200 k? jq is only 26k down the wire when you use the min version together with gzip.
redsquare
This is the max, not everybody uses the min versions.
Itay Moav
+6  A: 

A few positives for javascript frameworks (like JQuery).

  1. They provide standardization in ui elements.
  2. Reduce time to develop complex interfaces and effects.
  3. Normalize efforts by providing functions that are already cross-browser compatible.
  4. Due to efforts in cross compatibility documentation is more useful in a framework as you can use the framework's api as canon instead of searching for obscure support for various/proprietary javascript functions.
  5. Reduced learning curve for new developers making them productive on your software quicker.

I completely disagree that a framework limits javascript developers. Quite the opposite actually. Most frameworks provide extensive plug-in mechanisms where the framework can be extended using raw javascript utilizing hooks in the framework itself.

Ikarii Warrior
jQuery makes working in JavaScript actually pleasant. The capacity for high-level construction of manipulations, effects, etc. allows the programmer to focus on the desired interaction rather than the minutiae of JS and browser compatibility.
Michael E
Exactly. Well said.
Ikarii Warrior
+2  A: 

An argument against libraries is BROWSER SUPPORT most libraries support only a subset of browsers out there . Here is an example of BBC rolling out their own instead of using something like jquery .

Surya
you have an example?
pb
perfectly a valid reason ..why downvote ?
Surya
I agree, if you need to support some really way-out browser, frameworks might not be the best choice. That being said, they often realistically support just the right browsers.
deceze
Glow (from the bbc) is an option. They decided to move away from jQuery as they had to support some real legacy clients. The lib is very similar to jQuery.
redsquare
+6  A: 

Since no one has mentioned it - a Javascript framework rapidly becomes one more project dependancy, and in general terms, dependencies are bad as they represent points of failure.

As for this:

  • Mainly for people that don't know enough JS

Without elaborating, I will say that if one of our team said something like that in my presence, I would try to shrug it off as a joke. If I thought they were being serious, I would probably have to kill them.

And as for this:

  • Frameworks limit Javascript developers

That could translate to "Frameworks make it marginally harder to write spaghetti code, and that's what I do best"

Those are not arguments, they are excuses.

karim79
True as your point may be, a js library is no more a dependency than a stylesheet or image. This should never become an issue with a project that has been organized to treat js files as a resource similar to images and css. just my 2 cents.
Ikarii Warrior
@Ikarii Warrior - I'm not in any way opposed to JS libraries but in my opinion (and being a little pedantic) they do represent a point of failure. For example, a brand-new browser was released yesterday, and today management needs it to be supported. Relying on a community (or a vendor) for writing in support is, strictly speaking, a point of failure.
karim79
From the perspective of support, then yes it could be considered another point of failure and is certainly a valid point - I'm not trying to discredit your input. :) That being said home growing your own javascript does not protect you from new browser compatibility issues.
Ikarii Warrior
+1  A: 

There are plenty of good reasons to be suspicious of frameworks in general, balanced of course by lots of reasons why they are worthwhile.

I use jquery now, and frankly within an hour of learning it realised that it fits the job so well that if it didn't exist I'd only end up reimplementing something very similar myself, only it wouldn't be as good or as cross platform.

There isn't much bloat there, it's very small and well designed and does nothing at all that stops you writing any javascript you want for specific cases that don't fit your needs.

John Burton