I
I
iki2015-03-22 15:22:14
JavaScript
iki, 2015-03-22 15:22:14

DOM or framework?

Hello!
I wanted to ask people experienced in js.
Interested in questions: Do you often have to use DOM in the frontend or is this not a relevant thing now, but are frameworks used to replace it? What is the approximate percentage of DOM usage in JS frontend in your projects?
Thanks

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
Nazar Mokrinsky, 2015-03-22
@iki

They are not a replacement, but a help. At what there are different approaches - there are wrappers that simplify interaction but slow down work (jQuery), there is another approach when a virtual DOM is used and modifications to the real DOM are minimized (ReactJS, Polymer 0.8+).
I often use jQuery, but since it doesn’t work perfectly with shadow trees even with patches, I have to manually climb the DOM. But you need to understand how it works in any case, what with frameworks / libraries, what without.

P
President42, 2015-03-22
@President42

Do you mean "should I use the DOM"?
All client-side JavaScript is focused on DOM operations, otherwise what's the point?

S
Sergey, 2015-03-22
Protko @Fesor

How often do you have to use DOM in frontend

Yes, often, in fact, always. And it doesn't matter what tool or framework you use - to know how the DOM is structured, what affects performance, etc. you simply have to.

K
Konstantin Kitmanov, 2015-03-22
@k12th

Working directly with the DOM makes sense either if you are doing something very small and at once, or if you are trying to squeeze out every crumb of speed that is possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question