Main > stdout.in Ievgen Kuzminov IT blog

Posts by tag : template

Why I don't like HTML surrogate template engines

Preamble

Mostly it is about template engines (that hide away real HTML) in Ruby (as due to app runtime specific it is very easy to add pre-compiled "sweets" there, and everybody do it). But in general such tpl engines could exist in any server side language.
I don't like DSLs and abstractions that lead me away from the "origin". Ok, a careful reader have already got what will I write further :)
This post is not about "stop using it" or "it is bad", it is about "reconsider is it really so useful".

Let's start with examples

This just a small subset of all existing engines, that I have herd of, just to have an examples. Each language has it's specific, but mostly script web languages are good template engenes by themselves.

And I am really absolutely fine with most of them. Except those that force own HTML-replacement surrogate (it is Slim, HAML or JADE like).

 body
    h1 Markup examples

    #content
      p This example shows you how a basic Slim file looks like.

      == yield

      - unless items.empty?
        table
          - items.each do |item|
            tr
              td.name = item.name
              td.price = item.price
      - else
        p
         | No items found.  Please add some inventory.
           Thank you!

And now I'll try to explain this...


Read more ...

Notes by tag : template


Transphporm - CSS rules based PHP template engine with original approach.


Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


Linkify - jQuery plugin for finding URLs in plain-text and converting them to HTML links. It works with all valid URLs and email addresses



Remodal - flat, responsive, lightweight, fast, easy customizable modal window jquery plugin with declarative state notation and hash tracking



Giving a try to Ubuntu 14.04 - so far it's ok. More stable and refined. But it seem to have problems with Cinnamon 2 installation. Oh fine... will wait for Linux MInt 17 to use on my Work machine



Updated blog. Mostly "under-the-hood" changes according to latest Yii2 state, some CSS and server optimisations. In case of any issues please feel free to comment here