Home » JavaScript

JavaScript

Creating Simple Component in Vuejs

Introduction In this article, we will look at creating a very simple component in Vuejs. Let me pick the example from my previous post and create a component for showing the loading message. Vuejs Component There are two ways to create Vuejs component Single file component (.vue file) – this contains the component HTML template, Javascript and CSS in a ...

Read More »

Creating Bootpag Like Pagination Component Using Vuejs

Introduction In this article, I will try to create a pagination Vuejs component similar to the one supported by jQuery Bootpag plugin. Component State The component should track the following: Current Page Callback to be executed page click Max visible page numbers Start and end of the range of page numbers visible Component Event Handlers The component handles 3 events: ...

Read More »

Secure Your Node.js Website with OpenID Connect

“I love writing authentication and authorization code.” ~ No Web Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. User authentication in Node can be confusing. It’s confusing for lots of people, including really talented Node developers, so you’re not alone. Authentication practices change frequently and ...

Read More »

Dockerizing Node.js Applications

Containers are one of the best ways to deploy Node.js applications these days. In this post, you will learn how you can containerize your Node.js applications using Docker. First, we will create a simple web application in Node.js, then we’ll build the Docker image and run it. You’ll also learn a few tips and tricks to make development easier and ...

Read More »

Angular 5.0 New things

Angular team has released Angular 5.0 on 1st Nov 2017. They focused on most new features and bug fixes. This release continues our focus on making Angular smaller, faster, and easier to use. Following things are New: Angular CLI 1.5 and Angular 5.0.0 Now we are in CLI 1.5, if you install CLI 5.0, automatically you will get the angular ...

Read More »

Angular 4: Service example

Welcome to Angular 4 services Angular services are for building out code that can be shared across multiple components. And these are singletons. services restrict the instantiation of a class to one object. It means the methods and properties can be shared throughout your application from a single shared instance. These services are best way to store the session data ...

Read More »

WTF code, defects, and the principle of least astonishment

We have recently introduced two defects, while trying to improve old, obscure code. Of course we are to blame for not being more paranoid and not researching more why the code was there. But if the code was clear to start with, if it followed the least astonishment principle, the errors wouldn’t have happened. In both cases the original code provoked ...

Read More »

Demystifying the concepts of ‘Asynchronous JavaScript’

Javascript has been one of the vital constituents for application development nowadays in the world of information technology. Every application that is developed now is web-based, and when it comes to accessing the application through the web browser, you got to depend on javascript. So, this blog is basically about breaking down the concepts of asynchronous requests in javascript which ...

Read More »