Skip to content
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design
Blog Web Dev Handlebars Just Adds Bloat and Complication

Handlebars Just Adds Bloat and Complication

By Forrest Smith - Drempd.com

I kind of like Handlebars for templating, but more and more, I think it’s just makes the codebase more bloated and complicated:

My problems with handlebars:

1. I can’t just use my existing javascript code. For instance, I have an existing function to format a phone number, but to use this within a handlebars template,  I have to write a “Helper” to utlilize the function code (which basically just wraps my existing function). This is extra code that shouldn’t really be necessary, adding to the code base, adding a layer of complication, and requiring extra time to build and maintain.

2. Functionlity is limited. I know it’s by design, but I want to be able to write more complex if statements, switch statements, etc.. I can write helpers for this purpose, but then I am just basically rebuilding functionality that already exists within javascript. This adds additional unnecessary code and additional things to maintain. I used the comparison helper from this site (http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/) for a project.  It’s a helpful piece of code, but this functionality already exists with straight javascript.  I then wanted to make more complex statements (like “if (x==1 || x== 33), which would require additional work on adding functionality to the helper. Without the ability to use things like the “or” statemtent above, I have to write more handlebars code (separate if statements), which just adds more code to the site that isn’t necessary.

Posted on May 21, 2015August 26, 2022 in Web Dev
  • Adventure

    • adventure
    • gravelgrinding
    • hiking
    • running
  • The Built Environment

    • architecture
    • urbanity
  • Locations

    • san diego
    • portland
  • Freelance Life

    • freelancing
    • productivity
  • Web Dev

    • css
    • entrepreneurship
    • git
    • handlebars
    • html
    • inkscape
    • photoshop
    • php
    • sass
    • web design
    • web development
    • saphire

drempd | san diego, ca


home contact

adventures san diego urbanity and architecture projects stream website design

portfolio resume san diego web design freelance web designer

custom web design responsive web design website maintenance