Answer the question
In order to leave comments, you need to log in
Is it convenient and practical to use template engines (Jade, etc.) in small projects?
I've been doing front-end for a long time, but not so long ago I started using Gulp to build projects (building and minimizing styles, scripts and html mostly). It made it very easy to work with styles in small projects. I optimized my work with styles, so to speak. Now I'm thinking about optimizing work with html. Layout mainly has to be done for online stores, catalog sites, and less often for business card sites and the like. I read a little and watched a video about Jade (this is the first templating engine that I started to study), not all aspects of working with him (or her) are clear, but it can be disassembled.
I'm mainly wondering how easy, reasonable and convenient it is to use template engines both in simple projects (such as business card sites, etc.) and in more complex ones? In more complex, online stores, layout of a list of goods, for example, or similar components, is required, where the duplicated structure of some site components (elements of goods in the list), which is not very convenient to do manually or by copying, can be optimized through a template engine. And what about some single and small components (a button, a form, or some block that occurs only in one place on the site) or the layout of small sites, is it convenient to do them using template engines?
Answer the question
In order to leave comments, you need to log in
Specifically, in the case of Jade, it is very useful in projects of varying complexity.
With a relatively low entry threshold, it greatly simplifies and speeds up development.
Although if this is a site with 3 pages, then emmet can handle it)
Small ones are not comfortable. In big ones, yes.
For small ones, you can use the gulp-rigger plugin and include pieces of code with such a construction. //= nav.html
I don’t use HTML templating engines in my work, I manage this plugin for large projects as well. I prefer emmet. And for me personally, it's much easier to see the familiar syntax than to memorize another one and, in addition, all sorts of mixins and template engine functions. There are enough of them in CSS preprocessors.
It's time for you to get familiar with Web Components. All your duplicated structure and light modifications are solved in a very trivial way by banal component inheritance. This allows an unprecedented increase in the amount of reusable code and reduce the complexity of maintenance. Template engines are not needed in principle as a class.
Well, my engine itself builds the project, taking into account dependencies, it takes a couple of tens of milliseconds to do it once after the changes, so you can use it directly in production, so I also don’t have the project build stage as a class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question