Using multiple Javascript frameworks in a project?

It’s good or good to have several frameworks in the project, or it’s bad because it becomes cluttered (= clutter) and the load time may be longer. Does it really matter 100 K? Or should you stick to one?

+3
source share
4 answers

As a rule, it is better to choose one thing and stick to it for a number of reasons:

  • Fewer dependencies.
  • Lower complexity.
  • Easier to maintain.
  • Faster loading times.
  • Chance of dependency conflicts (i.e. jQuery cannot conflict with your other Javascript framework if you only have one).
  • Reduce debugging time.

, ~ 50k , , . , , 50- . , .

, Javascript, , , , . , X , , Y, Y.

+11

javascript , , .

, , javascript.

, , . .

+2

- , , , JQuery, . , mootools, - , , , .

- , , . , , , .

:)

PS. gzip etags , -, js- , facebook, meebo ! -. , yahoo! . http://developer.yahoo.com/performance/rules.html

0

, . , ; , .

For example, using jQuery, a lot depends on the identifiers of the user data key, which the library adds as attributes to element nodes. If you start messing with the structure of the document by cloning, adding / removing, etc. From another structure (or even simple DOM methods), these identifiers are not as unique as jQuery expects; it can easily get confused and end up failing to call event handlers or disable errors. It is not very convenient to debug.

0
source

Source: https://habr.com/ru/post/1726617/


All Articles