Lamont Harrington's Blog

Microsoft Solutions Development, Architecture, and Technology Evangelism

The Microsoft patterns & practices team has recently released Developing Applications for SharePoint 2010 Guidance.

What's in Developing Applications for SharePoint 2010?

 

 

ComponentDescription
The guide

"Application Foundations for SharePoint 2010" describes approaches you can use to address the challenges of testability, flexibility, configuration, logging and exception handling, and maintainability; it also explains how to use the SharePoint Guidance Library components in these areas.

"Execution Models in SharePoint 2010" provides deep technical insights into the mechanics of the full-trust execution environment, the sandbox execution environment, and various hybrid approaches to executing code in SharePoint applications.

"Data Models in SharePoint 2010" explains new list and external data functionality and data access techniques, key design decision points that can help you to choose between standard SharePoint lists and external lists, and techniques and patterns to address large lists and list aggregation.

"Client Models in SharePoint 2010" provides guidance on how to best use the new client-side functionality to access data and build richer client experiences with Silverlight and Ajax.

Each section also contains a set of how-to topics. These explain how to perform specific tasks that the team found challenging to discover.

Reference Implementations

This release includes eight reference implementations that you can deploy to a SharePoint 2010 test environment. The reference implementations reinforce the key concepts in the guide and illustrate how to build applications that reflect real-world scenarios. Each reference implementation includes a detailed scenario and design overview, an explanation of the design decisions the team faced for the implementation, and an installation script to automate setup. This release includes reference implementations for the following scenarios:

  • Sandboxed solution
  • Sandboxed solution with a full-trust proxy
  • Sandboxed solution with External List
  • Sandboxed solution with custom workflow activities
  • Farm Solution (timer job)
  • SharePoint List Data Models
  • External Data Models
  • Client Application Models
The SharePoint Guidance Library

The library is a collection of reusable classes delivered as source code that address common challenges in application development for the SharePoint platform. This release improves on the previous release of the library by adding support for sandboxed solutions and taking advantage of new SharePoint features. The SharePoint Guidance Library consists of three key components:

  • SharePoint Service Locator. This provides a simple implementation of the Service Locator pattern for SharePoint applications. The service locator enables you to isolate your code from dependencies on external types, which makes your code more modular, easier to test, and easier to maintain.
  • Application Settings Manager. This provides a robust and consistent mechanism for storing and retrieving configuration settings at each level of the SharePoint hierarchy, from individual sites (SPWeb) to the entire server farm (SPFarm).
  • SharePoint Logger. This provides easy-to-use utility methods that you can employ to write information to the Windows Event log and the SharePoint Unified Logging Service (ULS) trace log. It also enables you to create custom diagnostic areas and categories for logging.

Click here to download the guidance




I was recently contacted through my blog with a question on how to dynamically hide/show a web part on a web part page based on a user's selection of a UI element on the page.  While there's several methods you could employ to perform this task, one nice, neat implementation that you could leverage is posted up on our CodePlex site called the SharePoint Web Part Visibility Filter Web Part.

Through the implementation of this web part, you have the ability to accomplish the following scenario:

You have a standard SharePoint list containing a listing of items that offer selection options and a 'Item Detail' part, which happens to be an implementation of the Visibility Filter Part, that will show detail information based on the user selection from the list above it.

In the screenshot below, upon making a different selection from the list of items, a new details web part is now displayed showing details for the selected item.

Now this implementation is built upon concepts that have been around SharePoint for quite some time, like connected web parts, however, this is a decent implementation that addresses the requirement for being able to dynamically hide and show web parts based on some dynamic criteria.

Head over to CodePlex and take a look at this project.  Pretty interesting!

