Object Oriented Design Principles

Hello dear readers. Welcome back to my blog. As we know by now most programming language support and encourage object-oriented programming and in this blog post we are going to talk about the principles of the Object-Oriented Programming. The key design principles of Object-Oriented Programming are:

Abstraction – is the idea of simplifying a concept to its bare essentials in some context. It allows you to better understand the concept by stripping it down to a simplified version. Your abstraction should be intuitive.

Encapsulation – can be thought of as putting something inside a capsule. In software, restricting access to inner objects and properties helps with data integrity. Encapsulation makes your classes easier to manage, because you know what part is used by other systems and what isn’t. This means that you can easily rework the inner logic while retaining the public parts and be sure that you have not broken anything. A disadvantage of it is that working with the encapsulated functionality from the outside becomes simpler as you have less things to think about.

Decomposition – is the action of splitting an object into multiple separate smaller parts. Spitted parts are easier to understand, maintain and program. There exist three types of decomposition relationships: 1. Association, which defines a loose relationship between two components. They don’t depend on each other but work together. 2. Aggregation, which defines a weak ‘has-a’ relationship between a whole and its parts. The parts though can exist without the whole. 3. Composition, which defines a strong ‘has-a’ relationship where the whole and the part can’t exist without each other.

Polymorphism – is the ability for data to be processed in more than one form. It allows the performance of the same task in various ways. It also consists of method overloading and method overriding.

Inheritance – is the ability of one class to inherit properties of another class, called the parent class. We can inherit properties from other classes s well.  So, when we create a class, we do not need to write all the properties and functions again and again, as these can be inherited from another class which possesses it. Inheritance allows the user to reuse the code whenever needed.

Design principles are rules in software design that have proven themselves valuable over the years. Just like any other ‘game’ even when we code we need to know and follow the rules. This is the main reason why I choose to write about the principles of Object-Oriented Programming.


The 4 levels of Software Testing

Hello dear readers.  It is time to talk now about the phases of testing that a software has to go through in order to make it to production.

Unit Testing – I have another separate blog about unit testing as I though it was important for new software developers to understand well what it is and how it works.

Next in the levels of Software testing comes Integration Testing. Integration Testing comes always after Unit Testing and before System Testing. Integration testing gives the tester the opportunity to combine all of the unit within a program and test them as a group. Integration testing is designed to find interface issues between the functions/modules. Test drivers and test subs are used to assist in Integration Testing. For Integration testing any of White Box Testing, Black Box testing or Gray Box Testing methods can be used. This way of testing determines how efficient the units are running together. Even though each unit might be very efficient, if they aren’t properly integrated it will affect the functionality of the software program. Integration testing has four approaches: Big Bang – where all or most of the units are combined together and tested at one go; Top Down – where top-level units are tested first and lover lever units are tested step by step after that; Bottom-Up – where level units are tested first and upper-lever units step by step after that; Sandwich – is a combination of Top Down and Bottom Up approaches.

After we are done with Integration Testing it is time to go to the next level: System Testing. System Testing is the process of testing an integrated system to verify that it meets specified requirements. It tests the overall interaction of components. It also involves load, reliability, security testing and performance. System Testing is usually performed by independent testers who haven’t played a role in developing the program. This testing is usually tested in an environment that mirrors closely production. It is important for a software program to meet the technical, functional and business requirements that are set by the customer and System Testing is the best way to tell.

Last but not least is the Acceptance Testing. This is the last test performed in the application before it goes to the customer. Acceptance Testing is performed by the user to make sure the requirements of a specification are met as per its delivery. Sometimes some requirements are misinterpreted, and Acceptance Testing is the best way to find out.

After the whole testing process is complete and the software has passed, the program will be delivered/deployed to production.

Either you are a software developer or a Test developer you need to know these four important steps as each of your program will go through that. I thought it was very important to tell you this process as it will present in every program/software/method you will design.