Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Engineering Concepts (http://www.go4expert.com/articles/engineering-concepts-tutorials/)
-   -   Design Pattern in Simple Examples (http://www.go4expert.com/articles/design-pattern-simple-examples-t5127/)

r0o0cky 10Jul2011 16:34

Re: Design pattern in simple examples
 
I found awnser to my query, so i thought to share it in this forum so others can also know this. Bydefault ASP.NET implements Page Controller pattern through out the ASP.NET Page life cycle which is the code-behind page.

For beginners who have just started working on ASP.NET the page controller pattern can serve as entry level. The drawback is lack of unit testing and repetition of logic as the logic resides inside the code behind file.

Next level after this could be the MVP pattern, which is best for UI applications like ASP.NET, Windows, Mobile, etc. This pattern is easy to learn and very manageable. But it is recommended only if you need unit testing, you need to reuse the logic, or your interface can be different like Web, Windows or Mobile application.

Shabbir you can correct me if I am incorrect anywhere, Thanks.

shabbir 10Jul2011 20:55

Re: Design pattern in simple examples
 
Quote:

Originally Posted by r0o0cky (Post 84896)
I found awnser to my query, so i thought to share it in this forum so others can also know this. Bydefault ASP.NET implements Page Controller pattern through out the ASP.NET Page life cycle which is the code-behind page.

For beginners who have just started working on ASP.NET the page controller pattern can serve as entry level. The drawback is lack of unit testing and repetition of logic as the logic resides inside the code behind file.

Next level after this could be the MVP pattern, which is best for UI applications like ASP.NET, Windows, Mobile, etc. This pattern is easy to learn and very manageable. But it is recommended only if you need unit testing, you need to reuse the logic, or your interface can be different like Web, Windows or Mobile application.

Shabbir you can correct me if I am incorrect anywhere, Thanks.

I am not ASP.NET expert and so cannot comment on what you are saying but I think if you have tested it would right only. Yes MVP pattern is used at many places including in MFC classes.

sigfin2004 22Aug2011 20:31

Re: Design pattern in simple examples
 
may i ask the sources for the main UML diagram, they look like they were built using sparx enterprise architect. would be most grateful sir.

Thanks for any consideration.

shabbir 22Aug2011 21:11

Re: Design pattern in simple examples
 
Quote:

Originally Posted by sigfin2004 (Post 86267)
may i ask the sources for the main UML diagram, they look like they were built using sparx enterprise architect. would be most grateful sir.

Thanks for any consideration.

Nope I have used Visual Studio and EA.

sigfin2004 22Aug2011 21:20

Re: Design pattern in simple examples
 
Quote:

Originally Posted by shabbir (Post 86269)
Nope I have used Visual Studio and EA.

EA is sparx enterprise architect.

: ) i would appreciate it if you still have the eap file?

shabbir 22Aug2011 21:49

Re: Design pattern in simple examples
 
Quote:

Originally Posted by sigfin2004 (Post 86270)
EA is sparx enterprise architect.

: ) i would appreciate it if you still have the eap file?

No I don't have them.

simple 13Sep2011 13:32

Re: Design pattern in simple examples
 
Flyweight = use the same existing one instead of creating new one. in your example how its achieved?

Trimegisto 22Sep2011 16:34

Re: Design pattern in simple examples
 
Very useful info. Thanks!

Md Tariq ul Islam 4Oct2011 14:32

Re: Design pattern in simple examples
 
source code download link is not working

shantanudesai2009 4Dec2011 00:51

Re: Design pattern in simple examples
 
Hey.. thats really nice and helpful post for the newbies in DP.. Can u please suggest me where I can find excercises on Design patterns.. like case studies or something..??

Example : Some situation be given , and asked for which design pattern will suit this..?? or some situation be given, and asked how "particular" DP is used here??

It shall really be helpful.. thanks in advanced.. :)


All times are GMT +5.5. The time now is 18:07.