HTML5 Game Development
   
  • HOME
  • News
  • Tutorials
  • Engines
  • Demos
  • Tools
  • Partners
  • Mobile HTML Game
  • Guess The Celebrity
  • About us

PugJS and Handlebars.js – Template Engines for NodeJS

Template engines for NodeJS are known for making the lives of the developers easier. Notable examples of a template engine are PugJS and Handlebars.js.

Basically, they can make a cleaner-looking syntax without having to deal with the complexity of HTML and JavaScript codes. The codes will be easier to read, and thus, there will be less hassle on building websites.

However, these two obviously have their own strengths and weaknesses.

PugJS and HandlebarsJS Syntax

PugJS is open source and has a very clean paragraph-like syntax. It has a great compatibility with NodeJS. Thus, it delivers high performance on both server and client side. Documentation is also easy to follow for those people who would like to try this engine.

Developers who would like to use PugJS need to convert HTML codes to PugJS’s syntax first. This could be a problem if one developer does not want to use PugJS at all. The syntax is whitespace sensitive as well. Hence, indentation errors are common since developers have different styles.

Handlebars.js is also open source, and its main focus is to help developers create a semantic template. In short, it is a logic-less template engine since you cannot run a JavaScript inside the created template. Developers can even precompile the templates to lessen the load on the client so it can run smoother and faster. It is also highly compatible with Mustache.js.

Documentation for Handlebars.js can be confusing, especially for the beginners. It may not be also compatible with AngularJS or other frameworks that have its own template.

There you have it! These two template engines are actually both great, with minimal to no problems whatsoever.

Check out PugJS here, and Handlebars.js here, respectively.

 

Share List

You might also find this interesting:


  1. HTML5 Game Development Facebook, Twitter and G+ The official HTML5GameDevelopment.org Facebook page up at: http://www.facebook.com/Html5GameDevelopment The official HTML5GameDevelopment.org Twitter account is at: https://twitter.com/#!/gamedevhtml5 The Google Plus page is up at: https://plus.google.com/b/106608051085232600929/ All are updated automatically via the...

  2. Quintus Engine The Quintus engine is a simple HTML5 game engine designed to be modular and lightweight, with a concise JavaScript-friendly syntax. ...

  3. Facebook HTML5 Game Development Page Facebook has a great page on Game Development. It provides links to a number of excellent posts on 2D development as well as some notes on available engines. The page...

  4. Developers Can Now Monetize Instant Games on Messenger Good news for developers who want to launch their games on Facebook. Monetization options are now available for Instant Games on Messenger! In a statement from Facebook product manager Mike...

  5. Mozilla Labs releases Minimalist HTML5 Game Template Mozilla Labs has released a barebones HTML5 Game Template that helps developers get started faster and deploy quicker. It’s not game-engine specific, but includes dependency management via volo to pull...

Framework, markup language, NodeJS, template engine
HTML5 Engines

License HTML5 Games

Are you a company looking to license HTML5 games? We recommend MarketJS.com, a B2B platform for licensing games.

MarketJS has over 300 HTML5 games for licensing. They also provide additional services such as game reskin, custom development, and white label portals.

Html5 Game Development


Follow @GameDevHTML5



WHAT’S NEW

  • GPT3 Voting Board

  • Game Localization For Food Delivery App

  • HTML5 Games in Guest Room Tablets

  • What’s New in Phaser 3.50

  • Particle and Sprite Editors in Babylon.js 4.2



NEW DEMOS

  • Vertical Platformer Games Using GDevelop

  • HTML5 Games for HR Technology

  • Building Vertical Platformer Games using Kaboom

  • Vertical Endless Runner Prototype

  • Particle and Sprite Editors in Babylon.js 4.2


ENGINES

  • Vertical Platformer Games Using GDevelop

    Last time, we introduced GDevelop as a viable option for no-code game engines. Now, let’s try building vertical platformer games using GDevelop. GDevelop comes with two behaviors to build platformer …Read more

  • Best Practices in Building HTML5 Games

    As the saying goes, “Quality is always the result of intelligent effort.” This timeless quote by John Ruskin summarizes most of the best practices in building HTML5 games by today’s …Read more

  • GDevelop – Free and Easy HTML5 Game Engine

    If you are looking for a free and easy HTML5 game engine, check out GDevelop. This game creator is designed to be used by everyone, with its no-code, open-source, free, …Read more

SEARCH OUR ARCHIVES

CONNECT

rss twitter

HTML5 Game Development is proudly run by 3P Solutions Inc

GOT NEWS?

Send new engines, demos, information and tips to hello@html5gamedevelopment.com

MONTHLY MEETUP

In boston? Join us for the Monthly HTML5 Game Development meetup.

BOOKS

We're in the process of writing a few books about game development. Coming soon!

Copyright HTML5gamedevelopment.com