Posts for Deven

Software Developer
Deven
Deven wrote

Create your first web server and Learn basic routing in Nodejs

NodeJS is an open-source JavaScript runtime built on the Chrome V8 engine for executing JavaScript code on the server side. To make the web page more interactive the language, JavaScript was built. Writing JavaScript code outside of the browser was like daydreaming once at a time. But now it is the reality that we can […]

May 17, 2023 in Node & Tutorials
Deven
Deven wrote

How to Model your data in MongoDB

MongoDB is a database that is also known as a NoSQL database. In other words, MongoDB is a schema-based database that is used to store data in documents. It is highly scalable and powerful. It stores data by following a field-value data structure that is most likely JSON but in MongoDB, it is known as […]

May 17, 2023 in Node & Tutorials
Deven
Deven wrote

Lazy Loading in React.js explained with Example

In this tutorial, we will learn about lazy loading in React.js and implement a simple web application that utilizes this. Lazy loading refers to loading something only when it’s required by making requests dynamically. In React.js it is used to import components and associated resources only when they need to be rendered. The goal of […]

May 15, 2023 in React & Tutorials
Deven
Deven wrote

Building a Portfolio Website with Vue and Bootstrap

In this tutorial, we will build a Portfolio Website with Vue and Bootstrap. This tutorial is targeted at developers who know the basics of Bootstrap and Vue.js framework but need a practical example to properly grasp the above technologies. If you are an absolute beginner, I would suggest you take some absolute beginner crash courses […]

May 12, 2023 in Tutorials & Vue
Deven
Deven wrote

Mastering MEVN Stack CRUD Operations: A Step-by-Step Guide

In this tutorial, we will create a MEVN stack CRUD application using MongoDB, Express, Vue 3, and Node.js. In our Node.js API, we will be able to perform create, read, update, and delete operations. At the end of the tutorial, readers should be able to create a CRUD app with Node.js, connect the Node.js server […]

May 12, 2023 in Tutorials & Vue
Deven
Deven wrote

Handling File Uploads with validation in Laravel

In this tutorial, you will learn how to handle file uploads with validation in Laravel. Almost all applications have to do with file upload of some sort: a profile picture, a document for KYC verification, a document containing a CV, etc. Hence, it is important to understand how to handle file uploads in Laravel. In […]

May 12, 2023 in Laravel & Tutorials
Deven
Deven wrote

5 methods to Simulate a Python Switch Case Statement

In this guide, we will explore five methods to simulate a Python Switch Case statement. A switch case statement is a powerful tool in programming, providing developers full control over the program’s flow based on the outcomes of an expression or a variable’s value. Switch cases are primarily used to execute different blocks of code […]

May 11, 2023 in Python & Tutorials
Deven
Deven wrote

Implementing Debounced Input Search in Vue.js

This Vue.js code snippet demonstrates how to implement a debounced search input that triggers an API call. This is a common feature in applications like Gmail and Facebook, where search results are dynamically updated as a user types into a search box. Explanation In this code, the input event is listened to on the input […]

May 11, 2023 in Code Snippets & Vue
Deven
Deven wrote

Fetching and Rendering a List Using a Vue Component

This Vue.js code snippet illustrates how to fetch and render a list of items from a provided URL. This is a common operation in web applications, such as displaying a list of recipes or a to-do list. Code Snippet Explanation In this Vue component, the props option is used to accept a url prop from […]

May 11, 2023 in Code Snippets & Vue
Deven
Deven wrote

How to Capitalize Text with JavaScript

In this article, you will learn to Capitalize Text with JavaScript. JavaScript has built-in methods like .toLowerCase() – to convert text to lower case – and .toUpperCase() – to convert text to upper case. However, there’s no built-in method to convert text to title case i.e. “How Are You”. However, we can combine .toUpperCase() with […]

May 11, 2023 in Dev Bytes & JavaScript
Deven
Deven wrote

Handling Different File Types in JavaScript

This JavaScript code snippet demonstrates how to handle different file types when a user selects a file. It’s useful when you need to perform different operations based on the file type selected by the user. Code Snippet Explanation In this snippet, an event listener is added to the file input field to listen for the […]

May 11, 2023 in Code Snippets & JavaScript
Deven
Deven wrote

Deleting an Item from a List in Vue

This code snippet illustrates how to delete an item from a list in Vue Deleting an item from a list is a common operation in many web applications, particularly in scenarios like removing an item from a shopping cart in e-commerce websites. Code Snippet: Explanation In this code, list is an array of names. Within […]

May 11, 2023 in Code Snippets & Vue
Deven
Deven wrote

Displaying a Loading Indicator during Data Fetch in Vue

This code snippet demonstrates how to display a loading indicator in a Vue application when fetching data. It leverages Vue’s v-if directive to conditionally render a loading spinner based on the state of the data fetch operation. In the snippet below, we have our data property loading which is set to false by default. Before […]

May 11, 2023 in Code Snippets & Vue
Deven
Deven wrote

Detecting User Device Screen Orientation in Vue

This code snippet detects the orientation of a user’s device screen (portrait or landscape) in Vue. It is particularly useful when you want to change the layout or functionality of your web page based on the screen orientation. Code Snippet Explanation: The code adds an event listener for the ‘orientationchange’ event, which is fired when […]

May 11, 2023 in Code Snippets & Vue
Deven
Deven wrote

Detecting User Navigation Away from a Web Page in Vue

This code snippet is used to detect when a user navigates away from a web page In Vue. It’s useful when you want to pause animations, videos, or any other activities that shouldn’t continue when the user isn’t actively viewing the page. Code Snippet: Explanation: The code listens for the ‘visibilitychange’ event, which is fired […]

May 11, 2023 in Code Snippets & Vue