Erwinstein
Erwinstein

Reputation: 49

Creating a Website with Polymer and Twig

I am a not-so-newbie Web Developer. I can write websites using HTML5, CSS3, JS, and PHP.
Now I am working on a school project but I am very much unsure how I will proceed.

I want to use Material Design on my project, so I came across Google's Material Design Lite.
It was good. But was inadequate for my project (which is a responsive website). So I came across with the new Polymer 1.0 and saw the Paper Elements components with it which offers more components that I need.

So here's what I'm unsure about.
Can I use Polymer Elements with Twig?
I know about the issue with the data binding markup in Polymer being the same as the output tag in Twig (here) and its not bothering me anymore. My problem is, will it be recommended to use Polymer and Twig? I'm unsure because I saw an article about Twig being "dead" because of web components. And for me it implies that the two have the same use cases and I will not be able to use it both. Is that right?

[Edit Start]
I saw that Polymer (or web components to be exact) are much like templates in a way (as I'm reading tons of things earlier but forgot where). So will I have problems because I'm using Symfony?
[Edit End]

I'm also interested with Polymer's Elements only and I think (for now) that I will not be creating my own components. Also, I'm using Twig with Symfony (if that information will help). I'm seriously stuck.

Thanks!

Upvotes: 0

Views: 761

Answers (1)

SergeAx
SergeAx

Reputation: 542

As I understand, Polymer is not supposed to serve as a front-end template engine. It is a library/framework by itself, and its components are designed to receieve data from backend via AJAX calls. You can code backend for Polymer at PHP, but I don't see a place for Twig in this scheme, unless you want to pass blocks of HTML code via AJAX from your backend to Polymer, which is against Polymer ideology.

Upvotes: 1

Related Questions