You are previewing Real World .NET 4, C#, and Silverlight®: Indispensible Experiences from 15 MVPs.

Real World .NET 4, C#, and Silverlight®: Indispensible Experiences from 15 MVPs

  1. Cover Page
  2. Title Page
  3. Copyright
  4. Dedication
  5. ABOUT THE TECHNICAL EDITOR
  6. CREDITS
  7. Acknowledgments
  8. Contents
  9. Contents
  10. INTRODUCTION
    1. WHO THIS BOOK IS FOR
    2. WHAT THIS BOOK COVERS
    3. WHAT YOU NEED TO USE THIS BOOK
    4. CONVENTIONS
    5. SOURCE CODE
    6. ERRATA
    7. P2P.WROX.COM
  11. 1: ASP.NET and jQuery
    1. UNDERSTANDING WEB FORMS
    2. ASP.NET MVC
    3. JQUERY
    4. SUMMARY
    5. ABOUT THE AUTHOR
  12. 2: ASP.NET Performance
    1. LOOKING AT HOW ASP.NET HANDLES PAGE REQUESTS
    2. STATE MANAGEMENT AND CACHING
    3. CACHING WEB SERVICES
    4. HARDWARE CONSIDERATIONS
    5. USING PERFORMANCE COUNTERS
    6. TIPS AND TRICKS
    7. SUMMARY
    8. ABOUT THE AUTHOR
  13. 3: Ethical Hacking of ASP.NET
    1. ETHICAL HACKING — IS THAT AN OXYMORON?
    2. FILLING YOUR TOOLBOX
    3. UNDERSTANDING SESSION MANAGEMENT
    4. ATTACKING THE ASP.NET AUTHENTICATION
    5. ATTACKING THE ASP.NET SESSION
    6. HACKING THE VIEW STATE
    7. TRICKING EVENT HANDLERS
    8. SUMMARY
    9. ABOUT THE AUTHOR
  14. 4: How to Build a Real World Silverlight 5 Application
    1. SETTING THE SCENE FOR THE APPLICATION
    2. PROTOTYPE FIRST, CODE LATER — USING SKETCHFLOW
    3. DATA-BINDING PRIMER
    4. WCF RIA SERVICES IN ACTION
    5. APPLYING THE MVVM PATTERN
    6. CREATING CUSTOMIZED CONTROLS
    7. SUMMARY
    8. ABOUT THE AUTHOR
  15. 5: Silverlight — The Silver Lining for Line-of-Business Applications
    1. GETTING STARTED
    2. CHOOSING THE RIGHT SILVERLIGHT FRAMEWORK
    3. TAKING SILVERLIGHT OUT-OF-THE-BOX
    4. THE FUTURE OF SILVERLIGHT
    5. SUMMARY
    6. ABOUT THE AUTHOR
  16. 6: Tips and Tricks for Designers and Developers
    1. UNDERSTANDING THE DIFFERENCES BETWEEN SILVERLIGHT AND WPF
    2. TIPS AND TRICKS FOR DESIGNERS
    3. TIPS AND TRICKS FOR DEVELOPERS
    4. SUMMARY
    5. ABOUT THE AUTHOR
  17. 7: MVVM Patterns in Silverlight 4
    1. DEVELOPING YOUR OWN FRAMEWORK
    2. GETTING TO KNOW MVVM
    3. CREATING AN MVVM FRAMEWORK
    4. EXISTING MVVM FRAMEWORKS
    5. ADDITIONAL CONSIDERATIONS
    6. SUMMARY
    7. ABOUT THE AUTHOR
  18. 8: Windows Phone “Mango” for Silverlight Developers
    1. HARDWARE FOUNDATION
    2. SOFTWARE FOUNDATION
    3. APPLICATION MODEL
    4. INTEGRATION SERVICE
    5. SUMMARY
    6. ABOUT THE AUTHOR
  19. 9: Pragmatic Services Communication with WCF
    1. SAMPLE PROJECT
    2. SERVICE ORIENTATION REVISITED
    3. WCF BASICS 101
    4. APPLICATION SCENARIO
    5. MODELING SERVICES
    6. IMPLEMENTING SERVICES
    7. HOSTING SERVICES
    8. CONSUMING SERVICES
    9. COMPLEMENTING SERVICE APPROACH
    10. OPTIMIZATION STRATEGIES
    11. SUMMARY
    12. ABOUT THE AUTHOR
  20. 10: Securing WCF Services Using the Windows Identity Foundation (WIF)
    1. IDENTITY IN .NET APPLICATIONS
    2. WCF AND WIF
    3. POSSIBLE SOLUTIONS FOR SECURING THE MOVIE DATABASE SOAP SERVICE
    4. POSSIBLE SOLUTIONS FOR SECURING THE MOVIE DATABASE REST SERVICE
    5. SUMMARY
    6. ABOUT THE AUTHOR
  21. 11: Applied .NET Task Parallel Library
    1. PROBLEMS AND SOLUTIONS
    2. USING TASKS
    3. UNDERSTANDING TPL-STYLE EXCEPTION HANDLING
    4. UNDERSTANDING CANCELLATIONS
    5. USING CONCURRENT COLLECTIONS — CONCURRENTQUEUE
    6. UNDERSTANDING CONTINUATIONS
    7. USING THE BLOCKINGCOLLECTION CLASS
    8. SUMMARY
    9. ABOUT THE AUTHOR
  22. 12: The WF Programming Language
    1. GETTING STARTED
    2. CONTROLLING THE FLOW OF EXECUTION
    3. BUILDING CUSTOM ACTIVITIES
    4. USING PERSISTENCE
    5. HOSTING WORKFLOWS INSIDE WINDOWS APPFABRIC
    6. FURTHER READING
    7. SUMMARY
    8. ABOUT THE AUTHOR
  23. 13: Practical WPF Data Binding
    1. SAMPLE APPLICATION
    2. DATA BINDING OVERVIEW
    3. USING BINDING COMMANDS
    4. USING SIMPLE DATA BINDING
    5. VALUE CONVERSION
    6. BINDING MULTIPLE PROPERTIES
    7. BINDING TO LISTS
    8. EDITING DATA
    9. SUMMARY
    10. ABOUT THE AUTHOR
  24. 14: Driving Development with User Stories and BDD
    1. CAPTURING REQUIREMENTS AS FEATURES WITH USER STORIES
    2. THE SHORTCOMINGS OF TDD
    3. FOCUSING ON BEHAVIOR WITH BDD
    4. CAPTURING THE TIC-TAC-TOE FEATURES WITH USER STORIES
    5. GETTING STARTED WITH THE PROJECT
    6. MOVING FORWARD
    7. SUMMARY
    8. ABOUT THE AUTHOR
  25. 15: Automated Unit Testing
    1. UNDERSTANDING UNIT TESTS
    2. UNDERSTANDING THE BENEFITS OF A TEST-FIRST APPROACH
    3. GETTING ORIENTED WITH A BASIC EXAMPLE
    4. ASSIGN, ACT, ASSERT
    5. CODE, TESTS, FRAMEWORKS, AND RUNNERS
    6. SOLUTION/PROJECT STRUCTURE
    7. USING NUGET TO BLEND NUNIT AND VS 2010
    8. METHODS WITH FAKES AND MOCKS
    9. CLASS ATTRIBUTES, TEST ATTRIBUTES, AND SPECIAL METHODS
    10. TESTING THE HARD TO TEST — PUSHING THE EDGES
    11. USING SENSING VARIABLES TO REFACTOR NONTESTABLE CODE
    12. USING AUTOMATED UNIT TESTING WITH OTHER PRACTICES
    13. SUMMARY
    14. ABOUT THE AUTHOR
  26. INDEX
O'Reilly logo

2

ASP.NET Performance

by Bill Evjen

It is one thing to know how to build an ASP.NET application and get everything working as you want. It is another thing to get it working well. As you build web applications today, you must also ensure that the choices you make in the construction of the application also work well with regard to the overall performance of the application.

As your web application takes on more user load, you have options for how you want to deal with the growth. The choices you have can be made either via the code of your application, or via actual hardware changes.

This chapter covers a lot of different ground, but all the items mentioned here have a direct impact on the overall performance of your ASP.NET applications.

This chapter includes discussions on how to deal with state management and caching. Also touched upon are hardware considerations and configuration for your server. Finally, this chapter covers how to monitor your application's performance, because this will help you fine-tune what is wrong, or what could be improved.

LOOKING AT HOW ASP.NET HANDLES PAGE REQUESTS

Before starting on some of the items you can do to your applications to help with performance, it is first important to understand how ASP.NET handles page requests. ASP.NET compiles your ASP.NET pages (.aspx) as they are referenced (for example, by an end user in the browser).

When an ASP.NET page is referenced in the browser for the first time, the request is passed to the ASP.NET parser ...

The best content for your career. Discover unlimited learning on demand for around $1/day.