Home » JavaScript (page 5)


Scheduling jobs on Node.js with agenda

There are many ways to schedule jobs in your application. A very common practice is to back our jobs with persistence. By doing so we will be informed in the future if the job did fail or succeed and when it should be the next execution. Agenda is a light-weight job scheduling library for node.js. It is backed with mongodb. It is ...

Read More »

RequireJS Optimizer Example

1. RequireJS RequireJS is an AMD JavaScript library that supports asynchronous file and module loading. It is optimized for web browser usage but it is also possible to use in Java or Node environments. It is compatible with all main browsers and quite intuitive to use. Its main benefit is that it offers the option to logically structure an application ...

Read More »

Javascript Frame Example

The aim of this tutorial is to describe and demonstrate using JavaScript to manipulate and interact with iframes, showing how to access and modify properties of the iframe element, how to communicate with the document inside the iframe, getting information from the iframe and passing information to it. Iframes, or inline frames, allow you to load separate HTML files into ...

Read More »

Basic JavaScript arrays reminder

I’m pretty bad when it comes to remembering syntax details for languages I don’t use every day, especially since I work with a few languages that use C-syntax and not just JavaScript. Also, it’s not the kind of details I want to spend a lot of time studying since this information can easily be found. In most cases, it’s easy ...

Read More »

Creating a hash in Node.js

Introduction We require hashes everywhere, like setting the password in database as hash instead of plain text password, to check whether if file is tampered or not during transmission or checking integrity of file or messages transferred over network, etc. This small article will give detailed look at creating hash from Node.js core crypto module and later in the article, it shows how ...

Read More »

Lazy inter-module communication with require() and webpack

Motivation CommonJS’ modules can be loaded on demand with require.ensure(…). Example: require.ensure(["module-a"], function(require) { var a = require("module-a"); // module-a can be used now ... }); The well-known module bundler Webpack supports this syntax for loading modules on demand. Such lazy loaded module(s) define a split point. Split points split the codebase into “chunks” (separate JavaScript files) which are loaded on demand. This ...

Read More »

First steps with Angular 2: 8 cool features

I’ve been doing some work the last couple of weeks with Angular2. I really like it. Not just because it uses typescript, but also because it feels really natural and straightforward while working with it. No more string based dependency injection, or strange digest cycle stuff, it just seems to work. This last week I’ve migrated our beta-13 Angular app ...

Read More »

Javascript Timer Example

The aim of this example is to explain the timing events in javascript. The javascript window.setTimeout(function, milliseconds) function is used to execute a function, after waiting a specified number of milliseconds. This method returns a timeout id. Notice, setTimeout and window.setTimeout are essentially the same, the only difference being that in the second statement we are referencing the setTimeout method ...

Read More »

ES6 and beyond – What i really like

Hi dear software companions. It has been a long time. A lot had happened in between. I even changed a residence :) But enough about me. Let’s talk some JavaScript. Recently i have read a book called You Don’t Know JS: ES6 & Beyond written by Kyle Simpson. I was fully overwhelmed with the amount of new features and syntax shortcuts (or ...

Read More »

Angular.js Single Page Application Example

Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it’s incomparable in providing us with the means to create dynamic and efficient web-apps. There are a number of useful features that have made Angular not only famous for, but also irreplaceable in web-developing. One of these features ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook