Thinking in Object Oriented Terms

Its been quite a long time i had blogged. Infact was Caught up busy with My work.So now Blogging about what i have been learning for the past few Weeks.

We all started off with the training on Object Oriented Concepts.It all started off well with a neat intro about the concepts and How to proceed by By Manager ( Donno whether to mention his Name or not ) .
Well the Sessions were up to the Point and made sure that we are clear about our Foundations .

Then a assignment was Given and still the assignment is pending.Oops i thought,the Manager was somewhat angry on Us for not completing it on time

Well thats apart, I am clear of what was thought and now think i am Quite confident of How to start My career with. Now Coming to the Important part Object Oriented Programming and Design Patterns .
Wikipedia Notes on DesignPattern

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Algorithms are not thought of as design patterns, since they solve computational problems rather than design problems.

The Design Patterns help in writing a Clear Code , Speeds up the Entire Software Development process, enable testing to be done properly.Effective application of the Design patterns with the Object Oriented Concepts will improve the Project/ Product overall.

The Design Patterns can be classified Abstract,Factory,Singleton etc… and the List Goes On.

A simple Singleton / Factory Pattern Looks Like the Code Below.

class CarSearch : Search
private CarSearch()
: base()
private static CarSearch Instance = null; // Static Field to Create the instance only once.
public static CarSearch GetInstance()
Instance=new CarSearch();
return Instance;

Calling the Method
var sh= (Isearch)typeofControl.GetMethod(“GetInstance”).Invoke(“CarSearch”, UserParam); // Invoke the Method of Corresponding Class to create a instance only once. ISearch is a Interface ,”CarSearch” is a Class.Have Used Reflection to Call the Method

I Understand that these might not Look like a professional Written Code but these gives a Clear idea about the concept.

I will try to Update more as and when i learn about it.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

One Response

Leave a Reply


Interesting BlogPosts to read

How to get an Enumerator from range of elements from ArrayList in C# ?
The code snippet shown in this blog post demonstrates how you can get the enumeraor from a range of ...
How to check for the column name in an SqlDataReader Object in C# ?
When working in ADO.NET for data access , there are times when you want to check to see if a column ...
Swift Developers June User Group meeting in Bangalore
SwiftBLR (Swift Bengaluru) is hosting an user group meet on June 11 , 2016 from 2.30 PM to 6.00 PM a...