We gonna explore in simple terms how Node.js actually works. All the stuff you need to know so you build efficient node apps.

Image for post
Image for post

Perquisites

To follow along, you need to have some basic understanding about asynchronous and backend programming.

Architecture

In terms of Node’s dependencies, there’s basically a couple of libraries that Node depends on in order to work properly:

V8 JavaScript engine: converts JavaScript code into machine code that a computer can actually understand, because JavaScript is built to work on browsers and not operating systems. (Written in C++)

Libuv: an open source library with a strong focus on asynchronous Input/Output, this layer is what gives node access to many functionalities such as file system, networking and more. Besides that, Libuv implements two extremely important features of Node.js which are Event Loop & Thread Pool and we’ll talk about these bad guys soon. …


We’re gonna talk about why we can’t assume that a function is asynchronous even if it takes a callback.

Image for post
Image for post

Perquisites

A fair understanding of JavaScript and asynchronous programming.

What makes a function asynchronous?

Maybe you’re answer is “when argument of a function is a function”. Basically yes, but not exactly, every asynchronous function takes a function argument, but not every function that does so is asynchronous because argument function can be called synchronously.

How?

Simply taking a callback doesn’t make a function asynchronous. There are many examples of functions that take a function argument but are not asynchronous. For example there’s forEach in Array. …


I am gonna show you what I did to prevent videos link sharing, so they’re only available for subscribed users.

Image for post
Image for post

I was working on an e-learning website where users obviously gonna watch videos, but the problem was, how to prevent subscribed users from sharing a video source with other unsubscribed users?

To secure getting the video source from the database is easy, you can use middlewares or anything that controls access. But after getting the link, it’s hard to prevent the user from copying the link from the source of the web page and share it.

“A user is guilty until proven…


In this article we talk about a very interesting concept in JavaScript which is related to asynchronous programming: Promises.

Image for post
Image for post

Before we jump in, I totally recommend reading my previous article first which gives an introduction about async JS for you to get your feet wet. In the other hand, I don’t recommend that you continue if you are new to JS.

Iknow, you’ve been hearing about Promises so much, tutorials always mention it. But the good thing is that now you had the courage to discover it. Congrats, you’re on the right path!👌

JS events are helpful but not enough

let btn = document.addEventListener('click', …

In this article, we’ll be answering what is asynchronous JavaScript and why it’s important to learn?

Image for post
Image for post

Prerequisites

Asynchronous JavaScript is a fairly advanced topic, if you are new to this programming language, I advise you to work through its basics first, such as variables, arrays... And some other things like functions.

JavaScript is single-threaded

This means it executes code in order and must finish executing a piece of code before moving onto the next one. It’s synchronous, but at times that can be harmful. …


In this article, you’ll learn about JavaScript code injection in an HTML document, the possible ways to do it, the difference between these ways, and more!

Image for post
Image for post

Prerequisites

You should have some familiarity with HTML/CSS. You do not need prior programming experience.

The <script> Tag

In HTML, JavaScript code is inserted between <script> and </script> tags.

<script>
// Here goes your JS code
</script>

You can place any number of scripts in an HTML document. Scripts can be placed in the <body>, or in the <head> section of an HTML page, or in both.

Is there a difference?

I am glad you asked because there is a difference, and it’s quite important. …


An introduction to the King of the web, the most important language for a web developer to learn!

Image for post
Image for post

There are 3 languages all web developers must learn, we’ve encountered two of them during the previous episodes: HTML to define the content of web pages, CSS to specify the layout of web pages and today we’re going to learn about the third, JavaScript, also known as JS.

What is JavaScript?

JavaScript is one of the most popular and widely used programming languages in the world right now and for a long time. It’s growing faster than many others and big companies like Netflix and PayPal build entire applications around JavaScript. …


Speed up CSS coding, increase your workflow and make it more organized using the preprocessor Sass!

Image for post
Image for post

In the previous episodes, we learned CSS basics and some advanced styling techniques and I think it’s time to get the most out of CSS and learn about its preprocessors.

Ok, now you may be wondering what the heck is that?

To keep it simple, CSS preprocessors will add some features that don’t exist in pure CSS, such as mixin, nesting selector, inheritance selector, and so on. What are all these? …


We’re going to learn three CSS concepts you’ll probably need in your projects.

Image for post
Image for post

This is the the fourth episode in this series, if you didn’t read the previous episode “CSS of Things”, which I highly recommend because it gives an overview of CSS, feel free to do so by visiting this link. If you want the full plan for this series, you can find it here.

In the previous article, we styled a CV (Curriculum Vitae) web page with basic CSS properties. We made it a little bit pretty but as I said we can do much better! …


Learn CSS basics using a real world example!

Image for post
Image for post

Welcome to a new episode of this series ! In the last one, I gave an overview of web development and a short HTML course. So if you didn’t read those yet, feel free to do so, you’ll find here the full plan for this series. But even if you just need an introduction to CSS, you still are in the right place. Let’s start !

What the heck is CSS?

To keep it short, CSS stands for Cascading Style Sheets, it describes how HTML elements are to be displayed.

Front-end developers abstraction for CSS is simply:

About

Oussema Miled

Student & Web development enthusiast

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