SOLID principles are some set of object-oriented design principles which help us to write better and clean code. These principles were introduced by Robert C. Martin (a.k.a Uncle Bob).

SOLID stand for :

  • S: Single Responsibility Principle
  • O: Open-Closed Principle
  • L: Liskov Substitution Principle
  • I: Interface Segregation Principle
  • D: Dependency Inversion Principle

In this article, we are going to discuss the first SOLID principle, which is the “Single Responsibility Principle”.

We know as humans if we get a higher number of responsibilities at the same time it will be very hard to manage all. So it is much better if…

“this” keyword is one feature in JavaScript that all greek to newbie JavaScript developers. The reason for that is thisin javascript acts a little bit different when comparing to other programming languages. From this article let’s get a closer look into the behavior of the this keyword. First of all, let’s understand what is this.

What is “this”?

In simple terms, we can say that this refers to the object that is executing the current function. Even though the definition sounds very simple, there are different scenarios that the value of this keyword assigned differently. Let’s take a look at each scenario, separately…

What is MVC ?

The abbreviation ‘MVC’ stands for ‘Model view controller’. It is an architectural pattern which separates a software application into three main logical components : model, view and the controller. Each of these components have their own responsibilities. Let’s talk about them one by one.

  1. Model

Model is the component which directly interacts with data related logic and data. For example let’s take a Taxi service application. In Taxi service application we have classes like Driver, Car , Customer etc.. This type of classes defines the structure of database and these classes includes methods to manipulate data…

Tharindu Balasooriya

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