Common ASP.NET       Design Patterns       Steve Smith       @ardalis | ardalis.com       Telerikhttp://flic.kr/p/4MEeVn
http://about.me/stevenasmith
http://flic.kr/p/8XgqKu
http://flic.kr/p/6StgW5
http://flic.kr/p/6UpMt9
http://geekandpoke.typepad.com/geekandpoke/2011/04/design-patterns-are-still-useful.html
Actual Usage   http://twtpoll.com/r/t7jzrx
(Of course there are many others!)


Source: http://csharpindepth.com/Articles/General/Singleton.aspx
                    Shameless Plug:           But why would you       Telerik JustMock can be        intentionally wr...
http://flic.kr/p/6spkwo
            

        
“new” creates tight coupling                         between classeshttp://flic.kr/p/aN4Zv
                    
Compile Time          Runtime        User Interface                          Database
Compile Time        Runtime    User Interface     Helper Class      Database
Compile Time                                Runtime                   User Interface           Core              Infras...
                
            

http://flic.kr/p/5Yb5i
            
               Pending    Archived             Published
http://flic.kr/p/vGpC2
                    

Design Patterns in ActionCODE WALKTHROUGH
A Tale from theREAL WORLD
    

Thanks!• Find me at http://ardalis.com• We’re hiring developers and trainers at  Telerik!• http://telerik.com/company/care...
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
Upcoming SlideShare
Loading in …5
×

Common asp.net design patterns aspconf2012

9,407 views

Published on

Design Patterns provide common templates for solving the same family of problems in a similar way. They also provide a higher-level language for software developers to use to describe approaches they might choose when designing a component of an application. In this session, you'll learn about several of the most common, and useful, design patterns used by ASP.NET developers today.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
9,407
On SlideShare
0
From Embeds
0
Number of Embeds
4,515
Actions
Shares
0
Downloads
96
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • General, reusable solutions to common problemsNot a complete, finished solutionA template, recipe, or approach to solving certain problemsEach has a specific name, so we can discuss common elements of design using a common vocabulary
  • Learning anything – a musical chord, a martial arts technique, etc.Zero: You used a what? Never heard of it.Awakening:Wow, I just learned how XYZ pattern can improve my design. I’m not really sure where it would work in my code, but I’m definitely looking.Overzealous:I totally “get” the XYZ pattern; I’m adding it everywhere I can shoehorn it into my code. My design’s gonna be better now, for sure!Mastery: In response to some specific design pain points, the XYZ pattern was a logical next step and was achieved through a simple refactoring.
  • Design pattern names provide placeholders or complex abstractions and sets of refactorings. Consider the difference between:We have some tight coupling to the database here. We can probably fix it if we apply these refactorings;extract an interface, extract a method, Extract a class,Replace local with parameterORLet’s apply the Repository pattern to fix it.
  • It’s possible for the new Singleton(); line to be called more than once.
  • http://en.wikipedia.org/wiki/File:Proxy_concept_en.svg
  • Apply patterns via refactoring,Not Big Design Up Front
  • Show the MvcMusicStore applicationHg clone https://hg.codeplex.com/forks/ssmith/mvcmusicstorerepositorypattern 
  • Talk about the CacheDependencyBug in AdSignia and how it was introduced by moving a hard-coded instantiation to a parameter, and then fixed by replacing the parameter with a Factory (lambda).
  • Common asp.net design patterns aspconf2012

    1. 1. Common ASP.NET Design Patterns Steve Smith @ardalis | ardalis.com Telerikhttp://flic.kr/p/4MEeVn
    2. 2. http://about.me/stevenasmith
    3. 3. http://flic.kr/p/8XgqKu
    4. 4. http://flic.kr/p/6StgW5
    5. 5. http://flic.kr/p/6UpMt9
    6. 6. http://geekandpoke.typepad.com/geekandpoke/2011/04/design-patterns-are-still-useful.html
    7. 7. Actual Usage http://twtpoll.com/r/t7jzrx
    8. 8. (Of course there are many others!)
    9. 9. 
    10. 10. 
    11. 11. Source: http://csharpindepth.com/Articles/General/Singleton.aspx
    12. 12.    Shameless Plug: But why would you Telerik JustMock can be intentionally write code  usedcan mocktest with you to only and test certainSingletons tools? premium 
    13. 13. http://flic.kr/p/6spkwo
    14. 14.    
    15. 15. 
    16. 16.   
    17. 17. “new” creates tight coupling between classeshttp://flic.kr/p/aN4Zv
    18. 18.      
    19. 19. Compile Time Runtime User Interface     Database
    20. 20. Compile Time Runtime User Interface Helper Class Database
    21. 21. Compile Time Runtime User Interface Core Infrastructure IFooRepository SqlFooRepository   Database
    22. 22.     
    23. 23.    
    24. 24. 
    25. 25. http://flic.kr/p/5Yb5i
    26. 26.    
    27. 27.  Pending Archived Published
    28. 28. http://flic.kr/p/vGpC2
    29. 29.      
    30. 30. 
    31. 31. Design Patterns in ActionCODE WALKTHROUGH
    32. 32. A Tale from theREAL WORLD
    33. 33.  
    34. 34. 
    35. 35. Thanks!• Find me at http://ardalis.com• We’re hiring developers and trainers at Telerik!• http://telerik.com/company/careers.aspx

    ×