Thumb lukasz 6 or 7 Reasons To Use HTML Templates

Por:, en:


"To a guy with a hammer every problem looks like a nail"

To a guy who writes code, every problem looks like something that can be solved by writing code. Below I'd like to share my thoughts on why I believe its a good idea to use HTML templates.


Reason 1 - Cheap

I know you can build HTML for free, afterall your time has no value. Really? Often you can find a template that will cost you 0-20 dollars and even on the upper end its still cheaper than spending your time doing all the heavy lifting. Even if you make $1/hour you will spend more money (time) writing code from scratch than when you would have used a template. 


Reason 2 - Good Looking 

Given you're not a designer, chances are, you will not be able to come up with something that is simply striking. I'd go one step further, even if you're a designer, you may simply not know what is possible and what are the latest trends when it comes to building rich experience on the front end. 

With a template you know what you're getting yourself into. Someone has picked the colors, decided on typography, spacings, image containers etc, etc. And you can see from the result - he/she is a Pro. 


Reason 3 - Robust

We have to be honest here. Good HTML is more difficult to write than most of us think. Main reason is that you will have no controll what your guest will use to open your website. Will it be the latest version of Safari or Chrome on Mac? Perhaps Firefox on Linux? Maybe Internet Explorer 6 under Windows XP? Maybe it will be a mobile browser on Android (name of food here)? Who knows?

You may want to say: "Well, I don't care about users who come to my website using Android Brioche, that version is too old. " Fair enough, but will you be able to test the browsers you actually want to support? If you go for a decent template - someone has already done that for you. That is not true about every template, but the good ones are properly tested. 


Reason 4 - Fairly Fast

Yep, a lot of templates are actually pretty fast. Especially the ones not bloated with a lot of fancy animations or charts. Especially if you're just a beginner you will have a hard time to write faster front-end.

Reason 5 - Fairly Easy to Use

Ok, you have decided, you will give a template a try. How difficult will it be to use it in your website? It turns out, that even if you have competely custom back end it is pretty straightforward to implement a template over your Rails application. All you need to do is:

  1. Copy all the assets (css/javascript) into public directory using same data structure as the template. For example, if our template has 3 folders in the same directory with index.html: css, js, img - simply copy them as they are to your /public.
  2. In your config/environments/production.rb enable the option to serve static assets (everything in "public" is a static asset).
  3. Open your template HTML file and copy the parts that will repeat on every page into your app/views/application.html.erb - remember to put <%= yield %> tag inside. 
  4. Make sure that the links to assets are not broken. If you followed steps above, they shouldn't but just double check. 

Stay tuned, I will prepare a short screencast on how to do it soon. 

Reason 6 - You Can Learn

And you will be learning from actual production, commercial code. Code that has to be good enough to make money. Sure, there will be no helpful comments or detailed explanation. But come on, you can do it. Just poke around with it, try to break it, try to change it. You will have a lot of fun. 

Reason 7 - 6 Reasons Should be Enough

If you're still not convinced, I will stop trying to convince you right here. I won't be able to do it anyway :). You already know what's best. That design you have envisioned is so unique and no one has ever done anything remotley similar. In that case I'm left with nothing else but to agree that you have to write everything from scratch. 

Where to go?

I use (look at the HTML tab) but there are much more. Simply google "HTML templates" look at the reviews and pick the one that you think is good for what you're working on. 

Si tu Inicio de sesión Tu podrás calificar esto post


  • en: megna guduru escribió:



Tú puedes Inicio de sesión Comentar