A
A
Artyom2019-03-29 14:48:33
IT terminology
Artyom, 2019-03-29 14:48:33

Where is the line between layout and front-end?

Good day!
Interested in the opinion of practitioners about the appropriate use of tools like react, vue, etc.
Where is the line between the choice in favor of clean layout and front-end lib?
I practiced layout on the example of a layout with the result . And here, IMHO, it is clear that the front-end is an overhead.
But for example, I found a mock-up in the open spaces , also for practice.
If you approach the issue from the side, shake the skill - build on webpack, vanilla js, scss and let's go. But on the other hand, there are repeating elements, the same sliders from block to block - it would be possible to put the slider logic in the react HOC (this is with regard to the second layout). And in general, after working with react, I began to look better and see the layout as a set of components that can be reused, both in terms of logic and in terms of UI.
Thinking about a project in terms of components is convenient and simple.
And in principle, it would be more convenient to work with create-react-app or an analogue from vue than with building on webpack because components, imports, lazy loading are simple and understandable syntax, DRY, support from editors / IDE, scope for styles. (Of course, part this goodness can be added to the webpack assembly by throwing, for example, pug for "component", imports, but I personally don't like its syntax).
But is the power of such tools justified in this case, because more sources of these libs will be added to the assembly, which will increase the size of the application and add 100% dependence of the site on js?
Where is the line when you can/should get by with native tools to be less dependent on lib/framework/js and when is it necessary to use front-end libs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-03-29
@SaymonA

Where is the line when you can/should get by with native tools to be less dependent on lib/framework/js and when is it necessary to use front-end libs?

When you move from layout design to real tasks, such as the implementation of some service (social network, bank personal account, booking service, delivery service with a personal account, video conferences, etc.), then you will understand.
It doesn’t make much sense to pull front-end frameworks for layout of landing pages.
The second layout can be implemented in React/Vue as a beautiful single page application with client-side routing. There and hotel reservation and shop. Think not about layout, but about how you will implement such things as booking and a store. Then maybe an understanding will come why front-end development uses frameworks and where is the very line.
HOC is not used for this.
While you are making layouts and have not worked in real projects, it can be more convenient. And yes, create-react-app and its Vue equivalent use webpack under the hood.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question