You are previewing Building a Web 2.0 Portal with ASP.NET 3.5.
O'Reilly logo
Building a Web 2.0 Portal with ASP.NET 3.5

Book Description

If you think you're well versed in ASP.NET, think again. Thisexceptional guide gives you a master class in site building withASP.NET 3.5 and other cutting-edge Microsoft technologies. Youlearn how to develop rock-solid web portal applications that canwithstand millions of hits every day while surviving scalabilityand security pressures -- not just for mass-consumer homepages, butalso for dashboards that deliver powerful content aggregation forenterprises.Written by Omar AL Zabir, co-founder and CTO of Pageflakes,Building a Web 2.0 Portal with ASP.NET 3.5 demonstrateshow to develop portals similar to My Yahoo!, iGoogle, andPageflakes using ASP.NET 3.5, ASP.NET AJAX, Windows WorkflowFoundation, LINQ and .NET 3.5. Through the course of the book, ALZabir builds an open source Ajax-enabled portal prototype(available online at www.dropthings.com), and walks youthough the design and architectural challenges, advanced Ajaxconcepts, performance optimization techniques, and server-sidescalability problems involved.You learn how to:

  • Implement a highly decoupled architecture following the popularn-tier, widget-based application model

  • Provide drag-and-drop functionality, and use ASP.NET 3.5 tobuild the server-side part of the web layer

  • Use LINQ to build the data access layer, and Windows WorkflowFoundation to build the business layer as a collection ofworkflows

  • Build client-side widgets using JavaScript for fasterperformance and better caching

  • Get maximum performance out of the ASP.NET AJAX Framework forfaster, more dynamic, and scalable sites

  • Build a custom web service call handler to overcomeshortcomings in ASP.NET AJAX 1.0 for asynchronous, transactional,cache-friendly web services

  • Overcome JavaScript performance problems, and help the userinterface load faster and be more responsive

  • Solve scalability and security problems as your site grows fromhundreds to millions of users

  • Deploy and run a high-volume production site while solvingsoftware, hardware, hosting, and Internet infrastructureproblems

  • Building a Web 2.0 Portal with ASP.NET 3.5 also presentsreal-world ASP.NET challenges that the author has solved inbuilding educational and enterprise portals, plus thirteenproduction disasters common to web applications serving millions ofusers. If you're ready to build state-of-the art, high-volume webapplications, this book has exactly what you need.

    Table of Contents

    1. Building a Web 2.0 Portal with ASP.NET 3.5
      1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
      2. Preface
        1. Who This Book Is for
        2. How This Book Is Organized
        3. What You Need to Use this Book
        4. Conventions Used in This Book
        5. Using Code Examples
        6. Safari® Books Online
        7. How to Contact Us
        8. Acknowledgments
      3. 1. Introducing Web Portals and Dropthings.OmarALZabir.com
        1. Defining a Web Portal
        2. Defining a Web 2.0 Portal
        3. Using a Web Portal
          1. How an Ajax-Powered Start Page Is Different
        4. Navigating Dropthings
        5. Using ASP.NET AJAX
        6. Using C# 3.0 and .NET 3.5
        7. Summary
          1. Additional Resources
      4. 2. Architecting the Web Portal and Widgets
        1. Object Model
          1. Object Model
          2. Application Components
          3. Data Model
          4. Solution Files
          5. Update Panels
          6. Drag-and-Drop Operations
        2. Using a Widget Framework
          1. Designing the Widget Container
        3. Adding Widgets
        4. Maximizing the First-Visit Experience
        5. Rendering a Second-Visit Experience
        6. Improving ASP.NET AJAX Performance
          1. Server-Side Rendering Versus Client-Side Rendering
          2. Runtime Size Analysis
          3. Reducing Extenders and UpdatePanels to Improve Browser Response
          4. Comparing Debug Mode Versus Release Mode
        7. Adding Authentication and Authorization
        8. Preventing Denial-of-Service Attacks
        9. Summary
      5. 3. Building the Web Layer Using ASP.NET AJAX
        1. Implementing the Start Page of a Web Portal
          1. The Header Area
          2. Add Stuff Area: The Widget Gallery
          3. The Tab Bar
          4. The Widget Area: The Three-Column Widget View
          5. Loading the Start Page
        2. Building a Custom Drag-and-Drop Extender for a Multicolumn Drop Zone
        3. Implementing WidgetContainer
          1. WidgetContainer.cs
            1. Updating
            2. Saving and editing
            3. Adding InstanceID
            4. Closing the widget
        4. Building Widgets
          1. Building a Flickr Photo Widget
            1. Flickr widget UI controls
          2. Building an Atom or RSS Widget
        5. Page Switching: Simulating a Nonpostback Experience
        6. Using the Profile Object Inside a Web Service
        7. Implementing Authentication and Authorization
        8. Implementing Logout
          1. Handlers
        9. Summary
          1. Additional Resources
      6. 4. Building the Data and Business Layers Using .NET 3.5
        1. Introducing LINQ to SQL
        2. Building the Data Access Layer Using LINQ to SQL
          1. Generating a Data Model Using the Visual Studio 2008 Designer
          2. Manipulating Data with a Database Helper
          3. Cleaning Up Inactive User and Related Data
        3. Introducing Windows Workflow Foundation
        4. Building the Business Layer Using WF
          1. Mapping User Actions to a Workflow
          2. Dealing with First Visit by a New User (NewUserSetupWorkflow)
          3. Dealing with the Return Visit of an Existing User (UserVisitWorkflow)
          4. Adding a New Tab (AddNewTabWorkflow)
          5. Moving Widgets (MoveWidgetInstanceWorkflow)
        5. Implementing the DashboardFacade
          1. Implementing the WorkflowHelper Class
        6. Summary
      7. 5. Building Client-Side Widgets
        1. Delaying Server-Side Widget Loading
          1. Delaying RSS/Atom Widget Loading
          2. Delay Flickr Photo Widget Loading
          3. Problems with Delaying Widget Loading
        2. Content Proxy
          1. Content Proxy Web Service
          2. Challenges with the Proxy Web Service
        3. Building a Client-Side RSS Widget
        4. Building a Client-Side Flickr Widget
        5. Summary
      8. 6. Optimizing ASP.NET AJAX
        1. Combining Multiple Ajax Calls into One Call
        2. Timing and Ordering Ajax Calls to the Server
          1. Bad Calls Make Good Calls Time Out
            1. Common problems
          2. Browsers Fail to Respond with Two or More Calls in Queue
          3. Caching Web Service Responses on the Browser
        3. Using HTTP GET Calls Instead of HTTP POST
        4. Working with the this Function
        5. Summary
      9. 7. Creating Asynchronous, Transactional, Cache-Friendly Web Services
        1. Scalability Challenges with Web Services
        2. Asynchronous Web Methods
        3. Modifying the ASP.NET AJAX Framework to Handle Web Service Calls
          1. Initializing the Cache Policy
        4. Developing Your Own Web Service Handler
          1. Basics of Asynchronous Web Service Handlers
          2. Adding Transaction Capability to Web Methods
          3. Adding Cache Headers
          4. Using the Attributes
          5. Handling the State Object
        5. Making an Asynchronous and Cache-Friendly Proxy
        6. Scaling and Securing the Content Proxy
          1. Maintaining Speed
            1. Connection management
            2. DNS resolution
          2. Avoiding Proxy Abuse
          3. Defending Against Denial-of-Service Attacks
        7. Summary
      10. 8. Improving Server-Side Performance and Scalability
        1. Instrumenting Your Code to Identify Performance Problems
        2. Optimizing the HTTP Pipeline
        3. Optimizing ASP.NET 2.0/3.5 Before Going Live
        4. Optimizing Queries in the ASP.NET Membership Tables
        5. Optimizing the ASP.NET 2.0/3.5 Profile Provider Before You Go Live
          1. Accessing the Use of Profile Provider
          2. Using Email for a Username
          3. Changing a Username in the ASP.NET 2.0/3.5 Membership Provider
          4. Rendering Page Parts As JavaScript
            1. Using HttpModule
            2. The HttpModule in detail
        6. ASP.NET Production Challenges
          1. Fixing Cookie Authentication Problems
            1. Generating the key
            2. Each machine requires a key
        7. Redirecting Traffic from an Old Web Site to a New One
        8. Summary
      11. 9. Improving Client-Side Performance
        1. Understanding Web Caching
          1. Basics of Web Caching
          2. Types of Web Caches
          3. Web Cache Problems
          4. How Web Caches Work
          5. Controlling Response Cache
            1. HTML metatags and HTTP headers
            2. Cache control in response header
            3. Pragma HTTP headers
            4. Controlling caches with the Expires HTTP header
            5. Cache-control HTTP headers
            6. ETag, last-modified headers
          6. Principles for Making the Best Use of Cache
          7. How to Configure Static Content Caching in IIS
        2. Content Delivery Networks
          1. Examining Web Site Performance Without a CDN
          2. Different Types of CDNs
        3. Optimizing Internet Explorer JavaScript Performance
          1. Reducing IE Symbolic Lookups
            1. Evaluating local variables
            2. Reducing symbolic lookup on DOM elements
            3. Speeding symbolic lookup by caching DOM elements, properties, and functions
          2. Mitigating Internet Explorer Memory Leak
            1. Avoid using event handlers as closures
            2. Use out-of-scope functions
            3. Remove DOM elements
        4. Reducing the Web Service Call Payload
        5. Loading the UI on Demand
        6. Using Read-Ahead Caching for Ajax Calls
        7. Hiding HTML Inside <textarea>
        8. Summary
      12. 10. Solving Common Deployment, Hosting, and Production Challenges
        1. Deploying Your Web Site in a Web Farm
          1. Web Farm Pros and Cons
          2. Designing a Reasonable Hosting Configuration
        2. Thirteen Production Disasters That Could Happen at Anytime
          1. The Hard Drive Crashes, Overheats
          2. The Controller Malfunctions
          3. The RAID Malfunctions
            1. Pros and cons of RAID 1
            2. Pros and cons of RAID 5
          4. The CPU Overheats and Burns Out
          5. The Firewall Goes Down
          6. The Remote Desktop Stops Working After a Patch Installation
          7. Remote Desktop Exceeds Connection Limit and Login Fails
          8. The Database Becomes Corrupted When Files Are Copied over the Network
          9. The Production Database Was Accidentally Deleted
          10. The Hosting Service Formatted the Running Production Server
          11. Windows Was Corrupted Until It Was Reinstalled
          12. The DNS Goes Down
          13. The Internet Backbone Goes Down in Different Parts of the World
        3. Choosing the Right Hosting Provider
          1. Checklist for Choosing the Right Hosting Provider
        4. Choosing a Web Site Monitoring Tool
        5. Configuring Proper Performance Counters
          1. Monitoring Web Server Performance Counters
          2. Monitoring Database Server Performance Counters
        6. Summary
      13. Index
      14. About the Author
      15. Colophon
      16. SPECIAL OFFER: Upgrade this ebook with O’Reilly