views:

210

answers:

5

Hi Friends,
Actually I am interested in improving my designing capability(designing of classes with its properties, methods etc) when a problem is given. ie How to decide what could be the classes involved? and then decide the methods and properties? Can you guys suggest me good material for improving on this.

Regards,
Justin Samuel.

+1  A: 

This is perhaps a question which every programmer thinks of one day. The designing capability comes with your experience gradually. What I would say is in general scenario if you can visualize the Database objects for a given problem, the rest is a cakewalk (isnt true sometimes if you work on a techie project with no DB)

You can start thinking of objects which are interacting in the real world to complete the process and then map them to classes with appropriate properties and then methods for defining their behavior. Ten you can focus on the classes which contribute to running the workflow and not to any individual real world object.

This gets a lot simplified if we focus on designing the DB before we jump directly to code design.

A lot depends on the pattern you choose - If you see a problem from MVC perspective, you will naturally be drawn towards identifying "controller" classe first and so on.

I guess I need not repeat the golden sources of design and OOPS wisdom - they already posted here or there.

MSIL
A: 

Give a look a Domain-Driven Design, which defines entities, value objects, factories, services and repositories and the GRASP patterns (General Responsibility Assignment Software Patterns) e.g. Expert, Creator, Controller.

philippe
+1  A: 

I would recommend you to read up on some UML and design patterns. That gets you going with the thinking in "drawing" terms. You can also get a good grasp of a big class/object a lot easier.

One particular book that is good in this area. Applying UML and Patterns

Arto Uusikangas
A: 

Have a look at the part 1 screencast the first part is not silverlight but just a command line calculator that starts out as a single bit of code, and is then broken down into classes.

HadleyHope