Lazy Loading Images in VueJs

Lazy Loading Images in VueJS is important to save bandwidth, rank your page better, improve performance considerably and provide a better User Experience, especially if your website has several images. In this tutorial of Lazy loading images with Vue.js, we will be using an extremely swift and lightweight package called Lozad.js that does the major heavy-lifting behind the scenes. But Why Lozad, you ask? Lightweight – < 1kb(978 bytes) minified …read more

Using Twitter Typeahead with Vuejs

Learn how to integrate twitter typeahead search powered by Bloodhound directly into your Vuejs app. Using Twitter typeahead with Vuejs may seem tricky at first, but its far from the truth. Moreover, it is very well suited for traditional web apps as well as SPAs. If you are new to twitter Typeahead/Bloodhound, here’s a tutorial –  Smart Search with Twitter Typeahead that I recommend before going ahead. Requirements: – VueJS (v2.5 and …read more

Vuejs Vuex State Management for Beginners

As your VueJS App grows, the number of components keeps growing, giving rise to the need for state management to communicate between components. Vuex is the recommended tool for State Management built specifically for Vuejs apps. Before proceeding, lets refresh a few concepts… What is State? State is like a container/Object that stores some value/values. What is State management? The way in which a state is modified is referred to …read more

Routing with Symfony and Vuejs Router

One of the initial problems you might come across while integrating Symfony and VueJs is probably Routes. How do you handle this Symfony Vuejs routing? How to let Symfony forward the request to Vue Router? Lets quickly get to answering these questions. Forwarding Requests from Symfony to the Vue Router To allow the Vue Router to take control, we need to forward incoming requests from Symfony to the Vue Router. …read more

Symfony Vue JS Integration in under 10 mins

Integrating a good front end library like Vue js has become a de facto standard these days. This tutorial aims at integrating Vue js with Symfony backend. Symfony Vue Js integration is one of the best combinations for a trendy App, whether it be a SPA or a traditional Web App. Requirements Symfony 3.4 and above Vue JS  2.5 and above FOSRestBundle (optional, but useful when you want to develop …read more

Top 15 Commonly Used Regex

Regular Expressions aka Regex are expressions that define a search pattern. They are widely used for validation purposes, like email validation, url validation, phone number validation and so on. Forming Regex: A regex is written between two forward slashes (/) delimiters. These delimiters are essential only for certain Regex engines (JS,PHP..). It is then followed by 2 flags: i : Ignore case Flag, ignores the case(uppercase/lowercase) of the input string …read more

Exclamation mark before a function aka IIFE

Immediately-Invoked Function Expression (IIFE) If you ever happen to look at any of code generated using build tools like Webpack or any other Minification/Uglification tool, you may have encountered an exclamation mark before a function only to wonder what it exactly does ? Well, in short, that exclamation mark converts the function into an Immediately-Invoked Function Expression (IIFE). Now what exactly is an IIFE ? As the full-form indicates, it …read more

Whats a Double arrow in javascript

What do the operators “>>” (double arrow) and “|” (single pipe) mean in JavaScript? If that’s the question that runs through your mind, then you are at the right place to discover Bitwise operators. 1. The Right Shift Operator >>(double arrow) Shifts x in binary representation y (< 32) bits to the right, discarding bits shifted off. Or more simply x >> y means to shift the bits of x …read more

JS File Upload with Dropzone and Symfony

Handling File Uploads completely server-side (especially with Symfony) doesn’t usually seem a pretty straightforward task. It requires a lot of tweaking for stuff as simple as displaying the upload progress or even generate thumbnails for images, etc. Besides, the documentation is pretty convoluted in itself. An alternate is to use the simplicity of JS File Upload with Dropzone and Symfony 3.x+ that’ll not only help fast-track development but also avoid …read more

Demystifying Promises vs Callbacks

Aren’t Promises just regular Callbacks? What are the pros/cons of using one over the other? Promises vs Callbacks? Questions like these bothering you? Not anymore! Before we actually go dive in deeper, lets quickly remind ourselves the basic definitions of these terms and what they are meant to accomplish. Callbacks: A Callback is a any function which is passed as a parameter to another function and is invoked/executed only after …read more