Pro ASP.NET SharePoint 2010 Solutions: Techniques for Building SharePoint Functionality into ASP.NET Applications

Book description

You've run into this issue numerous times. You are developing an ASP.NET application, and you need to incorporate functionality that comes prepackaged in SharePoint. Wikis, blogs, document management, user authentication, access management—common needs across a variety of solutions. You know there is a way to integrate SharePoint's functionality within ASP.NET solutions, but you don't know how to develop it.

Without guidance and examples, interacting with underlying SharePoint components can be challenging, and working with the different SharePoint APIs is complicated. This book introduces you to a variety of techniques to master the art of developing ASP.NET applications that are built upon a SharePoint foundation. You'll explore integration with SharePoint components, configuration management, Code Access Security, feature packaging, proper use of SharePoint APIs, and advanced deployment techniques. Pro ASP.NET SharePoint 2010 Solutions walks you through all of the steps needed to successfully build and deploy ASP.NET solutions within the SharePoint platform.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
  6. 1. SharePoint as a Development Platform
    1. 1.1. SharePoint Features
      1. 1.1.1. Extensibility
        1. 1.1.1.1. Web Site Extensibility
          1. 1.1.1.1.1. SPFarm
          2. 1.1.1.1.2. SPWebApplication and SPSite
          3. 1.1.1.1.3. SPSite and SPWeb
        2. 1.1.1.2. Development Extensibility
      2. 1.1.2. Document Management
      3. 1.1.3. Authentication and Authorization
        1. 1.1.3.1. Authentication
        2. 1.1.3.2. Authorization
      4. 1.1.4. Microsoft Office Integration
      5. 1.1.5. SharePoint Designer 2010
      6. 1.1.6. SharePoint Workspace
      7. 1.1.7. Visual Studio 2010 Integration
    2. 1.2. Common Approach to Application Development in SharePoint
      1. 1.2.1. Intranet Scenario
      2. 1.2.2. Publishing Site Scenario
    3. 1.3. Sandboxed Solutions
    4. 1.4. Advanced Approaches to Application Development
    5. 1.5. Summary
  7. 2. Visual Studio 2010–Advancing the SharePoint Development Environment
    1. 2.1. Anatomy of a Visual Studio 2010 SharePoint Project
      1. 2.1.1. Empty SharePoint Project
        1. 2.1.1.1. Feature
        2. 2.1.1.2. Package
      2. 2.1.2. Visual Web Part
        1. 2.1.2.1. SharePoint Customization Wizard
          1. 2.1.2.1.1. Deploy As a Farm Solution
          2. 2.1.2.1.2. Deploy As a Sandboxed Solution
        2. 2.1.2.2. Examining the Visual Web Part Solution
          1. 2.1.2.2.1. Elements.xml
          2. 2.1.2.2.2. VisualWebPart1.cs
          3. 2.1.2.2.3. VisualWebPart1.webpart
          4. 2.1.2.2.4. VisualWebPart1UserControl.ascx
          5. 2.1.2.2.5. VisualWebPart1UserControl.ascx.cs
    2. 2.2. Wrapping ASP.NET Development
    3. 2.3. Coding the Sample Visual Web Part
    4. 2.4. Deploying a Solution
      1. 2.4.1. Examining the Deployment Process
      2. 2.4.2. Deploying to a Test or Production Environment
    5. 2.5. Using Features
      1. 2.5.1. Feature.Template.xml
      2. 2.5.2. Feature1.feature and Feature1 Nodes
    6. 2.6. Package Designer
    7. 2.7. Packaging Explorer
    8. 2.8. SharePoint Project Templates
      1. 2.8.1. Sequential Workflow
      2. 2.8.2. State Machine Workflow
      3. 2.8.3. Business Data Connectivity Model
      4. 2.8.4. Event Receiver
      5. 2.8.5. List Definition
      6. 2.8.6. ContentType
      7. 2.8.7. Module
      8. 2.8.8. Site Definitions
      9. 2.8.9. Import Reusable Workflow
      10. 2.8.10. Import SharePoint Solution Package
    9. 2.9. Other Visual Studio Templates and Features
    10. 2.10. Team Development
      1. 2.10.1. Development
      2. 2.10.2. Test
      3. 2.10.3. Production
    11. 2.11. Summary
  8. 3. SharePoint, IIS, and the .NET Framework
    1. 3.1. SharePoint 2010 in IIS 7 Manager
      1. 3.1.1. IIS and .NET Fundamentals
        1. 3.1.1.1. HTTP.sys Protocol Listener
        2. 3.1.1.2. WWW and WAS Services
        3. 3.1.1.3. ISAPI Filters
        4. 3.1.1.4. IISReset.exe
        5. 3.1.1.5. Modules
      2. 3.1.2. SharePoint 2010 File System Folders Under IIS
      3. 3.1.3. SharePoint 2010 Virtual Directories
    2. 3.2. SharePoint 2010 and the .NET Framework
      1. 3.2.1. WSS web.config File
        1. 3.2.1.1. Assemblies
        2. 3.2.1.2. MergedActions
        3. 3.2.1.3. Modules
        4. 3.2.1.4. SafeControls
      2. 3.2.2. Code Access Security
        1. 3.2.2.1. Custom Trust Level Configurations
        2. 3.2.2.2. Strong Name Signing Assemblies
      3. 3.2.3. Sandboxed Solutions
        1. 3.2.3.1. Site Collection Administrator Deployed
        2. 3.2.3.2. Security
    3. 3.3. Summary
  9. 4. SharePoint Architecture–File System, Database, and the Provider Pattern
    1. 4.1. SharePoint 2010 and the File System
      1. 4.1.1. SharePoint Root
        1. 4.1.1.1. ADMISAPI
          1. 4.1.1.1.1. Bin
        2. 4.1.1.2. CONFIG
          1. 4.1.1.2.1. Data
          2. 4.1.1.2.2. HCCab
          3. 4.1.1.2.3. Help
        3. 4.1.1.3. ISAPI
        4. 4.1.1.4. LOGS
          1. 4.1.1.4.1. Policy
          2. 4.1.1.4.2. Resources
        5. 4.1.1.5. TEMPLATE
          1. 4.1.1.5.1. UserCode
          2. 4.1.1.5.2. WebClients
          3. 4.1.1.5.3. WebServices
      2. 4.1.2. Program Files\Microsoft Office Server
        1. 4.1.2.1.
          1. 4.1.2.1.1. Bin
          2. 4.1.2.1.2. Config
          3. 4.1.2.1.3. Data
          4. 4.1.2.1.4. Logs
          5. 4.1.2.1.5. MUI
          6. 4.1.2.1.6. Service
          7. 4.1.2.1.7. Sql
          8. 4.1.2.1.8. Synchronization Service
          9. 4.1.2.1.9. Tools
          10. 4.1.2.1.10. TransformApps
          11. 4.1.2.1.11. WebClients
          12. 4.1.2.1.12. WebServices
      3. 4.1.3. WSS Folders
    2. 4.2. SharePoint 2010 Databases
      1. 4.2.1.
        1. 4.2.1.1.
          1. 4.2.1.1.1. Virtual machine "a" contains the following pre-configured software:
          2. 4.2.1.1.2. Virtual machine "b" contains the following pre-configured software:
          3. 4.2.1.1.3. AdventureWorksDW
          4. 4.2.1.1.4. Application_Registry_Service_DB
          5. 4.2.1.1.5. BDC_Service_DB
          6. 4.2.1.1.6. Contoso_Inventory, Contoso_Retail_DW, and Customers
          7. 4.2.1.1.7. FAST Databases
          8. 4.2.1.1.8. Managed Metadata Service Database
          9. 4.2.1.1.9. PerformancePoint Service Application database
          10. 4.2.1.1.10. ReportServer, ReportServerTempDB
          11. 4.2.1.1.11. Search Service Databases
          12. 4.2.1.1.12. Secure_Store_Service_DB
          13. 4.2.1.1.13. SharePoint_AdminContent
          14. 4.2.1.1.14. SharePoint_Config
          15. 4.2.1.1.15. StateService
          16. 4.2.1.1.16. SupplyChainSQL
          17. 4.2.1.1.17. User Profile Service Application_ProfileDB
          18. 4.2.1.1.18. User Profile Service Application_SocialDB
          19. 4.2.1.1.19. User Profile Service Application_SyncDB
          20. 4.2.1.1.20. WebAnalyticsServiceApplication_ReportingDB, WebAnalyticsServiceApplication_StagingDB
          21. 4.2.1.1.21. WordAutomationServices
          22. 4.2.1.1.22. WSS_Content Databases
          23. 4.2.1.1.23. WSS_Logging
    3. 4.3. SharePoint 2010 and the Virtual Path Provider Pattern
      1. 4.3.1. Object-Oriented Architecture
        1. 4.3.1.1. The Open/Closed Principle
        2. 4.3.1.2. Liskov Substitution Principle
        3. 4.3.1.3. Dependency Inversion Principle
        4. 4.3.1.4. Single Responsibility Principle
        5. 4.3.1.5. Interface Segregation Principle
      2. 4.3.2. The Provider Pattern
      3. 4.3.3. The Virtual Path Provider
    4. 4.4. Summary
  10. 5. Web Parts and Master Pages
    1. 5.1. Web Parts
      1. 5.1.1. Building a Visual Web Part
        1. 5.1.1.1. Adding Code
        2. 5.1.1.2. Examining How SharePoint Loads User Controls
        3. 5.1.1.3. Examining the Configuration Files
        4. 5.1.1.4. Using Strongly Named Assemblies
        5. 5.1.1.5. Deploying the Visual Web Part
        6. 5.1.1.6. Using the Developer Dashboard
      2. 5.1.2. Building a Standard SharePoint Web Part
        1. 5.1.2.1. Adding a Web Part to the Project
        2. 5.1.2.2. Adding Code
        3. 5.1.2.3. Deploying the Web Part
      3. 5.1.3. Building a Silverlight Web Part
        1. 5.1.3.1. Adding Code
        2. 5.1.3.2. Deploying the Silverlight Web Part
      4. 5.1.4. Accessing External Database Content in a Web Part
        1. 5.1.4.1. Storing the Connection String in an XML File
        2. 5.1.4.2. Storing the Connection String in a Hidden List
        3. 5.1.4.3. Storing the Connection String in the web.config File
      5. 5.1.5. Web Parts Summary
    2. 5.2. Master Pages
      1. 5.2.1. Understanding Where Master Pages are Used
      2. 5.2.2. V4.master
      3. 5.2.3. Master Page Content
    3. 5.3. Summary
  11. 6. The Client Object Model
    1. 6.1. Introducing the Client Object Model
      1. 6.1.1. .NET-Managed and Silverlight-Based Clients
      2. 6.1.2. ECMAScript/JavaScript Clients
      3. 6.1.3. Taking Advantage of the Client Object Model
    2. 6.2. Client Object Model Components
      1. 6.2.1. .NET Components
      2. 6.2.2. Silverlight Components
    3. 6.3. Client Object Model API Support
    4. 6.4. Data Retrieval and Interaction
      1. 6.4.1. LoadQuery and Load
        1. 6.4.1.1. Query Syntax Example—LoadQuery
        2. 6.4.1.2. Method Syntax Example—Load
        3. 6.4.1.3. Updating Items Through the Client Object Model
        4. 6.4.1.4. Creating Items Through the Client Object Model
        5. 6.4.1.5. Deleting Items Through the Client Object Model
    5. 6.5. Client Object Model—The Big Three
      1. 6.5.1. Client Object Model Reading List Data via ASP.NET
      2. 6.5.2. Client Object Model Writing List Data via ASP.NET
      3. 6.5.3. Client Object Model Reading List Data via Silverlight—From a Web Part
      4. 6.5.4. Client Object Model Writing List Data via Silverlight
      5. 6.5.5. Debugging Silverlight in SharePoint 2010
      6. 6.5.6. Client Object Model—Reading List Data via ECMAScript/JavaScript
    6. 6.6. Summary
  12. 7. Business Connectivity Services
    1. 7.1. What are Business Connectivity Services?
      1. 7.1.1. What are Business Connectivity Services?
        1. 7.1.1.1. External Content Types
        2. 7.1.1.2. External Lists
        3. 7.1.1.3. External Data Columns
        4. 7.1.1.4. Setting Up BCS
      2. 7.1.2. BCS Solutions with SharePoint Designer
        1. 7.1.2.1. Open SharePoint 2010 Site
        2. 7.1.2.2. Define New External Content Type
          1. 7.1.2.2.1. Discover Data Sources
          2. 7.1.2.2.2. Data Source Credentials and Identity
        3. 7.1.2.3. Create Operations
        4. 7.1.2.4. Create External Lists and Forms
        5. 7.1.2.5. Export BDC Model for Visual Studio 2010
        6. 7.1.2.6. Import BDC Model with Central Administration
      3. 7.1.3. BCS Solutions with Visual Studio 2010
        1. 7.1.3.1. Create Events Database and Table
        2. 7.1.3.2. New SharePoint BDC Model Project
        3. 7.1.3.3. Create Events Code and EventsService Code
        4. 7.1.3.4. Finish BDC Model and Deploy to SharePoint
      4. 7.1.4. BCS Architecture
        1. 7.1.4.1. External Data Store
        2. 7.1.4.2. BCS Connectors
        3. 7.1.4.3. Business Connectivity
        4. 7.1.4.4. Secure Store Service
      5. 7.1.5. Summary
  13. 8. Touch Points–Integrating SharePoint 2010 and ASP.NET
    1. 8.1. Integration Factors
    2. 8.2. Example Business Scenarios
      1. 8.2.1. Corporate Internet and Service Portals
      2. 8.2.2. Existing ASP.NET Product
      3. 8.2.3. New Blended Solution
      4. 8.2.4. Expanding Your Corporate Portal
      5. 8.2.5. Talking to SharePoint
    3. 8.3. Organizational Factors
      1. 8.3.1. Organizational Examples
      2. 8.3.2. SharePoint-Centric Organizations
    4. 8.4. Touch Points
    5. 8.5. Low Touch Point
      1. 8.5.1. Pros
      2. 8.5.2. Cons
    6. 8.6. Branding SharePoint Solutions
      1. 8.6.1. Branding Possibilities, Features, and Tools
        1. 8.6.1.1. Low-Effort Branding
        2. 8.6.1.2. Medium-Effort Branding
        3. 8.6.1.3. High-Effort Branding
      2. 8.6.2. SharePoint Server 2010 Publishing Features
      3. 8.6.3. Working With a Brand
      4. 8.6.4. Branding the ASP.NET Application
      5. 8.6.5. Branding in SharePoint Designer Example
      6. 8.6.6. Deploying Branded Solutions
    7. 8.7. Publishing Layouts
    8. 8.8. Customizing SharePoint 2010 Navigation
      1. 8.8.1. Customizing Navigation Through the User Interface
      2. 8.8.2. Adding Links Through the Object Model
      3. 8.8.3. Navigation Custom Data Sources
    9. 8.9. Summary
  14. 9. Medium Touch Point Solutions
    1. 9.1. Medium Touch Points
      1. 9.1.1. Pros
      2. 9.1.2. Cons
    2. 9.2. Medium Touch Point Examples
      1. 9.2.1. SharePoint and The Cloud
      2. 9.2.2. SharePoint 2010 and Windows Azure MarketPlace
      3. 9.2.3. PowerPivot and Azure
      4. 9.2.4. Accessing Azure DataMarket Feeds Through .NET
      5. 9.2.5. Integrating External Feeds Through .NET WCF Services and jQuery
        1. 9.2.5.1. Setting Up and Migrating Data to a SQL Azure Database
        2. 9.2.5.2. Developing an ASP.NET Application with SQL Azure, WCF, and jQuery
      6. 9.2.6. Consuming an oData Feed with jQuery in SharePoint 2010
    3. 9.3. Summary
  15. 10. High Touch Point Solutions
    1. 10.1. Pros
      1. 10.1.1.
        1. 10.1.1.1. Pros
      2. 10.1.2. Tenets and Constraints for High Touch Point Solutions
      3. 10.1.3. High Touch Point Blended Solution Example
        1. 10.1.3.1. New ASP.NET Web Site Example
          1. 10.1.3.1.1. Add Web Forms Customers and Orders
          2. 10.1.3.1.2. Add ASP.NET Code
        2. 10.1.3.2. Modifying Our ASP.NET Web Site for SharePoint 2010 Integration
          1. 10.1.3.2.1. Create Master Page
          2. 10.1.3.2.2. Reference Master Page on Application Pages
          3. 10.1.3.2.3. Modify web.config
        3. 10.1.3.3. Deploy to SharePoint 2010 Layouts Directory
      4. 10.1.4. Migrating An Existing ASP.NET Application
        1. 10.1.4.1. Client Side Libraries
        2. 10.1.4.2. Third-Party Libraries
        3. 10.1.4.3. Silverlight
      5. 10.1.5. Load Testing Your Blended Solution
    2. 10.2. Summary and Conclusion

Product information

  • Title: Pro ASP.NET SharePoint 2010 Solutions: Techniques for Building SharePoint Functionality into ASP.NET Applications
  • Author(s):
  • Release date: December 2010
  • Publisher(s): Apress
  • ISBN: 9781430231110