what are design patternssitting at your desk in front of your workstationyou stare into spacetrying to figure out how to write new program feature you know intuitively what must be donewhat data and what objects come into playbut you have this underlying feeling that there is more elegant and general way to write this program in factyou probably don' write any code until you can build picture in your mind of what the code does and how the pieces of the code interact the more you can picture this "organic whole,the more likely you are to feel comfortable that you have developed the best solution to the problem if you don' grasp this whole right awayyou might keep staring out the window for timeeven though the basic solution to the problem is quite obvious in one senseyou feel that the most elegant solution will be more reusable and more maintainablebut even if you are the sole likely programmeryou feel reassured when you have designed solution that is relatively elegant and doesn' expose too many internal inelegancies one of the main reasons computer science researchers began to recognize design patterns is to satisfy this need for elegant but simple reusable solutions the term design patterns sounds bit formal to the uninitiated and can be somewhat off-putting when you first encounter it butin factdesign patterns are just convenient ways of reusing object-oriented code between projects and programmers the idea behind design patterns is simpleto write down and catalog common interactions between objects that programmers have frequently found useful one frequently cited pattern from early literature on programming frameworks is the modelview-controller framework for smalltalk (krasner and pope )which divided the user interface problem into three parts the parts were referred to as data modelcontaining the computational parts of the programthe viewwhich presents the user interfaceand the controllerwhich interacts between the user and the view (see figure -