The most important first approach when hands on object oriented software applications.


When we are considering object oriented programming most commonly we are focusing on the common aspects of classes and the objects such as object, Inheritance, Encapsulation, Abstraction, Polymorphism. But before we start implementing some applications by using some kind of object oriented programming language there are some important points rather than common object oriented concepts in order to make our creation more effective and professional.

My topic today is mainly focusing on those important approaches to object oriented programming, and how we can use them for the betterment of our works. While working with object oriented programming languages, we have to maintain several kinds of classes and their specific objects as an added benefit of object oriented concepts. We can specify them in several ways like packaging similar things together, making inheritance from the previous classes and so on. Here we must focus on how we can use that approach for the betterment of the application, what we are going to develop and how we can make our work much easier by using them properly.

1.The Proper usage of the single responsibility principle for the application.

As the very first ethic of those important principles, we can take the single responsibility principle. As I have mentioned above we can manage several classes packages for implementation as our needs.  In here, we can have separate units for separate tasks. (unit may like some classes, packages and so on by dividing main work properly into several subcategories according to our needs.)   By having such separate units for each and every work, we can have a proper environment for building our application without mixing responsibilities together, that is the cold single responsibility principle.

when we are implementing some kind of large application, we have to make a proper interaction with the other members of the development team as well. Here, the project manager can easily manage the project and categorize the parts of the project properly among the project team members by using which kind of single responsibility units. and the development team also can have special care about their single responsibility units of the main software application. Also in the stage of maintenance, we have to refer only to the necessary responsible units according to the issue that was recorded. when we need to modify some action or properties at the development stages, we can simply add some more responsible units for newly suggested performances and modified current single units according to the needs.

2. how to use Open\close principles   our object oriented application



Exact meaning of the open\closed principle is objects or entities that we're creating should be open for the extension but closed for the modification. When we are developing applications in the real world we have to modify them as the changing needs of the world. But it is not suitable to modify the current existing classes and methods as our needs time to time by changing their coding because it may cause several confections for the other things which we have implemented at the other stages of the application. Also it may refer to the readability and the completeness of the application as well. 

 As professional software developers, we must minimize that aspect as much as possible. 

 so, when we identify some class or method which is often changing or often developing, we have to add some more new methods often. so, it is the professional habit to keep those classes and methods under abstract keywords so as to add new concrete classes and methods by following that specific class or method respectively. By that we can have new concrete classes and methods as the needs of the changing requirements. 

3. the usage of Liskov Substitution principle

 When we are implementing some application by using object oriented language, at any scale (Large or small) we must use the concepts of inheritance with base classes and their subclasses as I have mentioned above. In that stage, we can have several subclasses which main responsibility implement their parent classes by giving a proper meaning for all the unimplemented methods of their parent classes. At this stage we must be careful to implement all the unimplemented methods of the base classes so as to make a complete implementation and give a proper meaning to that particular object. It is not ethical to keep method without implementing at the subclasses because we can't have a proper completed objects when we use them at the program execution. And also in here we must take responsible to keep the overall meaning of the superclass method at this classes when overriding them because we have to maintain the readability of the program as well. (In here   if we need to have some complete different implementation, we can have some separate class without conflicting the implemented classes of the application.)

4.Usage of Interface segregation principle in Object Oriented Programming

Interfaces are another Main approach of   object oriented programming.  So programmers are used to make different interfaces for the needs of the application. Ethically, we must gather the requirements with same kind of actions (method) together before creating some interface and implement them because It is not good to have some kind of different methods in one interface and force the other classes to implement all the methods  at their child classes.( it may contain some methods that not relevant to those child classes.) you can have a different set of  clients by using this principle properly.

5. Use Dependency inversion principle

Here, I am going to highlight that higher level modules of object oriented concepts should not depend on lower level modules but they should depend on abstractions. Just imagine there is a three tier architecture with business layer logic layer and data access layer. So when we need to take the data on the data access layer we need to do it separately without affecting and conflicting to the other layers. (use different databases). and also its main Expose changes of database layer.

 

That was about the main   ethics or principles of the object when we created our own application with our project team or individually. By following those things, we can ensure about the readability of our code and the tightness and the maintainability of the application as well.

 What we need to Practice further....


At the very first stage before we start to implement our application we have to you have complete view of the problem or the opportunity that we are going to make a solution. by using several kinds of methods such as meetings with clients, surveys, questioners we can gather the details on the problem and we have to make up proper understanding without any doubts or questions on that particular requirement. Here we must identify the limitations and what we are going to implement as our solution. Afterwards, we can divide that problem into the singer responsible unit I have discussed at the   single responsibility principle above.

We can keep those you need simply and clearly. As a good programming approach we can make a simple solution for our problem without making any complicated applications. Also you can take so much from the previous efforts and this software.  there is no use of correcting the similar thing again and again. we must always keep the picture of the application that we are going to improve our mind and make it as user friendly and easily because we need to maintain the economic value of the application as well. We have to keep in mind that, better to a code that is doing one thing well, rather than trying to implement almost all the things that are coming to our minds.  in order to maintain the environment of our application, we can practice some important things such as unit testing, code quality, code review and so on.  And it is better to continue the integration by using version control systems among the members of the developing team. we can have proper backups and a proper Save environment for our application by using that. and also it will be very easy to maintain connectivity, readability and the tidiness of the code by practicing those approaches.


So, I think this will make the first successful hands on for your object oriented programming career.



.

 

 

Comments

Popular posts from this blog