Developing Portals with Office SharePoint Portal Server 2003


To understand the role that SharePoint Portal Server plays in Enterprise architecture, you need to understand what a portal is. Consider a telecommunications provider, your phone company for instance. You typically have a home phone account with your provider. After you have developed a decent relationship with your provider and are satisfied with their services, you quickly will end up purchasing their additional products/services, such as wireless phones/services, wireless data service, long distance, DSL-based internet connectivity, probably additional lines, voice-mail system and so-on. With the advent of internet, self-service access to the services provided to you will be typically available through web-based applications, often in their own SILO environments with their own user interfaces. Now wouldn't it be nice to have all the applications available in a single application as a bunch of modules, under a common look and feel, using the same user profile information (including user ID/passwords). Also, if the various applications would be available as pluggable modules, it would be really nice to be able to personalize your own view of the bank. These three characteristics ”presentation, profile, and personalization (the three Ps) are really where the genesis of the portal technology began .

Essentially portals provide a framework that allows a company to create a unified presentation mechanism that is used to deliver key applications in a personalized manner to its users. The users can be customers, employees , business partners , investors. The mini-applications that are launched from the portal are specialized views of the main application, providing key information, which is of immediate interest to the user within a unified portal. These mini-applications or views are called Web Parts (in SharePoint Portal's nomenclature ). Some vendors call them portlets or gadgets.

Following the footsteps of the popularity of the public customized and personalized portals such as My Yahoo, the term Enterprise Information Portal (EIP) was coined and an integrated set of technologies, including Personalization, Profile, and Presentation, were integrated into a portal server. Going forward, portals were further broadened to include other capabilities, such as Customization, Content Management, and Collaboration (the three Cs). Microsoft Office SharePoint Portal Server (shown in Figure 13.3) is Microsoft's implementation of the portal technology. It is in its second generation; the first was SharePoint Portal Server 2001.

Figure 13.3. Office SharePoint Portal Server 2003 start page.

Key highlights of Office SharePoint Portal Server 2003 include the following:

  • SharePoint Portal Server 2003 is built on top of .NET Framework architecture, leveraging technologies such as ASP.NET, IIS 6.0, Windows 2003, and SQL Server 2000. (If you are familiar with SharePoint Portal Server 2001, you will find SPS 2003 to be a radical shift from the previous Web Storage System architecture.)

  • It is built for enterprise-class scalability. Everything in SPS 2003 is stored in a SQL Server 2000 database and therefore can provide Web farm “based horizontal scaling. SPS 2003 features flexible deployment models from everything on one server to a large distributed Web farm.

  • .NET Framework based Web Part Development model for creating new components for the portal.

  • Tight integration with Office System 2003 products, particularly InfoPath for XML-based Electronic Forms and Excel, Word, and PowerPoint for easy access and storage of information.

  • Leverages Windows SharePoint Services for team sites, document and electronic libraries; Windows SharePoint Services itself is built on top of .NET Framework, Web services, and SQL Server architecture. The integration enables SharePoint Portal Server to be the starting point of a large collection of team sites in an organization.

  • A set of predefined Web parts and an extensive third-party Web part directory.

  • Personal sites (My Site) for storing and sharing personal documents and other information.

  • Extended Search across document libraries, team sites, external Web sites, and so on.

  • Single sign-on and a credential vault for enabling seamless access to other applications.

  • Tight integration with Active Directory for user profiles.

  • Support for content targeting by creating rule-based audiences.

  • A hierarchical portal category “based metadata structure for maintaining information taxonomy, capabilities like Best Bets, and an automated category assistant for automatic classification.

  • Support for alerts and notifications for updating users on changes. Alerts can be applied on practically anything ”a document library, a contact list, or even a search.

  • Web-based administration.

Installing SharePoint Portal Server

Office SharePoint Portal Server 2003 is supported only on Windows 2003 Server. It requires a SQL Server “based database. You can either utilize the included SQL Server Desktop Edition (MSDE) or connect to a remote/local SQL Server 2000 installation. (Do ensure that you have the latest Service Pack.) A typical multiserver deployment topology is shown in Figure 13.4. In addition, Internet Information Services 6.0 (part of Windows 2003, configured as part of the application server role) must be installed and configured as well. The client in this case is a Web browser. Both Internet Explorer 5 or later and Netscape Navigator 6.2 or later are supported for end users. For system administration and management, Internet Explorer 5.5 or 6 is required. More elaborate systems requirements for Office SharePoint Portal Server 2003 can be found at http://www.microsoft.com/sharepoint.

Figure 13.4. Office SharePoint Portal Server 2003 topology.

Introducing Web Parts

Web Parts are a key component of the overall architecture for Office SharePoint Portal Server and Windows SharePoint Services. A Web Part is a component; it is typically configured to run as part of a Web Part page, which itself is a component of a portal/team site. Included with the SharePoint Portal Server are Web Parts for using document libraries, lists, XML/XSL transformations, simple HTML-based forms, and for displaying current news, weather, stock quotes information, exchange server email, a calendar, and so on. The Web Part “based model allows portal developers to develop a focused view of the associated back-end system or information service so that it can be easily aggregated within a portal, thereby providing a rich user interface to the end user. Web Parts also allows an easily manageable provisioning system where System Administrators can assign certain Web Parts to a certain group of users.

Apart from the standard set of Web Parts, SharePoint Portal Server and Windows SharePoint Services technologies also allow developers to create their own Web Part.

Developing Web Parts with Microsoft Visual Studio .NET 2003

Technically, Web Parts are Web Server Controls. To aid in the development process of custom Web Parts, Microsoft produces a set of Web Part templates for Microsoft Visual Studio .NET. These templates can be downloaded from http://msdn.microsoft.com/sharepoint and add the Web Part Library project types for C# and Visual Basic .NET projects. A Web Part library is a collection of Web Parts. Web Parts are subclassed from the Microsoft.SharePoint. WebPartPages.WebPart class, which provides the core execution infrastructure for Web Parts. Web Parts can have properties for configuration (for instance, providing the user or administrator the capability to specify runtime attributes such as the server name of the application). The Web Part library template also creates a set of supporting files for the development of Web Parts, including a manifest (manifest.xml) and a Web Part Import File (WebPart1.dwp). The WebPart1.dwp file can be imported into the SharePoint Portal for creating instances of the Web Part and using it in the portal. Listing 13.1 shows a simple Web Part.

Listing 13.1 A Simple Web Part for SharePoint Portal Server
 using System; using System.ComponentModel; using System.Web.UI; using System.Web.UI.WebControls; using System.Xml.Serialization; using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; using Microsoft.SharePoint.WebPartPages; namespace MyWebPartLibrary {    [DefaultProperty("Text"),       ToolboxData("<{0}:WebPart1 runat=server></{0}:WebPart1>"),       XmlRoot(Namespace="MyWebPartLibrary")]    public class WebPart1 : Microsoft.SharePoint.WebPartPages.WebPart    {       private const string defaultText = "Hello Web Parts!";       private string text = defaultText;       [Browsable(true),          Category("Miscellaneous"),          DefaultValue(defaultText),          WebPartStorage(Storage.Personal),          FriendlyName("Message"),          Description("Message Property")]       public string Text       {          get          {             return text;          }          set          {             text = value;          }       }       protected override void RenderWebPart(HtmlTextWriter output)       {          output.Write(SPEncode.HtmlEncode(Text));       }    } } 

Following is the Web Part import file generated by the Visual Studio .NET Web Part template.

 
 <?xml version="1.0" encoding="utf-8"?> <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >    <Title>WebPart1</Title>    <Description>WebPart1.</Description>    <Assembly>MyWebPartLibrary</Assembly>    <TypeName>MyWebPartLibrary.WebPart1</TypeName> </WebPart> 

Deploying Web Parts

After you have developed your Web Part, you can use multiple ways to import it into the SharePoint Portal Server. Microsoft provides a tool called Wppackager (Web Part Packager ) to package and deploy Web Parts on multiple SharePoint Portal Servers. The tool creates a Microsoft Installer (.msi file) so that Web Parts can be deployed easily into server farms.

Web Parts can be manually deployed into an existing SharePoint Portal Server by copying the shared library (.dll) into the bin directory of the SharePoint Portal Server Web site (for instance, C:\inetpub\ wwwroot \bin). Apart from that, you are also required to make this Web Part "trusted" by adding it into the Safe Controls section of the SharePoint Portal Server Web application configuration file (web.config).

 
 <configuration>   <configSections>     ...   </configSections>   <SharePoint>     <SafeControls>        ...  <SafeControl Assembly="MyWebPartLibrary"   Namespace="MyWebPartLibrary" TypeName="*" />  </SafeControls>     ...   </SharePoint> </configuration> 

After you have finished the two preceding tasks , you can import the Web Part into an existing page of the portal by importing the .dwp file through the portal server interface. You should be able to create an instance of the Web Part on a page and customize it, as shown in Figure 13.5. For instance, in this case, customize the message that appears.

Figure 13.5. Using a Custom Web Part in SharePoint Portal Server 2003.



Microsoft.Net Kick Start
Microsoft .NET Kick Start
ISBN: 0672325748
EAN: 2147483647
Year: 2003
Pages: 195
Authors: Hitesh Seth

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net