Posted by: ahmedashfaque | April 20, 2015

What is a software component?

In object oriented programming we aall know about a class. A class is a template to create an object in runtime. But what is a component?

A component can be considered as a set of classes. For small software applications, building a few classes is sufficient to build the software application. But for large software applications there could be hundreds of classes. Many of these classes may be doing almost the same thing. This means if we write all these classes individually then we are repeating code many times. This is not a good practice. Code reuse should be done as much as possible.

To reuse code residing inside a class so that it can be used for building other similar classes we need to find out ways. One way is to use interfaces and design patterns which will allow a code base to be used for many classes. We can thus build an interface class and then use this interface to build all the smilar classes. The interface and all the classes derived from this interface can be collectively called a software component. A software component thus resembles components used in many industries.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: