This article will guide you through 9 best practices that a developer should follow when working on a microservice project. let’s take a deep look at each.

1. Have A Domain-Driven Design

Each service should have its own well-defined scope. Remove anything from your service that isn’t relevant to its scope and keep only the elements that are necessary to achieve the goal of the particular service.

While designing a microservice, make sure you have a fresh domain-driven design. If you are already running a microservice, just Rethink whether the design is domain-driven? …

Image from -google

To gain a deeper grasp of microservices, we must first understand the differences between microservice and monolithic architecture.

Monolithic Applications.

A monolithic application means a single, indivisible piece of software. A client-side user interface, a server-side program, and a database are typically included in such a system. It is integrated, all functions handled and served from a central place. Generally, monolithic applications have one large codebase and lack modularity. Developers use the same code base when they wish to update or replace something.

Photo by Pat Whelen on Unsplash

Overview of history

1st Generation

Previously, we deployed our application using multiple physical servers. To make things clearer, when we have an application that needs a web server, database and application server to run, we use three separate hardware to deploy it.

JavaScript is a widely used scripting language which based on ECMA Script specification. Even though JavaScript hasn’t been evolved for years, the entrance of MEAN (MongoDB, Express, Angular, Node) Stack has resulted in some useful upgrades. As a result, ECMAScript 6 (also known as ES6 and ECMAScript 2015) was released in June 2015 and is now extensively utilized.

JavaScript ES6 introduces new syntax along with several new features designed to make your code more modern and readable. It enables you to do more with less code.

In this article, I’m going to cover some of the new features that have…

Image from google

What is Chain of responsibility design pattern?

The Chain Of Responsibility pattern enables you to loosely couple the senders and receivers of a request. We build a receiver objects chain in this pattern, with each receiver containing a reference to another receiver. This chain receives a request from the client and starts processing it. If first object is unable to handle the request, it is passed to the next receiver, and so on, until the request is fully handled.

During the run time, the objects in the chain will decide who will handle the request and whether it needs to be passed on to the next object…

Image from — google

What is Builder Design Pattern?

The Builder is a design pattern that allows us to build a complex object from simple objects in a step-by-step manner. The builder design pattern is classified as a creational pattern.

Why Should we use Builder design pattern?

Let’s look at the example below to find the answer to the above question.

Assume that a shop sells hot-buns to their customers. A hot-bun can be either chicken-bun or beef-bun. There are three sizes to choose from: small, medium, and large. A customer can also request extra sauce, cheese or a cool drink when ordering a hot-bun. However, these extra items are optional. …

Image from — google

What is Prototype Design pattern?

prototypes design pattern allows you to create objects by cloning an existing object instead of creating a new object from scratch. This pattern is used when the process of object creation is costly. when cloning, the newly copied object contains the same characteristics as its source object. After cloning, we can change the values of the new object’s properties as required. This pattern comes under a creational pattern.

For easier understanding, Assume that a database operation should be done in order to create an object. This database call is both time-consuming and costly. we need to create multiple objects. As…

Image by — google

What is Factory Method Design Pattern?

The factory method is a design pattern that provides an interface or abstract class for creating an object and allows its subclasses to decide which class to be instantiated. Factory pattern is classified as a creational pattern.

For easier understanding, Let’s assume a shop contains a variety of products, and the shopkeeper delivers us the things we require based on our requirements. In the same way, the factory pattern works. Typically, we pass parameters. Our factory method determines which class should be instantiated based on the parameter we passed, and creates and provides an instance of that specific class.


Image by — google

What is Singleton?

The Singleton is one of the most used design pattern which is used to create a class that can have only one instance that can be accessed globally. Singleton is classified as a creational pattern.

Only one singleton object can be made, per container. If you’re a JAVA developer, you’ll get one Instance per JVM.


Image By-Google

To understand DNS spoofing, we must have enough knowledge about DNS servers and how it works.

How Internet works? (Overview)

Each and every devices in the world which is connected to the internet will own a unique IP address. An IP address is a unique address that identifies a device on the internet or a local network. The term IP (Internet Protocol) refers to a collection of rules that regulate the format of data transmitted over the internet or a local network.

If you are currently connected to the internet, you too have a unique IP address. …

Arshad Suraj

Associate Software Engineer at Virtusa

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