In a good object-oriented system, each object has the right responsibilities.
Hello, guys, this is the last part of SOLID Principles in JavaScript and if you haven't read the previous three (first part, second part, third part, fourth part), I highly recommend to read them first and come back here.
This blog post is part of a series of tutorials on Object-Oriented Programming in Python 3.0. We will try to understand the types of methods and their uses.
This is a simple black screen console game where first the program will automatically generate a random number, and all the players who play the game here will continue to guess the number one by one and match it with the previous program. The game will end if it matches the program's generated number. Whoever matches will be the winner of this game.
Here, we will add another interesting feature which is a counter. What is a counter? It's not just a recorder that will keep recording how many times the player is guessing and how many guesses after which a winner is actually found.
Learn strategy design patterns with practical examples. Why and how to use strategy patterns in software design.
According to Gang of Four, the iterator pattern provides a process to obtain the aggregator object without knowing its implementation.
Inheritance vs Composition in JavaScript. What is better, when use inheritance, when use composition. We will look at different examples on JS.
Here we've listed the most commonly asked concepts on constructors in java that can help you ace your java interview.
In 1972, Alan Kay, Dan Ingalls, and Adele Goldberg at Xerox PARC created a revolutionary new programming language called Smalltalk.
Learn how you can improve your code quality in an instant following 3 simple rules that we cal
Hello, guys. This is the second article about SOLID principles with Javascript examples. In my previous article I described what are patterns in general, what is SOLID and why we should use them. If you haven't read it, pls, read it now and continue read current article after the previous one.
Raffaele Florio loves to define himself as an abstractions explorer. His main passion is software developing. He's digging a lot in OOP and concurrent models.
The Alias pattern minds two issues. Extending how a final class builds its objects.
Hello, guys, this is the fourth part of SOLID Principles in JavaScript and if you haven't read the previous three (first part, second part and third part), I highly recommend to read them first and come back here.
Many are wondering whether Golang is a language that can apply the Object Oriented Programming paradigm. Let's discuss this here.
Building an in-memory database in golang is a basic task that you are likely to have to do. It needs you to make a database and a table before organising.
We use annotations to denote transactional behavior in modern Spring so we have no code, no failure, no debugging... But is it really?
Get deeper understanding what is prototype, Object.setPrototypeOf and obj.proto and ways of use it in JavaScript.
Method overloading and overriding are two common forms of polymorphism ( the ability for a method or class to have multiple forms) in C# that are often confused because of their similar sounding names. In this article, we show the difference between the two with some practical code examples.
Classes in javascript were first introduced as part of ECMAScript 6 standard back in 2015. Today, they feel like something natural, but how was javascript before them?
The last part of GRASP is where we will learn polymorphism, pure fabrication, indirection, and protected variations and how to use them in our projects.
A simple and explanatory guide to understanding interfaces in golang.
How to implement proper reusable clone for Django model instances with related objects.
An event loop waits and reacts to events. In this article a multithreaded Java implementation is presented. A real world scenario inspired its implementation.
In this part of creating programming language, we'll implement the hybrid inheritance for the classes like in C++ and write a calculator with multiple classes
This article dives into learning duck typing in Javascript and examples of polymorphism.
I went to an OOP workshop by Sandi Metz several years ago. She made a comment that at one of her previous jobs, they didn't use if statements.
It's impossible to write OOP code with Spring. From its core it promotes the use of singletons and anemic data structures a.k.a. data "objects" a.k.a. DTO. This fuels procedural programming and kills OOP.
Object oriented programming (or OOP) is a style of programming that encapsulates data and behaviours into models known as objects. In this way, related code is grouped together and kept separate from other code, and provides reusable blocks that can be used to rationalise the problem at hand.
Create your own no-code solution in three easy to follow steps.
I was writing some Java test code when I faced up the voracity of the equals method. It presents, despite its ostensible simplicity, a tricky problem.
Javascript used to be, just a few years ago, one of the most disliked languages by the community, it's unnatural behavior was a common inspiration for jokes between developers. One of the main complaints was about the lack of a simple syntaxis to work with classes.
Think back to the last time you worked in a distributed system, did you consider using something other than RESTful HTTP calls as the method of communication between components in this system?
Hello, guys, this is the third part of SOLID Principles in JavaScript and if you haven't read the previous two (first part and second part), I highly recommend to read them first and coming back here.
SOLID Principles is a coding standard that all developers should have a clear concept for developing software in a proper way to avoid a bad design. It was promoted by Robert C Martin and is used across the object-oriented design spectrum. When applied properly it makes your code more extendable, logical and easier to read.
This post contains a step-by-step example of a refactoring session guided by tests. When dealing with untested or legacy code refactoring is dangerous and tests can help us do it the right way, minimizing the amount of bugs we introduce, and possibly completely avoiding them.