Home » JavaScript (page 35)

JavaScript

Boot your ajax app: Creating a splash screen with NProgress

While single-page JavaScript apps tend to be more dynamic and usually more interactive from the user point of view, they also most often have a longer startup time compared to more classic, server-side rendered apps. That’s usually where progress indicators and splash screens come into play. Obviously, the focus should clearly lie in optimizing the startup time to the maximum ...

Read More »

Things I learned creating a jQuery Plugin (Part II)

This post is the continuation of the series Things I learned creating a jQuery Plugin. In the first part we have seen how the structure of a jQuery plugin must be, the plugin entry point (so called wrapper function) and how we can control the behavior of a method as a getter or setter. Define default options Your plugin more probably will accept ...

Read More »

5 nifty JavaScript tricks that you may not know

Over the years, I have seen several JavaScript techniques that are particularly clever. Here’s a short list of 5 such techniques that I have been using again and again. I hope it inspires you too to rethink how you write certain piece of code. And, please note that some people may think clever coding impacts readability and they might be ...

Read More »

JavaScript Closure – examples

Earlier, I talked about the basics of JavaScript Closure. In this post, lets continue to explore Closure with the help of some practical examples. Before we begin, just to recap, Closure encloses function and the set of variables that were in scope of the function when it was declared. The variables inside the closure kept alive as long as the ...

Read More »

JavaScript Closures

Closures are very important topic in JavaScript that you must understand if you want to master the language. The earlier you know about Closures, the better you will write your JavaScript code. But, from my experience, most of the JavaScript beginners either do not understand Closure or do not know that the existence of the topic at all. So, in ...

Read More »

Getting a new node project started with npm

The aim of this guide is to get people getting started with Node.js and npm, while also showing some of the handy commands I use to bootstrap my projects.           Create your project directory. Change to the directory you just created. Tell git to make a repo. Pull down a preconfigured .gitignore file for node projects ...

Read More »

Javascript Prototype methods vs Object methods

In JavaScript, when you define an object, you can attach it’s functions in two different ways. Inside object’s constructor function, using this.func = function(){...} Using prototype. i.e. Obj.prototype.func = function() {...}. In both approaches, the function func() will be accessible to all the instances of your object. But which one is the best way to use? In short: Use prototype ...

Read More »

A canonical web test in NodeJS

Working with web applications in NodeJS is great. Using the same language and libraries on the client and server simplified the thinking. And NodeJS has fast tests and restart for a super quick edit-verify cycle when you’re coding. I like to write tests to verify the server-side and client-side logic, but do you know that the whole solution really is ...

Read More »

Integrating Node.js with a C# dll

Recently I had to integrate a Node.js based server application with a C# DLL. Our software (a web-app) offers the possibility to execute payments over a POS terminal. This latter one is controllable through a dedicated DLL which exposes interfaces like ExecutePayment(operation, amount) and so on. As I mentioned, there is the Node.js server that somehow exposes the functionality of ...

Read More »

Things I learnt creating a jQuery Plugin (Part I)

jQuery is one of the most used JavaScript libraries, if not the most used one, which allows to make great things with the big set of little tools it offers to the web developers: HTML/DOM manipulation, CSS manipulation, HTML event methods, effects and animations, AJAX, utilities, … One of the key aspects of jQuery is the possibility to extend it ...

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