Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am designing a asp .net web site. How to Choose a Design Pattern That Fits to my requirement? plz help on this
Posted
Comments
PSK_ 4-Jul-11 4:42am    
What is your requirement? Learn the patterns and real-world examples of their uses.

Well, first read through the available design patterns and their usage from GoF http://www.dofactory.com/Patterns/Patterns.aspx[^].

Then re-visit your application requirements and do the basic design on the use case model.

Then when it comes to the class diagram design phase, try to group/ separate the following (provided keeping in mind the basic Coding practices like DRY, Cohesiveness, loose coupling, separation of concern etc.)
1. Commonalities in the use cases [ that can be shared among].
2. Use cases and their expected behaviour
3. Any 3rd party libraries used?
4. Any existing modules being used, but not owned by your project?
5. Different interfaces that your application might be connected with?
and many more...

After you prepare a list of all the above, you can map them back to the design pattern to see which one best suits you.

Cheers
- Balaji
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Jul-11 4:44am    
Reasonable directions, my 5.
Please see also mine.
--SA
Hm… Not so much information to give an advice. For now, only you know your requirements. Learn some about design patterns. Start with architectural design patterns. But first, try to analyze your requirements by yourself, to avoid imprinting.

All I can do now is to point to a good source of most general overview:
http://en.wikipedia.org/wiki/Architectural_pattern_(computer_science)[^],
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)[^].

—SA
 
Share this answer
 
I agree with Balaji and SA, in addition, I would like to say, probably if you read this book will give you a nice explanation about usage of different design patterns,

Professional ASP.NET Design Patterns
Scott Millett

Hope it helps :)
 
Share this answer
 
Design Patterns are like programming languages:
They don't solve your problem by themselves, neither they guaranty that your design decisions are an appropriate solution for the problem. Stick with a design pattern you like, and most important, understand.
Another fault that seems to happen very often is that people pick a design pattern and then later start to abandon it, and switch to another one - Which leads to crapcode and mass confusion, sooner or later.
Quote:
Choosing a Design Pattern[^]
Patterns are not the panacea of program design. They do not replace traditional object-oriented analysis techniques like CRC cards or use-case modeling. To use an architectural analogy, analysis lets you determine that your house needs 200 amps of electricity. Patterns let you determine how the wiring will be installed.
Patterns do help you think about the problems you may encounter while designing a system. Therefore, a generic, pattern-based solution is often more robust than a solution designed by one individual to solve a specific problem.
Given the number of design patterns in common use (as well as many more being invented and discovered almost daily) it can sometimes be hard to choose the pattern that suits your needs.
The first thing you should decide is whether the problem is fundamentally creational, structural, or behavioral. Some problems, of course, have aspects of two or even three, and may require you to mix and match patterns.

 
Share this answer
 
v2
You can go the Factory Method Instead if you r unable to make a choice....

Hope this will helps you...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900