Posted by: ahmedashfaque | May 8, 2015

How many classes you need to build your software application?

Software designers often wonder how to create the software design so that the software product built on this design looks all zazzed up and works wonderfully.

Even though software designers get full idea about the overall software architecture from the requirement specifications. They fully understand how the software product will look like at this stage. The problem arises when they have to drill down and find out how many classes they have to build to capture all aspects of requirement specifications. So here is a discussion on this topic which may help software designers to build great software products.

When I think to design a software product, obviously my first inspiration comes from requirement specifications. Requirements specifications give me all the details to build the software design. Generally I first think about what data I need to keep in my database. So I first design my database tables and their relationships. Entity Relationship diagrams (ER Diagram) come handy here. So I build my ER diagrams and my database. Only when I am confident about my database, I think about other aspects.

If the software product does not has a Model View Controller (MVC) Architecture requirement then I will create my classes directly related to my ER diagram. Thus my ER diagram is good for both building my database as well as my middle tier components.

But suppose your software archiecture has to be MVC based architecture then what you will do to create your classes for your middle tier? Well in this case, I will find out where and what are the differences between views and models in my MVC architecture. For example suppose the user has clicked a navigation button on the user interface and some user selected entries have to be memorized which were done prior to the navigation then a difference will occur between the view and the model when user wants to see selected entries later. Afterall the selected entries were not saved in the database and you have to provide a mechanism to store them in a temporary memory. This is where your ER diagram will differ from your class diagrams.

To take care of this difference, you need to build your classes accordingly.


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s


%d bloggers like this: