The this keyword in javaScript.

Every javaScript developer that runs a blog ends up writing at least one post on the this keyword. The operator that is the this keyword it is just something that all of us get to sooner or later it would seem, so I thought I should get this one out of the way quick, so I can get to writing about more obscure and uncovered aspects of the JavaScript language.

There is all ready a great many posts on this subject of the this keyword, and in many respects this is just yet another post on the same things that are well covered elsewhere. Still if I am going to make yet another one, I should take the time to try to do it right. Also there is a lot to cover when it comes to the this keyword and all the possible values it can be depending on the situation, so maybe this is one of those topics where although there are a great number of posts on the subject there are few whole manage to to the topic justice.

A lot of developers hate the this keyword because of its dynamic nature, even going so far as to avoid using it all together by taking a more functional approach to things rather than developing classes.

Read More

Node.js powered image processing thanks to Jimp.

As of late I have touched base on how to go about setting up a gallery for a website, something that can be simple, or not so simple depending on how much thought you put into it. Lots of thoughts come to mind with this such as how to go about storing the images when it comes to the file system structure. Should they be stored as part of the sites structure itself? Should they be stored in a database, and accessed by way of an api or sorts? Should everything be developed and maintained by me, or should I look into what services are available for such a thing?

Read More

Nodejs hello world examples

I am sure I am not alone when I say that I love node.js, and javaScript. The ability to create complex full stack web applications with a single uniform scripting language for both the front, and back end is really changing things for the better if you ask me.

However there is much more to that also, nodejs can also be used for all kinds of general programing tasks. For example I like making all kinds of useful and interesting command line interface tools with nodejs that ca be used to create files, walk over a file system structure, and so much more I do not event know where to begin.

Read More

Node.js powered site generator Harp.

In the npm ecosystem Harp.js is a very minimalistic static site sever, but it can also be used to generate a static site in addition to this. So far I have been using hexo as my static site generator, but as of late I have been trying out some others that exist in the node.js world.

I have also made several attempts at making my own static site generator which at times seems like he best option if I really get into websites rather than anything else that one might develop with javaScript. So far I still do not have anything together that I would call production ready with this.

As of the last time I updated this there is still some activity on the harp.js git hub when it comes to support. Given that this is a very minimal static site generator, as long as the project is fairly solid, then a great deal of support might not be needed. One of the benefits of keeping thins simple and streamlined.

Read More