Flooding DOM by using HTML templates

Photo by Irvan Smith on Unsplash

Some time back I’ve discovered and started to use an amazing feature of HTML 5: templates. If you never heard about it – you definitely should visit HTML 5 Rocks website to read about pros and cons of these functionality. But anyway this post is not about feature itself, but about some pitfall, which I’ve faced after some time.

So, let’s imagine, that you are going to write some page with a dynamic content, which will be generated by using some AJAX calls and templates mechanism. For example you are not satisfied with slow data-binding from existing frameworks (all of them are too generic) and you developed your own data-binding with blackjack and… anyway, you have some HTML:

Continue reading “Flooding DOM by using HTML templates”

Getting started with Grunt

Currently I’m studying new development process for my project and I’m learning the Grunt automation tool for this purpose. I want to share some basic knowledge about Grunt configuration. I’ll assume Windows OS, but you can use Grunt on Linux-based OS as well. Let’s start:

Continue reading “Getting started with Grunt”

Some words about == and ===

Photo by Irvan Smith on Unsplash

When developers starting to write the code on JavaScript I’ve noticed, that they are using “==” (I’ll call it equal), but not “===” (I’ll call it identity) most of the time. Probably, you will not see any difference most of the time, but one day you’ll get a very interesting error and probably you’ll spend a lot of time, trying to resolve it.

Let’s take a look at the details:

Continue reading “Some words about == and ===”