I have read quite a few blogs and posts online. As I go deeper into knowing what design pattern is best for our Intranet and Internet projects, it gets more confusing.
I want to learn and implement design patterns. I read about all MVC,MVP,MVVM,factory, singleton, observer etc.. But question still remains the same a lot of time.
If anyone can give some easy to understand examples and an easy process to HELP DECIDE what pattern to use.
Here is a list of my understanding on concept:
1) If you have more data entry/ aspx pages to manipulate then use MVP. MVP has sphageti code in views as it has redundant code for relating to business logic.
2) MVC is a clean and separation of concern implementation. I felt the more controller manipulates data, it gets tougher in designing web pages ( atleast takes lot of time if you have data entry or Telerik Grid manipulation).
What circumstances should I implement other observer, factory and other patterns.
There might be places that I already implement those but now I want to know where and how to know what is best.
Well, there is no single answer to your questions and the correct answer depends on heavily your skills, experiences and preferecnes.
ASP.NET Forms is simpler to go with when you are beginner. Controls are easy to use and you can modify their look, react to events etc. ASP.NET MVC is more close-to-metal framework that is easier to extend and tweak. It is not so simple that using data sources
and controls like in ASP.NET Forms. You have to know more about coding to make good progress on ASP.NET MVC.
ASP.NET Forms comes with price that you cannot easily modify the way how controls behave or what output they are producing. ASP.NET MVC is harder for beginner because there are no such cool controls but all output is completely under your control.
If we start talking by architectural patterns you mostly see behind professional applications then ASP.NET Forms applications use Model-View-Presenter pattern that is more complex to implement than Model-View-Controller.
Okay, the story this far is informative and maybe not very helpful. The easiest way to make decision is to try out. Try to build some simple application (really simple application) on ASP.NET Forms and then on ASP.NET MVC and you will see which one of these
frameworks likes you better.
Don't forget to mark solution providing post as "Answered".
I spent my whole weekend getting to know about all patterns and Architectures.
I did realize there is not a specific perfect way to program.
Yeah I did learn how ASP.NET Forms uses MVP. Also What are different patterns in Presentation(UI), Host, Structural, Creational(Business Layer) and Persistance(Data Layer) layers.
I want to grow learning all these and implement according to situation even though these patterns are implemented on a large scale projects.
Yes, MVC is what I am working on but its too much of code I have to write for Smart UI according to the need of my projects. I want to implement it as my project might end up mobile.
If you are new to patterns then first choose tools you feel yourself convenient. Then start writing working code and slowly apply patterns. Patterns are not absolute truth. They are advices or guides to solution but often not correct ones. The fun to find
out what pattern works and where and if it works at all belongs always to you.
During real work you will very often create your own patterns for problems you are solving and you use all those known patterns only as much as they make sense in the context you are working. These additional "patterns" are things that take most of your
coding time and they are also main thing that makes coding cool work.
To get started the most important thing is to write working code and then improve the code. If you don't know how one or another things starts working then there is no pattern that can help you - patterns can be applies only to working code. I like to describe
the whole process as: make it work, make it nice.
Don't forget to mark solution providing post as "Answered".
Inayat Rasoo...
Participant
836 Points
285 Posts
MVC, MVP and all Design patterns
Jan 25, 2013 05:44 PM|LINK
I have read quite a few blogs and posts online. As I go deeper into knowing what design pattern is best for our Intranet and Internet projects, it gets more confusing.
I want to learn and implement design patterns. I read about all MVC,MVP,MVVM,factory, singleton, observer etc.. But question still remains the same a lot of time.
If anyone can give some easy to understand examples and an easy process to HELP DECIDE what pattern to use.
Here is a list of my understanding on concept:
1) If you have more data entry/ aspx pages to manipulate then use MVP. MVP has sphageti code in views as it has redundant code for relating to business logic.
2) MVC is a clean and separation of concern implementation. I felt the more controller manipulates data, it gets tougher in designing web pages ( atleast takes lot of time if you have data entry or Telerik Grid manipulation).
What circumstances should I implement other observer, factory and other patterns.
There might be places that I already implement those but now I want to know where and how to know what is best.
Thanks in advance.
Inayat Rasoo...
Participant
836 Points
285 Posts
Re: MVC, MVP and all Design patterns
Jan 25, 2013 11:35 PM|LINK
http://www.developerfusion.com/article/8307/aspnet-patterns-every-developer-should-know/
DigiMortal
Contributor
5658 Points
939 Posts
MVP
Re: MVC, MVP and all Design patterns
Jan 28, 2013 12:35 PM|LINK
Well, there is no single answer to your questions and the correct answer depends on heavily your skills, experiences and preferecnes.
ASP.NET Forms is simpler to go with when you are beginner. Controls are easy to use and you can modify their look, react to events etc. ASP.NET MVC is more close-to-metal framework that is easier to extend and tweak. It is not so simple that using data sources and controls like in ASP.NET Forms. You have to know more about coding to make good progress on ASP.NET MVC.
ASP.NET Forms comes with price that you cannot easily modify the way how controls behave or what output they are producing. ASP.NET MVC is harder for beginner because there are no such cool controls but all output is completely under your control.
If we start talking by architectural patterns you mostly see behind professional applications then ASP.NET Forms applications use Model-View-Presenter pattern that is more complex to implement than Model-View-Controller.
Okay, the story this far is informative and maybe not very helpful. The easiest way to make decision is to try out. Try to build some simple application (really simple application) on ASP.NET Forms and then on ASP.NET MVC and you will see which one of these frameworks likes you better.
Also visit my ASP.NET blog or follow me @ Twitter:twitter.com/gpeipman
Inayat Rasoo...
Participant
836 Points
285 Posts
Re: MVC, MVP and all Design patterns
Jan 28, 2013 05:16 PM|LINK
Thanks DigiMortal.
I spent my whole weekend getting to know about all patterns and Architectures.
I did realize there is not a specific perfect way to program.
Yeah I did learn how ASP.NET Forms uses MVP. Also What are different patterns in Presentation(UI), Host, Structural, Creational(Business Layer) and Persistance(Data Layer) layers.
I want to grow learning all these and implement according to situation even though these patterns are implemented on a large scale projects.
Yes, MVC is what I am working on but its too much of code I have to write for Smart UI according to the need of my projects. I want to implement it as my project might end up mobile.
Thanks.
DigiMortal
Contributor
5658 Points
939 Posts
MVP
Re: MVC, MVP and all Design patterns
Jan 28, 2013 05:40 PM|LINK
If you are new to patterns then first choose tools you feel yourself convenient. Then start writing working code and slowly apply patterns. Patterns are not absolute truth. They are advices or guides to solution but often not correct ones. The fun to find out what pattern works and where and if it works at all belongs always to you.
During real work you will very often create your own patterns for problems you are solving and you use all those known patterns only as much as they make sense in the context you are working. These additional "patterns" are things that take most of your coding time and they are also main thing that makes coding cool work.
To get started the most important thing is to write working code and then improve the code. If you don't know how one or another things starts working then there is no pattern that can help you - patterns can be applies only to working code. I like to describe the whole process as: make it work, make it nice.
Also visit my ASP.NET blog or follow me @ Twitter:twitter.com/gpeipman
Inayat Rasoo...
Participant
836 Points
285 Posts
Re: MVC, MVP and all Design patterns
Jan 28, 2013 07:36 PM|LINK
I will. Thanks.