I
I
Illia T2019-02-07 01:21:15
Bootstrap
Illia T, 2019-02-07 01:21:15

Bootstrap-Vue - What is the feature of this symbiosis?

The other day Bootstrap-Vue loomed on my horizon. Please tell us about the technology, and the more deployed, the better.
It will also not be superfluous to evaluate the technology: pros, cons, is it worth working with it at all ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Volintsev, 2019-02-07
@illiatovpeko

Please tell us about the technology, and the more deployed, the better.

So you wanted to make a SPA or PWA website with your favorite layout based on Twitter Bootstrap and your favorite Vue library. Made up. Popovers don't appear, dropdowns don't drop out, modals don't open, forms don't validate, clicks don't work.
The original Twitter Bootstrap has support for Javascript interactive elements. Implemented in the jQuery library. If you do it on Vue, you will also have to include jQuery, which is an extra library for 100+ kilobytes , which, of course, is not a disaster (as long as you are not on a mobile phone).
Vue works with states and binds data to the view, while jQuery works with DOM and events. It 's a performance issue. JQuery's job starts when JS and HTML are loaded and parsed. The work of Vue begins at the moment when JS is loaded and parsed, that is, a little earlier. jQuery modifies the DOM on the fly, rebuilding the current document. Vue works with the shadow DOM and then slips a ready-made interactive page into an empty document, which is faster ( a difference in seconds on desktop, tens of seconds on m... ).
Vue implements the component paradigm . Page chunks are isolated pieces of code (HTML CSS JS) that are dynamically linked and exchange data through attributes and events. Suppose you decide to follow the component paradigm, then according to this exampleyou will need to link all the interactive components yourself. Button component. Input field component. Form component. Container component. It turns out about 50 components. For some it will be necessary to write logic in jQuery. If you look at the jQuery code of these microcomponents, it turns out to be simple, it is quite possible to rewrite it in Vue. Well, there is a class to replace or a click to work out. When there is no trace left of the jQuery code, it can be removed from the project.
And here it turns out Bootstrap-Vue
The components were beaten. Get rid of jquery. Written in a single paradigm. Works faster.
We add the fact that in Vue you can not import components that are not needed (for example, I do not work with dropdowns and modal windows) and the code becomes smaller, loads faster, works faster.
Study it yourself and compare. Skills and experience are not transmitted by airborne droplets and via the Internet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question