Image for post
Image for post

I’m sure most of us by this time know what Deno is. For those who don’t know it is a runtime for JavaScript and TypeScript. It is similar to Node.js but yet different, it is created by the same programmer but it is not here to replace Node.js by any means disregarding how alike they may appear.

For the last couple of days I’ve been reading Deno’s documentation, reading blog posts and watching tutorials about Deno and in this post I will try to explain what I’ve learned so far about Deno and also my thoughts about some of its principles. …


There are scenarios where you want to run multiple queries at once. For example, you have a page consisting of two components, and each component’s data is derived from a separate query, but you want both of them to be executed and resolved before proceeding with the rendering. There are many ways to achieve this.

Here are the two queries we will start with. We will look at multiple solutions to execute and resolve them simultaneously.

Image for post
Image for post

Solution 1: Define a combined query for both of them

Define a combined query that will execute both of them with the shared variables set. This is a simple but unscalable solution.


TLDR; you don’t, it’s part of your job as a software developer.

Image for post
Image for post
Source: https://dzone.com/articles/what-is-refactoring

I’m currently reading Refactoring 2nd Edition by Martin Fowler which is gladly written in JavaScript, it’s an amazing book, you should go ahead and read it if you’ve been coding for more than 2 years.

Martin did a one hour webinar online at which he talked about his book, the ideas introduced in it and writing code in general. …

About

Hossam Mourad

A software developer specializing in front-end development with a passion for software development as a craftsmanship http://hossammourad.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store