When Statelessness Isn’t Enough: Choosing Between Stateless and Stateful Design

Stateless REST APIs have become the architectural default for modern web applications. But default doesn’t mean universal. While stateless systems offer clear benefits for scaling, and simplicity, they’re not always the best fit for every situation. Statelessness means the server doesn’t remember anything between requests, which sometimes forces the client to include a lot of …

JavaScript 101 – A Detailed Guide on How to Use Object Destructuring

In web development, we can unpack values from object properties to make our code cleaner and easier to work with. We assign these values to distinct variables, which we can now use further along our programming logic. Example: To make this ‘unpacking’ easier ES6 introduced a new feature called destructuring assignment. With destructuring, we can …

Managing data across different scopes with the Superglobal Variables in PHP

Superglobals are special built-in variables in PHP that are available from any function, class, or file without a previous declaration of them as global variables. That practically means there is no need to use the global keyword to access them. Below is how we can access a common global variable from a function: Without the …

Build a Simple MVC Framework from Scratch to Understand the Pattern

We are going to construct a very simple MVC framework to get the concept. The code will be built and run locally with XAMPP. Those using Macs can use MAMP for the same purpose. Having a database and web server installed on your computer is the easiest and most affordable way to experiment with code. …

Var, let and const variables. How they differ and which one to use

JavaScript provides three methods for declaring variables. We can use the var, let, and const keywords. This abundance of choices is a source of confusion for a beginner developer. At least it was for me. While taking my first steps in the world of JavaScript. I wondered, “Why should a programming language use so many …

MVC Made Simple: The Framework Behind Countless Web Applications

MVC stands for Model-View-Controller, and it’s a way of structuring applications so they’re easier to understand, build, and maintain. A Brief History of MVC MVC isn’t new. It dates back to the 1970s, when a Norwegian computer scientist named Trygve Reenskaug introduced the concept while working at Xerox PARC. At the time, researchers were experimenting …

Converting data types in JavaScript with simple examples

JavaScript is a dynamically typed — also known as untyped — language. Typing is the process of defining the data type of a variable. In dynamically typed languages, typing is associated with the variable’s value and not the variable itself. Thus, in JavaScript, variables don’t need to specify a certain data type when they are …