Ask HN: Are there any design-led frameworks out there or should I create my own?

15 points by johnnycage ↗ HN
Hi everyone. Wondering if you could help me, or at least have a discussion on templating systems that are design-focused. We are creating a 'sitebuilder' app for a niche and we've created our first app, which has one template. We have decided to allow people to create designs for the system, but this will mean having a templating language. We've looked at others - from Wordpress through to Shopify - and most seem to use one that they have home grown. I am wondering what peoples experiences are?

1) Would you create your own template system as Shopify has done? (http://wiki.shopify.com/Theme_from_scratch). I see the downside of this that every designer will need to use your specific 'language' to create themes/designs

2) Are there any templating languages out there that you would use or recommend. I've looked at language-specific ones, but most of them are focused on coders and not designers. At the moment we have most of the app coded in PHP, but we are moving slowly towards Python, so it would be great to have a templating system that we can use for both

I'd be really interested in what people have to say about this and if they use any solution or what their opinions are

Thanks in advance

John

11 comments

[ 3.8 ms ] story [ 553 ms ] thread
Good question, and this is an issue I'm thinking about, though due to the needs of the project was leaning toward option 1. Was thinking about doing it in a way that no text editing was possible, but that users would have a wide variety of controls they can twiddle to customize ten look and layout of ten pages.
Well, I've been researching this for 2 days now also, so once I've completed this and see what everyone suggests on here I'll post my findings for everyone to see
Are you thinking of having a library (or even market) of these designs, or is your goal more to allow each site builder to personalise their site in fine detail?

If you are thinking of the latter, or both, maybe you should consider having a couple of layers of customisability. It would be nice to allow simple customisations (colors, logos, even basic layout) without getting into templates. Perhaps with a GUI, but possibly even just something standard like CSS. Even as a technically minded person, I would balk if I had to learn some custom syntax to achieve things like this.

Then underneath you could have a full templating system. If users want full control, they should understand it will come with a learning curve. Even for this, consider starting from a known base (e.g. Django templates), and just building convenient constructs that fit your site (e.g. custom tags for common tasks).

The primary goal initially is just to allow people to seriously alter some provided templates or to create their own, so I had not planned on having a marketplace/library (although hopefully this would come out of it). I have a lot of respect for what people have done with the Shopify templates, but I am cautious about rolling our own on the basis that it requires someone to learn it. I was looking for something that might be more widely adopted and used by a few apps (Mustache mentioned in here looks interesting and I'll check it out).

In terms of customiztion with colours, logo etc - we have this already based on CSS. People can pick different colors through a color picker etc and that works well, but I want to two-tier it (as you have suggested) and allow power-users the flexibility to create their own

Thanks for the reply though. Really appreciate it

I've been building Shopify themes for the last couple of years. Part of the reason that I've stuck with it so long is that Liquid is really easy to learn. I'm of the opinion that anyone capable of understanding a for loop and if statement can learn the basics of Liquid within a day.

I know there are a few other apps that use Liquid, including one of your competitors. See here for a list: http://github.com/tobi/liquid/wiki

From an end-user perspective, I'd highly recommend Liquid. I don't see how you can escape having a template language of some sort, and Liquid seems more thought-out than most.

I thought Liquid was created by Shopify, so apologies for that! Didn't realise it was available for others to use. It seems that its just for Ruby / RoR though? We currently use PHP and Python
Sorry, for some reason I just assumed you were using RoR.

Liquid was created by Tobi (CEO) for Shopify, and then extracted as an open source project. It was inspired by Django's template language. Since you're on Python, perhaps you could use the original?

How about Twig?

http://www.twig-project.org/

It can be nice for both designers and developers. The real advantage is the sandbox extension that can make it safe for use in a publicly themeable site,