Design Patterns in Simple Examples

Discussion in 'Engineering Concepts' started by shabbir, Jul 5, 2007.

  1. r0o0cky

    r0o0cky New Member

    Joined:
    Jul 4, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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.
     
  3. sigfin2004

    sigfin2004 New Member

    Joined:
    Feb 23, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Nope I have used Visual Studio and EA.
     
    xpertprogrammer likes this.
  5. sigfin2004

    sigfin2004 New Member

    Joined:
    Feb 23, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    EA is sparx enterprise architect.

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

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    No I don't have them.
     
    xpertprogrammer likes this.
  7. simple

    simple New Member

    Joined:
    Sep 13, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Flyweight = use the same existing one instead of creating new one. in your example how its achieved?
     
  8. Trimegisto

    Trimegisto Member

    Joined:
    Mar 15, 2011
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Home Page:
    http://networksandservers.blogspot.com/
    Very useful info. Thanks!
     
  9. Md Tariq ul Islam

    Md Tariq ul Islam New Member

    Joined:
    Oct 4, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    source code download link is not working
     
  10. shantanudesai2009

    shantanudesai2009 New Member

    Joined:
    Dec 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.. :)
     
  11. mitendra

    mitendra New Member

    Joined:
    Dec 17, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    very nice work. Thanks!
     
  12. raymondc

    raymondc New Member

    Joined:
    Dec 29, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi Shabbir,
    Am not able to open the downloaded zip file. Complains it is corrupt. Can you please verify.

    Cheers,
    RayC
     
  13. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Its verified multiple times and yet again today. I see no issues in the files when downloaded.
     
    xpertprogrammer likes this.
  14. Trimegisto

    Trimegisto Member

    Joined:
    Mar 15, 2011
    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Home Page:
    http://networksandservers.blogspot.com/
    I can confirm that; the files are ok!
     
  15. jandrecosta

    jandrecosta New Member

    Joined:
    May 19, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Portugal
    Hi Shabbir,

    I need some help, I am trying to identify the design patterns existents in the Enterprise Library in the Exception code.
    Im a student with some programming dificulties, and the more that I read, more confused I get.

    Can you give me a help here?

    Thank you
     
  16. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Not sure I am able to understand what issues you are having. Can you explain a bit more.
     
    xpertprogrammer likes this.
  17. jandrecosta

    jandrecosta New Member

    Joined:
    May 19, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Portugal
    I am studying tha Enterprise library 5.0 and I must identify in the exception block which of the design patterns are implemmented. I would like to ask you if you have something on this that may help me with my quest.
     
  18. pradeeptc

    pradeeptc New Member

    Joined:
    Jun 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    The downloaded sample file doesnt have a valid extension (inside the zip file). Any idea what is the problem?
     
  19. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    What extension do you have and what is the expected extension of the file?
     
    xpertprogrammer likes this.
  20. pradeeptc

    pradeeptc New Member

    Joined:
    Jun 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Sorry . It was mistake. When I downloaded the fie from the link (in ur explanatio at the beginning u have mentioned about the sample file), it was extracted as a file without any extension. May be my machine problem. When I have downloaded from the bottom, I got the proper file. Do u have the C++ version of these files?

    Great work.

    -Pradeep
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice