javascript

Introduction to Functional Programming in JavaScript: Function compositions #4

Introduction to Functional Programming in JavaScript: Function compositions #4

Function composition is a powerful technique in functional programming that allows you to build complex functions by combining simpler ones. It promotes modularity, reusability, and readability in your code, making it easier to reason about and maintain. What is Function Composition? Function composition is the process of combining two or more functions to produce a new function. The new function applies each of the original functions in sequence, passing the output of one function as the input to the next. This allows you to build complex operations from simpler, reusable building blocks. Mathematically, function composition is often represented as: […
Read More
Build your own DI Container in JavaScript.

Build your own DI Container in JavaScript.

What we will build In this chapter we will implement our own DI Container in JavaScript. We will create a checkout simulation and we are going to use our DI Container to handle the dependency injection. The services Here is the service classes and the flow of our application. We have a credit card, a shipping bag and then a class that handles the transaction and one that sends the order. // Independent service class CreditCard { owner; address; number; cvc; set(owner, address, number, cvc) { this.owner = owner; this.address = address; this.number = number; this.cvc = cvc; } }…
Read More
I think the web is broken, or i am

I think the web is broken, or i am

Huhhm... (a sigh of lost hope) The world of a quiche eater isn't openly documented, well here is everything looming in my mind at-least just about howi think ui dev should be. Here is the backstory : I started my development journey by building android apps using DroidScript (a javascript framework), the issue is it's not cross-platform. NOTE : I refer to the native way of building ui. The native way looks something like this: function OnStart(){ let main = app.CreateLayout('linear','fillxy') let btn = app.AddButton(main, 'A simple Button', 0.8, -1) app.AddLayout(main) } Enter fullscreen mode Exit fullscreen mode I've gotten…
Read More
Where to Add Your Additional JavaScript in Elementor Pro?

Where to Add Your Additional JavaScript in Elementor Pro?

Ever wanted to add some custom functionality to your Elementor Pro-designed website? JavaScript is your friend! But where exactly do you put that code to make it work its magic? Elementor Pro offers two main ways to add JavaScript: 1. Using the Custom HTML Widget (Free): This is a great option for simple scripts or those specific to a particular page element. Here's how: Edit the Page in Elementor Pro: Open the page you want to add the script to and enter the Elementor editor. Drag and Drop the HTML Widget: Find the "HTML" widget in the Elementor panel on…
Read More
Introduction to Functional Programming in JavaScript: Closure #2

Introduction to Functional Programming in JavaScript: Closure #2

Closures are a fundamental concept in JavaScript that every developer should understand. They play a crucial role in functional programming and are essential for creating more advanced functionality in JavaScript applications. What is a Closure? A closure is a function that has access to its own scope, the scope of the outer function, and the global scope. This means that a closure can access variables and parameters from its own function scope, the scope of the function that contains it, and any global variables. In other words, a closure allows a function to "remember" the environment in which it was…
Read More
Innovative JavaScript Features in 2024: Enhancing Developer Experience and Codebase Quality

Innovative JavaScript Features in 2024: Enhancing Developer Experience and Codebase Quality

The JavaScript language continues to evolve, and 2024 brings some exciting new features that will improve the developer experience and codebase quality. Let's explore some of these features and how they will benefit developers. 1)** Temporal**Temporal is a proposal to introduce a new global object that replaces the existing Date object in JavaScript. This new object offers a more modern and intuitive API for working with dates, times, and time zones. With Temporal, developers can easily handle complex date and time-related tasks, ensuring accurate and reliable results. This feature will reduce the need for external libraries and minimize potential errors…
Read More
CSS Rotate Property Explained

CSS Rotate Property Explained

Understanding the CSS Rotate Property:The rotate property is part of the CSS transform module, which allows developers to apply different transformations to elements on a webpage. The rotate function allows you to rotate items by a specified angle, changing their orientation but not their location in the document flow. This characteristic provides tremendous versatility by permitting rotations in both clockwise and anticlockwise orientations. Syntax and Usage: The CSS rotate property’s syntax is rather easy. Developers define the desired rotation angle within the brackets of the rotate function, as follows: .rotate { transform: rotate(45deg); } Enter fullscreen mode Exit fullscreen mode…
Read More
How to Batch Notifications Across Users in a Dedicated Time Window? w/ Example Github Application

How to Batch Notifications Across Users in a Dedicated Time Window? w/ Example Github Application

Batching notifications is a feature widely adopted by major social media platforms and collaborative tools like LinkedIn, MS Teams, and Google Workspace products. This technique consolidates multiple alerts into a concise summary within a single notification, creating a clutter-free user experience and reducing interruptions. For hands-on implementation, please refer to the provided GitHub repository and deployed application links: Benefits of Batching Notifications Frequent alerts can lead to notification fatigue, causing users to disengage. By batching notifications, we can maintain user attention and promote sustained interaction with our platform. Technical Overview: How Batching Works Batching notifications requires sophisticated workflows and significant…
Read More
Single Page Application: Authentication and Authorization in Angular

Single Page Application: Authentication and Authorization in Angular

Introduction In a Single Page Application (SPA), each element has its own existence and lifecycle, rather than being part of a global page state. Authentication and authorization can affect some or all elements on the screen. Authentication Process in an SPA User login: Obtain an access and refresh token. Client-side storage: Store tokens and minimal details in local storage. Login resolver: Redirect away from the login page if the user is authenticated. Router auth guard: Redirect to the login page if the user is unauthenticated. Logout: Remove stored data. Additional Considerations HTTP interceptor: Use the token for API calls. 401…
Read More
Top 5 best UI libraries to Use in your Next Project

Top 5 best UI libraries to Use in your Next Project

Introduction Are you looking to speed up your web development process? A UI library might be just what you need! This article explores the top 5 modern UI libraries that can help you build stunning web applications quickly and efficiently. A UI library is a collection of pre-designed and pre-built user interface elements (such as Buttons, Menus, Lists, Dropdowns, etc.) used to build user interfaces for a web application in a unified design style. In a conventional web development workflow, you usually need a UI/UX designer to design the user interfaces before developing a web application. Although this is a…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.