Posted on September 21, 2012 // Short URL

Jen Lampton and Twig in Core

Join Addi chats while she chats with Jen Lampton about her Drupal history, her current work in Drupal 8, and big, scary animals. Jen is leading up the charge to get a new theme system into Drupal core, based on the Twig template engine, so we talk quite a bit about what that means, how it would change Drupal, and how everyone can help make it happen.

Podcast notes

BADcamp (Bay Area DrupalCamp) (Nov. 1 - 4, 2012 in Berkeley, CA, USA)
Jen's Panels video series

Gettin' Twiggy with it:
Twig template engine
Drupal.org Twig issue overview
Drupal 8 Twig Git sandbox
Twig IRC channel: #drupal-twig
Drupal Ladder Twig outline (lessons will be written soon!)

Jen's contact info:
Jen's contact page on Drupal.org
@jenlampton on Twitter

Comments

Add Your Comment

Matt1

Panels

You mentioned in the podcast a panels screencast from Jen. Where can I find that when its available.

Reply

Design Dolphin

Twig sounds like fun stuff.

Twig sounds like fun stuff. The ideas that Jen talked about could be a lot of fun.

I have to say the way Drupal 7 is working now I'm really Impressed. It just feels like a really polished product, with a beautiful finish.

These are four (of the many) things I learned working with Drupal:

1. When you start working with Drupal people point a lot of times to views and panels. It is critical in my experience though that you have a good understanding of panels before you work with views. That can save you so much headache (Things like how do I use multiple vocabularies and terms with different data sets and layouts when I have a view set to /taxonomy/term/%????).

2. Working with (learning) Drupal to me felt like like riding a bull to go do china shopping while juggling chainsaws while planning how to launch a rocket into space.
If you know what you're doing you'll have a blast, total amazement with that life is so beautiful that it can have such wonderful things. Life could not be more beautiful. You could not be more cool. This could not get better.

Get stuck, and well, I'll leave that to your imagination.

3. You can get in a real bind if you get stuck in the forums posting something which nobody replies to, and you don't know ( how to phrase) what you're looking for. It can take awhile before you solve it, as well as the risk you mentioned of people abandoning it. What helps is when you write the solution when you fix it, because more often than not somebody else is having the exact same problemen sooner or later. So if everybody writes their solutions, which is what you're seeing and is absolutely great, then it enhance the workflow and overall satisfaction.

4. If you're planning a project with Drupal, and there are parts which are unknown plan adequate time to accomodate for that. It can at time be really difficult, especially at a beginning stage, to understand and solve the problem. Although I do have to say that the documentation is getting better, and people have really stepped up to improve things. Which is great to see.

Having said all that, having worked with Drupal since Drupal 5. Drupal 7 is a huge leap forwards, even from 6, and an amazing bit of kit. Really impressed by the effort and work everyone put into it. My compliments.

Reply

Design Dolphin

Let's hope for the best, but there are some real worries

One real concern with using Twig is that if Twig is just used instead of PHPtemplate than it doesn't fix the underlying problem: the complexity of theming in Drupal. Luckily other (front-end) developers share this concern. People really taking an interest in making the theme system easier to work with. So hopefully some progress can be made on this.

I also have some doubts as to the syntax of Twig compared to other template engines. Especially when it introduces drupalisms to the Twig syntax. Although I hated Twig at first, and although I'm still very much on the fence, Twig looks pretty interesting, there was definitely some thought put into it. Nonetheless still not sure if this is the best solution for Drupal (as is) .

Knowing Drupal, these debates, although heated and unreasonable at times, always have led to improvement. Let's hope that trends continue, and the workflow smoothes out.

I was really impressed with Drupal 7, until I ran into all kinds of bugs, and theming being so hard. If you are on a Drupal 6 version, I would really consider waiting with upgrading. This depending on your use case.

I have stopped using Drupal for now. I can't afford and don't have the time to have to relearn the system again. Drupal has become to time consuming This was something I did in my spare time, and I have other obligations. From what I understand from a tweet from Dries, version 8 will have a learning curve for those who know Drupal. You know you come to the point, where you're just like what's the point of learning this. Maybe in the future when Drupal has stabilized.

I wish all those working on this all the best. Have fun! :-)

Reply

Joe Hoeller | D...

Drupal & Twig

I am a front end dev that knows basic PHP; and at least enough to make templates, theme overriddes and theme functions in template.php etc... I see the advantages of Twig, along with the abstraction between the front and back ends - which does provide added security. Again, I see the numerous advantages, but I am afraid I wont be able to write advanced theme functions in PHP. Unless I am missing something, and you can still do that. But I am leary of the direction Drupal is going; twig reminds me of watered down PHP...much like Smarty Templates (which I despise).

I am looking for an explanation as to what I can do and what I wont be able to do - and if not, how I can do complex theming functions in D8.

Reply

Add Your Comment