What are the arguments against using a JavaScript

2019-03-20 21:05发布

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.

9条回答
Fickle 薄情
2楼-- · 2019-03-20 21:30

I'm surprised no one has already mentioned it:

  • A lot of web developers default to using JQuery without considering the alternatives
  • And end up including it on a web page to do a few trivial tasks which could easily be done in pure JavaScript
  • The result is that users have to wait for the whole library to download and it slows down web browsing

Also:

  • Some web developers get carried away with the design of web pages, and end up developing unnecessarily complex web pages because of the power of JQuery
  • Just because JQuery enables you to create scripts with good cross-browser compatibility it doesn't mean that the end result is usable on different devices / interfaces
  • I'd also argue the cross-browser compatibilty because I've seen instances of webkit not playing well with JQuery
  • JQuery encourages "fast" scripting - but if you rush it you are likely to have missed something out
  • Writing in JavaScript from scratch is slower - but I believe that you end up with a more complete solution which more closely matches the users needs
  • Using JQuery can shift the focus of the web developer to creating web sites which are highly graphical and visually appealing, whereas the focus should be on functionality and usability
  • JQuery is not a silver bullet for web development

I am biased here because I don't use JQuery, but it is because I haven't found a need for it yet - maybe it's because I focus more on usability and functionality rather than making the user interface look pretty (sorry I know JQuery can do more than that).

查看更多
forever°为你锁心
3楼-- · 2019-03-20 21:33

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.

查看更多
做自己的国王
4楼-- · 2019-03-20 21:36

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.

查看更多
登录 后发表回答