A few caveats to keep in mind (taken from the notes on the project's CodePlex page):

  • The web part needs to render itself before the web part(s) that may be affected by it (hidden or unhidden), so you need to place it in a web part zone above the potentially affected web parts.  Web parts are rendered in order of their zone indexes, and then their index within each zone.  If a web part is rendered before the Visibility Filter Web Part that affects it, its visibility will not appear to have changed because it was already rendered.  In other words, your Visibility Filter web parts should probably be placed at the top of your page, before all other web parts.
  • This web part does not actually generate any visible HTML output to the page (it affects other web parts) but can emit Javascript to the page. By default, when it is placed on a page, its visibility is automatically set to Hidden. The Javascript it generates is to modify the titles of web parts that it is unhiding (if any). SharePoint adds the string "(Hidden)" to any web parts that are initially hidden and that remains even if this web part unhides them, so it generates Javascript to find the titles of those unhidden web parts and removes the "(Hidden)" string from their title.
  • You may need to include multiple instances of this web part on a page to selectively hide/unhide web parts.
  • Although this web part can dynamically hide other web parts, those web parts will still internally "render". They are hidden using the SharePoint web part API (not via CSS or Javascript on the page) so the data from the web part will not be generated on the page at all, but SharePoint will still "execute" the web part code, so hiding it will not reduce any significant load on the server. In other words, if you have a web part such as a Data View Web Part that queries a SQL database, it will still query the database even if this web part hides it, although the result of the rendering will not be output to the browser. That is to say, if you have 10 web parts on a page and this web part hides 5 of them, except for the time it takes to load the page in the browser, the page will not render much faster because those 5 web parts are hidden. From the server side, it would be as if all 10 web parts were still on the page.

 Enjoy!




One of the cool aspects of working at Microsoft is the opportunity to work on some fantastic projects.  It’s truly been a pleasure working on some great internet facing SharePoint websites that showcase the platform’s ability to service some of the internet’s most demanding websites and show it’s effectiveness as a web content management platform. 

Today, the newly redesigned/re-architected Recovery.gov website that’s running completely on SharePoint Server 2007 was launched!

Recovery.gov

Recovery.gov is a government website designed to provide transparency in to how stimulus funds provided by the federal government are being allocated and spent on various stimulus related projects across the US.  On February 13, 2009, Congress passed the American Recovery and Reinvestment Act of 2009, who’s main goals are to:

  1. Create and save jobs
  2. Spur economic activity and invest in long-term economic growth
  3. Foster unprecedented levels of accountability and transparency in government spending

To that end, SharePoint Server 2007 was chosen as the platform to deliver on the requirements for the Recovery.gov site and will deliver compelling features and functionality that provides deep insight into how stimulus funds are being spent.  Head on over to Recovery.gov and check it out!




p_n_p

The Patterns & Practices team has recently released new guidance around building collaborative applications on the SharePoint platform.

The goal of this release is to help customers understand how to develop large scale, content-driven SharePoint applications that extend the value of existing line of business systems.  It essentially focuses on three primary objectives:

  1. Large Scale – Show customers how to build a large scale SharePoint application.  This includes guidance on building in the manageability, configurability, and performance expected from large scale applications.
  2. Content Driven – More advanced SharePoint applications often include many sites and combine custom coded logic with created content.  The guidance demonstrates areas like custom navigation and publishing, composing web parts with published information, and managing a consistent UI.
  3. Extend LOB Systems – SharePoint can aggregate and extend information from Line of Business systems to end users, enhancing structured business process with informal processes through collaboration.  The guidance shows how to integrate security considerations into business services, and demonstrate how to create collaborative sites that help manage business events like incident escalations and order exceptions.

lob_integration This release integrates new guidance with the original release of the SharePoint Guidance – November 2008 guidance (now retired) into a single download.

 

 

The guidance package contains the following components:

Component Description
SharePoint Guidance Library A set of reusable components that helps developers manage configuration, build repositories for SharePoint lists, log traces and events, and use service location.
Guide The documentation includes a variety of topics, such as how to use design and application patterns, how to integrate LOB systems with SharePoint applications, building scalable applications, upgrading SharePoint applications, and using SharePoint capabilities to create, and deploy content. It also includes the design decisions made for the Partner Portal and Training Management applications and explanations of their implementations.
Contoso Partner Portal Reference Implementation This SharePoint application shows how Contoso created an extranet where it can interact with its partners. Among the items demonstrated are techniques for building manageable and scalable enterprise applications, and how to incorporate publishing and page composition features, flexible navigation, collaboration sites, and LOB integration. It includes more advanced techniques than the Training Management reference implementation and requires Microsoft Office SharePoint Server 2007 with Service Pack 1 or Service Pack 2.
Contoso Training Management Reference Implementation This SharePoint application illustrates how the Contoso Human Resources department manages its training course offerings. It shows how to solve many basic SharePoint challenges that you might encounter when you develop your own applications. Windows SharePoint Services 3.0 is required.

To download this release, click here.




The final March 2009 CTP for the Visual Studio 2008 Extensions for SharePoint (v1.3) has now been recently released.  Head on over to Paul Andrew's Blog (Paul is a Technical Product Manager on the SharePoint Team) for a rundown of the new capabilities available in this CTP.  Also with this release, we released a set of ten fresh new themes for SharePoint built as VSeWSS projects. Here’s a thumbnail of the new designs available to VSeWSS SharePoint Developers now.




 

Hi Software and Microsoft recently released version 2.0 of the Accessibility Toolkit for SharePoint. The intent of this solution is to provide a accessible development framework for Office SharePoint Server environments.

Key features of AKS v2.0 include:

  • Smart Control adapters which greatly reduce the amount of custom configuration previously required for AKS control adapters.
  • The Web Part Zone Control Adapter, a special Smart Adapter that modifies the output of SharePoint so that it does not use tables for layout of the Web parts.
  • HiSoftware’s Compliant Code Engine (HCCE) to assist organizations in creating code that is compliant to standards-based HTML or XHTML.
  • Additional requirements under Canadian Common Look and Feel 2.0 (CLF 2.0) guidelines.
  • Examples of remediation to comply with WCAG 2.0 Level AA.
  • French language version of AKS components.

The toolkit is freely available through the Microsoft Public License through CodePlex and can be downloaded at https://aks.hisoftware.com.




The SharePoint Conference is a great event to attend.  This year's conference will be especially good as we begin to unveil a lot of great information around the next version of SharePoint (codenamed SharePoint "14").  You don't want to miss this one.  Here's an excerpt (below) from an e-mail that's circulating to the SharePoint community.

 




Just posted this morning over on the SharePoint Team Blog, we've just released a Community Technology Preview of v1.3 of the Visual Studio 2008 Extensions for SharePoint.

The CTP is available at: https://connect.microsoft.com/site/sitehome.aspx?SiteID=428

To learn more about what's available in the 1.3 release, head over to the SharePoint Team Blog.




Microsoft has recently released the Web Services for Remote Portlets (WSRP) Toolkit for SharePoint.  For those of you out there who are "knee deep" in SharePoint and are facing challenges around data integration with 3rd party portal platforms like BEA AquaLogic Portal, IBM WebSphere Portal, and SAP NetWeaver Enterprise Portal, then this toolkit is for you!

The toolkit provides sample code for producging WSRP conformant data from SharePoint lists and libraries.  In addition to the sample code, also included in the toolkit is a whitepaper that provides details on the different architectural approaches taken with the samples, as well as screencasts showing the samples in action.

Read the full announcement of the release over on the SharePoint Team Blog.

Click here to download the toolkit.




Quick Links

Guidance at a Glance

This guidance helps architects and developers build SharePoint intranet applications.  The guidance contains a reference implementation that demonstrates solutions to common architectural, development, and lifecycle management challenges.  This guidance discusses the following:

  • Architectural decisions about patterns, feature factoring, and packaging
  • Design tradeoffs for comon decisions many developers encounter
  • Implementation examples demonstrated in the reference implementation and in the QuickStarts
  • How to design for testability, create unit tests, and run continuous integration
  • Set up of development, build, test, staging, and production environments
  • Managing the application life cycle including upgrade
  • Team-based intranet application development

The following areas are not discussed in this version of the guidance:

  • Content-oriented sites that use web content management
  • Internet and enterprise-scale SharePoint applications
  • Multilingual SharePoint applications
  • Scale or security testing of SharePoint applications



Calendar

<<  August 2010  >>
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009, Lamont Harrington.