PreviousNext

Code Smell – Primitive Obsession and Refactoring Recipes

by bill-s, 2020-12-07T06:41:58.419Z

Primitives are the real building blocks of your class and its use is obviously inevitable. But the real problem starts when they are not used properly. When you define Class, you define the placeholders for the data that we want to communicate using goodies of OOP (Object Oriented Programming). So, Class gets real behavior characteristics when defined with primitives like int or string or bool etc. with added methods and functions (using those primitives) per business logic defined and that’s where one gets real value out of Type/Class definition.

Read More