Tagged: OOP

What is loosely and tightly coupling?

In programming, we have the concept of coupling.  Coupling is the way two or more modules of our application relates to each other. Suppose that we are building a new application.  We can divide our application in tiers. One tier will be our user interface (UI). Another ties is our business...

Implementing the Open-Close Principle in C#

The Open-Close Principle The Open-Close Principle states that software entities (classes, object, module, etc.) should be open for extensions, but closed for modifications. So, what does the principle mean to us?  Basically, it says that if you created a class, you do not change the internals of the class (close for modifications) if...

The Single Responsibility Principle (SRP)

How many times you have been tasked to change a class because some functionality is out of date and needs some upgrade? How many times a simple change turns out to be a complicated egg hunt of how a class is working? How many times a small business decision, such...

Objects in JavaScript? 3 ways to do it.

JavaScript is not an OOP language.  This is one of the challenges faced by server-side programmers, specially if you use OOP languages likes C, C++, C# or Java.  We know that using objects give us clarity and a way to translate the problems we are trying to resolve through code....