V
V
Vladimir Balin2015-03-05 11:23:26
BEM
Vladimir Balin, 2015-03-05 11:23:26

Clash of the Titans: BEM vs Twig or is Twig not the same anymore?

I can’t understand, but is there any benefit in using BEM if the server part on the symphony works on PHP? For me, Duck BEM has not brought anything new to front-end development methods. The same twig is much more understandable.
What do you think?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
kompi, 2015-03-05
@kompi

Why compare methodology and template engine?
Roughly speaking, a template engine can be part of a methodology, but not vice versa.

V
Vladimir Balin, 2015-03-05
@krocos

I mean the Twig methodology - redefining and inheriting blocks, connecting blocks to templates ... No need to compare cutlets with socks here :)

K
Kirill Saksin, 2015-03-05
@saksmt

If you find a sane integration with symphony, write, but in general it is not necessary!

A
Alexey Pavlov, 2015-06-17
@lexxpavlov

It seems to me that BEM can be used in symfony along with Twig, not instead of it. This is the case if BEM is considered precisely as a methodology for separating and naming elements, and not using command line tools . BEM does not conflict with Twig, and Twig does not conflict with BEM, they are about different things. After all, Twig doesn't manage CSS at all.
But personally, I didn’t do BEM normally, for me BEM is just a methodology for organizing CSS. If it's much more than just CSS, then that's another matter.
Using BEM instead of Twig will not work, because in any case, you need to pass parameters to the template from the controller. Now, if you only have a REST service, then you can do it without Twig (it is not needed there), but in this projectBEM is also not needed, it will be moved to another front-end project.
So, the battle of the titans did not pass, just as a battle between a chess player and a boxer is impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question