Vorleak Chy's Blog
What are Design Patterns?
Working everyday and sitting at your desk in front of your computer, you stare into space, trying to figure out how to write a new feature for your software. You know intuitively what must be done, what data and what objects come into play, but you have this underlying feeling that there is a more elegant and general way to write a software.
In fact, you probably don’t write any code until you can build a picture in your mind of what the code does and how the pieces of the code interact. The more that you can picture, the more likely you are to feel comfortable that you have developed the best solution to the problem.
There are problems rarely stay solved after you’ve handled them once. Developers typically regard their work as tackling individual problems by writing code and solving those problems. But the truth is that in any professional environment, developers almost always end up spending a lot more time on maintenance and adapting code to new situations than writing entirely new code.
A design pattern is a general repeatable solution to a commonly occurring problem in software design. It makes your solution easily reusable, extendable, and maintainable. When you are working on a programming problem, the tendency is to program to the problem, not in terms of reuse, extensibility, maintainability, or other good design issues. And that’s where most developers should be putting in more work because they end up spending far more time on such issues than solving the original problem in the long run. It can also speed up the development process by providing tested, proven development paradigms.
In generally, there are three types: creational, structural, and behavioral.
- Creational Patterns: create objects for you rather than having you instantiate objects directly. This gives your program more flexibility in deciding which objects need to be created for a given case.
- Structural Patterns: help you compose groups of object into larger structures, such as complex user interfaces or accounting data.
- Behavioral Patterns: help you define the communication between objects in your system and how the flow is controlled in a complex program.
Subscribe-
Search-
Tags-
Categories-
Recent Comments-
- Using UUID as Primary Key in Ruby on Rails Thanks @Chamnap, I have...
- Using UUID as Primary Key in Ruby on Rails Not working. You need to...
- Installing GeoServer on Ubuntu Thanks for that! You saved me a lot...
- Change background color of TextBox or ComboBox in Windows Forms Hi....
- SQL Server 2005 Update Trigger Effect Multiple Rows Its really helpful...
- Copyright 2010 Vorleak Chy's Blog. All Rights Reserved. Powered by Wordpress | Theme designed by Chris Murphy
- Back To Top
- Home


Leave a Comment-