Category: Web Design – Javascript

Advanced In Browser Routing

What if your client side JavaScript could route based on a regular expression or functional matching of requested URLs? What if it could waterfall like Express on the server? This article covers the techniques used to build such a router if you would like one for React or Vue. First, here is an example of an advanced route configuration. You will obviously have to tweak…

Async-Ray 3.1.0: Chaining Methods in an Easy Way

geeganage 14 hours ago. Async-Ray 3.1.0 introduces a new feature to chain Async methods, without looking weird. Chaining documentation https://github.com/rpgeeganage/async-ray#chaining Sample 1 https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_1.ts Sample 2 https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_2.ts

Understanding Call, Bind and Apply Methods

illustration from undraw.co If you are learning JavaScript, you might have seen the this keyword. The this keyword in JavaScript behaves differently compared to other programming languages. This causes a lot of confusion for programmers. In other object-oriented programming languages, the this keyword always refers to the current instance of the class. Whereas in JavaScript, the value of this depends on how a function is…

Nested Destructuring

Destructuring in JavaScript can initially feel confusing but the truth is that destructuring can make your code a bit more logical and straight forward. Destructuring does look a bit more complex when you’re looking for a property several objects deep, so let’s have a look at how to do that! Simple destructuring looks as follows: const { target } = event; Here we use {}…

Quantum signals with Several Bits per Photon sent – FrontNet

For the first time researchers have been able to transmit Quantum signals with several bits per photon through the air. The special feature of the experiment: The researchers have sent the manipulated photon over a distance of 300 meters above the roofs of the city of Ottawa. Ottawa (Canada). Presumably, quantum communication will be the future. Also in the field of quantum cryptography is currently…

Force Download with JavaScript

Force download scripts have been an important part of internet usability for a long time.  I can attest to that by the number of times I’ve implemented this feature on the server side and the popularity of my PHP Force Download post, even to this day.  With the web world having moved much more the client side, I started looking for a method to force…

layout-architect: A Library for Building Layouts

A small utility for building custom layouts. Written in vanilla JavaScript. Works with finite number of layout blocks. No dependencies. Check out the demo here. Installation JavaScript: npm install layout-architect or yarn add layout-architect or you can grab a .js file directly here https://unpkg.com/layout-architect@latest/la.min.js CSS The CSS that the module uses: .la{position:relative;width:100%;height:100%}.la-block{box-sizing:border-box;height:100%;max-width:100%;max-height:100%;overflow:hidden;text-align:center;position:relative}.la-block a.la-remove{position:absolute;bottom:1em;left:calc(50% – 10px);display:none;border:solid 1px #999;text-decoration:none;color:#000;border-radius:6px;width:20px;text-align:center}.la-block a.la-remove:hover{border:solid 1px #000}.la-block:hover a.la-remove{display:block}.la-block a.la-left,.la-block a.la-right,.la-block a.la-top,.la-block a.la-bottom{opacity:.3;position:absolute;border:solid…

IntroJS: Introduce your app for first time visitors.

A simple jQuery function which provide a tutorial kind of functionality for your web application. It will extend your web application’s capabilities and allow you to minimize the training part for your application. First time visitors can get introduced to your site content/functionality. A new digital sitemap. Step 1: Include the introJS in your application’s head/body/footer as per your framework structure. <script src=”http://github.com/intro.js”></script> Note:: jQuery…

It's our epic JavaScript 2018 roundup

This week we’re taking a break from the usual roundup to look back at what happened in the JavaScript world in 2018, as well as the tutorials, videos, and tools you, our fantastic readers 🤗, clicked on the most. Thanks for continuing to support us in 2018 and we’ll be back on January 4th. We hope you have a fantastic holiday season, however you celebrate…

Design pattern – Asynchronous operation with conditions

Use doors to represent asynchronous operations depending on multiple conditions. Imagine a door with multiple locks, you can not open the door until all locks are unlocked and one lock is enough for the door to be closed. Check it out online! Usage A door is either opened or closed. The transition from one state to an other depends on conditions called “locks”. const Doors…