I love Shpaml! (HTML abstraction language)

I’m in love with the Shpaml language!

It’s an HTML abstraction language. This means it’s a simple language that can be used instead of HTML in web apps, and is compiled to HTML before being sent to the user.

The reason I love it so much is because it cuts down on a huge amount of code, and makes HTML feel a little bit more like Python.

For example, this snippet in Shpaml:

html body div h1 My title % block content p My text

Would expand to this HTML code:

<html> <body> <div> <h1> My title </h1> {% block content %} <p> My text </p {% endblock content %} </div> </body> </html>

Holy shit, that’s an incredible amount of code saved! For the above snippet, we’re talking about 44% less code! (Not counting whitespace.) On an average day I would kill for anything that shortens code by as little as 5%, so you could imagine how excited I am about reducing the size of code by 44%.

Of course, the problem with Shpaml, as with any HTML/JS/CSS abstraction language, is that most developers would be surprised to find it in your project and may be a bit uncomfortable with editing it. But hey, for 44% less code… I’m willing to pay that price :)

Get Shpaml for Django here.

Ram Rachum I’m a software developer based in Israel, specializing in the Python programming language. I write about technology, programming, startups, Python, and any other thoughts that come to my mind. I’m sometimes available for freelance work in Python and Django. My expertise is in developing a product from scratch.

Newer post · Older post