Tag: javascript
- Converting Userscript to Chrome Extension: The monkeys are no longer needed (14 Oct 2022)
Userscripts are a very useful and handy tool in the hands of power users. Just like customized garnishing, salt and pepper, etc. we put on our food before we eat, we can add custom javascript tweaks on the websites we visit. For example, you may want Reddit to automatically highlight...
- How to use window.hashchange event to implement routing in vanilla javascript (06 Aug 2020)
The popular wisdom when it comes to implement routing in your client side apps or single page apps (SPA) as they are called these days, is to just grab an “off-the-shelf” framework like angular or vue and start using it. Well, that’s the easy way out but you will never...
- How to implement URL routing in vanilla javascript (18 Jul 2019)
In this post, I’ll show you how to implement dynamic URL routing in vanilla JavaScript without using any heavy frameworks like angular, vue, react, ember, etc. in less than 30 lines of code! The important attributes you need to know are window.location and more specifically to our purpose, window.location.hash. This...
- CodeMirror - A simple and efficient code editor component for your web applications (25 Jun 2019)
I’m a huge fan of simple things in life, things that achieve a lot with minimal efforts or configuration from the user’s end. And whenever I come across such simple things, I like to share it with everyone and that’s what I’m doing now. In my recent flask based web...
- Userscript recipe: Adding auto-refresh button to gmail classic (28 Aug 2018)
Call me old, but I much prefer the older classic GMail interface to the modern bloated one. Not only is the classic version less bandwidth consuming, but also simplistic in nature with just the buttons and tools that we need. I somehow don’t like it when zillions of AJAX scripts...
- Backbone.Events+Promises+async/await is a great combination for building javascript apps (12 Jul 2018)
At the risk of being a contrarian, I’d like to show in this article how exactly can the Backbone’s Events model be combined with the more modern constructs of Promises and async/await to build a killer app using JavaScript. First, let’s try to understand why do we need these constructs...
- How to create a Server-less Google Drive client using only HTML and JavaScript (09 Jul 2018)
A few days ago, I had to work on a project of this kind and the information and documentation available on this topic was quite bewildering. As a result, I decided to write this article in order to make everything available at one place. Almost everyone knows about the Google...
- The right way to architect single page web applications (06 Jul 2018)
Lets face it, Web Apps are a complex and complicated beast, both on the front end and back end. The reason we had to come up with so many frameworks and libraries (angular/backbone/react/vue/marionette/require.js/etc.) is that the whole process is quite difficult and convoluted. Once your app starts to scale in...
- What problem is React/JSX solving in your App? (05 Jul 2018)
Framework wars and debates are very much a thing these days, be it Angular vs Backbone or Angular vs React, but the real debate isn’t about these frameworks. The real debate essentially comes down to which is the most efficient way of structuring your app and more importantly, rendering and...
- Webpack Project has a Vulnerability (28 Jun 2018)
The other day, I was going through this medium post which describes the kind of chaos and insecurity currently plaguing the JavaScript world, and the numero uno reason for that is the astronomical number of npm packages. When you usually install a non-trivial library or application through a package manager,...
- PHP-FPM vs node.js - The REAL Performance Battle (22 Jun 2014)
Even after my last article about PHP and node.js benchmarking, my search for the holy grail of performance truth still continues. However, I do understand now that pitting PHP running on apache against a stand-alone node was a bit unfair with PHP for it was limited by what the apache...
- PHP vs node.js: The REAL statistics (09 Jun 2014)
When it comes to web programming, I’ve always coded in ASP.NET or the LAMP technologies for most part of my life. Now, the new buzz in the city is node.js. It is a light-weight platform that runs javascript code on server-side and is said to improvise performance by using async...