Photo by circuitbreakercity.com

In my previous article: , I have discussed about Aggregator Pattern, how to use it, and why Design Patterns matters in Microservices. Also, if you are a new to Microservices, I highly recommend you go through my previous 2 articles: & .

Have you ever wondered, why there are circuit breakers in your house? If your house is powered by electricity, there must be circuit breakers since they control and protect the wiring circuits that feed outlets in your home. When the electricity comes through the main…


Photo by on

In today’s software engineering industry, Microservices architecture has become the most favorable choice for modern application development. Microservice are known to solve various challenges, that developers faced during developing the monolithic applications. However, it has several drawbacks when we use this architecture. Therefore, we need to learn common patterns in these problems and solve them with reusable solutions. As a result, we have several design patterns for microservices. So, in this article I will discuss about the most commonly used design pattern in Microservice architecture: Aggregator Pattern.

If you are new to Microservices, I highly recommend you go through my…


Photo by on

In my previous article: , I have discussed about Microservice Architecture, its characteristics, and its advantages/ disadvantages. If you are new to microservices, I highly recommend you to go through that article, unless you are comfortable with basic microservices knowledge. So, in this article I’m going to discuss about best practices that you should know to build successful microservices application.

Domain Driven Design

When you have to develop a Microservices application, the very first challenge you have to face is, to split a large, complex application into small, autonomous, independently deployable services. If it is not split in proper way, it…


Photo by on

In the past decade, software development has been rapidly evolving to keep up with technological advances and consumer needs. As a result, Microservices got its chance to show off what it is capable of. Now everybody is talking about microservices and it currently getting a lot of attention from IT industry. At the same time, some software developers and communities pointing that Microservices Architecture is not a completely new thing but a rebranding of SOA. However, Microservices Architecture offers significant benefits compared to Monolithic Architecture. So, before moving into the Microservices, you should have general idea about Monolithic Architecture.

Monolithic Architecture

The…


Photo by on

If you are a newcomer to software engineering industry, and if you are working in a project, you probably heard some fancy words like Docker, Container and Kubernetes in some point. It might be sound familiar to some of you, but since you are here, I will give an introduction to Docker and Container based Development in this article. However, before moving into that, you should have basic knowledge about, previous ways of deploying applications.

Hypervisors

Even before coming to the Hypervisor generation, we used to deploy our application on physical servers. However, we still use that technology, but rarely thanks…


Photo by on

If you are a software engineer or undergraduate IT student, you might already work with JavaScript language, since it widely used on both client-side and server-side development. JavaScript is a dynamic and lightweight computer programming language. At first, it was introduced as a scripting language for web development in early 90s by Netscape company. As you already know JavaScript is well-known for the development of web pages, until “node.js” introduced in 2009. With the help of “node.js”, we can use JavaScript outside of the web browsers. …


Photo by on

Memento Pattern (a.k.a. Snapshot Pattern) is a Behavioral design pattern, and it’s used to save and restore previous state of an object. If you want to develop an application, that has undo or rollback functionality, you should go with Memento Design Pattern. Most of the software developers use this pattern whenever they want to develop such functionality within their application.

A simple example to understand the Memento pattern’s concept is, Windows restore point system. In Windows, we create restore points because we can use those to restore our OS into a previous state, if something breaks or system crashes.

The…


Photo by on

Chain of responsibility pattern is a behavioral design pattern that we use to achieve loose coupling in our software design, where a request from the client is passed to a chain of objects to process them. The request will receive through a handler and the objects in the chain will decide themselves who will going to process that request. Each of these objects contain certain type of commands to handle that request. If a particular object cannot handle that request, it will pass the request to the next object in that chain.


Photo by on

Builder is a Creational design pattern, and as the name suggests, it is used to build objects. If we are developing complex application, usually we have to deal with complex objects. Those objects can be dependent on several sub-objects and also may require an elaborate construction process. This is where Builder Design Pattern comes to save our day. Therefore, the main purpose of using Builder pattern is to divide the construction of a complex object from its representation, so that the same construction process can create different representations.

Let’s take an example to make things more clear. Assume that, there…


Photo by on

Prototype is a Creational design pattern, that lets you clone existing objects without making newer objects from the same classes. The main reason for that, some object creations may be very costly (time and resource consuming), so instead of making those objects from the scratch we can clone them from existing objects when we need one. Therefore, the existing object acts as a prototype and contains the state of the object. However, we can change properties of that newly cloned object whenever it required. Because of that, the Prototype approach will save you processing time and resources of your program.

Nisal Pubudu

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