Just another WordPress.com site

Microsoft Windows SharePoint Services 3.0 (WSS) provides an excellent work environment that is easily customized by users to better manage their “information” regardless if that is structured list data, documents, or collaboration tools like discussions. In this latest version of SharePoint you can take all that important business data and unlock an even higher level of performance with new SharePoint worksflow. Workflows allow you to attach a custom business process or processes to that “information” whether it be a document or list of information (such as sales leads).

So you’re probably thinking to yourself, what do I need to get started with workflow and SharePoint? The two prerequisites are a WSS 3.0 site (click for free trial) and SharePoint Designer 2007 (click for free trial). After you have your own WSS site going and SharePoint Designer 2007 installed you can start learning how to use SharePoint by watching these two screencast tutorials on beginning SharePoint (WSS) workflow from SharePoint Hosting.

SharePoint workflow screencast tutorial “Open WSS site with SharePoint Designer

SharePoint workflow screencast tutorial “Create a new WSS workflow with SharePoint Designer

Some browsers disable auto-start on the tutorial – when the tutorial is loaded click the STOP button then click the PLAY button and the tutorial will begin playing.

SharePoint Tutorials

URLUse SHIFT+ENTER to open the menu (new window).
Administration & User Management Change a SharePoint User’s e-mail address
Administration & User Management Change SharePoint User’s Password
Administration & User Management Create a new SharePoint Site Collection Administrator
Administration & User Management Create a New SharePoint User
Administration & User Management Create a new site column
Administration & User Management Create SharePoint Security Group
Administration & User Management Create SharePoint Sub Site
Administration & User Management E-mail enable a Discussion Board
Administration & User Management Install the Site Admin SharePoint Application Templates
Administration & User Management Working with closed SharePoint Web Parts (Close & Restore)
Blogging 5 SharePoint Blog Customization Tutorials on Amazon ads, Google Analytics, Blog Comments and Mobile Phone Access
Blogging 5 SharePoint Blog Customization Tutorials on Anonymous Access, Anonymous Comments, e-mail enabling, and managing blog posts
Blogging 5 SharePoint Blog Customization Tutorials on general administration, logging on for the first time, and selecting a blog theme
Blogging 5 SharePoint Blog Customization Tutorials on posting directly from Word 2007, adding categories, general blog management and navigation
Blogging Approve another user’s SharePoint Blog Post
Blogging Configure the Google AdSense Referal Program on your SharePoint Blog
Blogging Create a SharePoint Blog Posting
Blogging Create new blog post cateogires
Blogging Edit Blog Categories
Blogging Set up AdSense Advertisements on your SharePoint Blog
Configuration Change SharePoint Navigation to a Site Tree View
Configuration Create a SharePoint InfoPath form Library
Configuration Create a SharePoint Meeting Site
Configuration Create SharePoint Sub Site
Configuration SharePoint site template .stp Work Around to use with top level site
Content Management Add Documents to a SharePoint site
Content Management Add Links to a SharePoint list
Content Management Create a Document-specific SharePoint Alert
Content Management Create a MOSS slide lirbary
Content Management Create a SharePoint Announcements List
Content Management Create a SharePoint Calendar Appointment
Content Management Create a SharePoint Document Library
Content Management Create a SharePoint Document Work Space
Content Management Create a SharePoint Gantt Project Management Chart
Content Management Create a SharePoint Links List
Content Management Create a SharePoint Wiki Document
Content Management Create SharePoint Picture Library
Content Management E-mail documents into your SharePoint site
Content Management How to delete a meeting site
Content Management Restore Deleted Items as Site Collection Administrator
Content Management SharePoint Custom Web Part Demo – Scanning Enabler for WSS 3.0
Content Management Use the Send to Command
Content Management Work with closed SharePoint Web Parts
Content Management Work with the Gantt Chart
Content Management Work with the SharePoint Recycle Bin
Customization Add a Webpart
Customization Change the SharePoint Site Image
Customization Change the SharePoint Site Title and Description
Customization Change Themes
Customization Create a SharePoint Calendar
Customization Create a SharePoint Contacts List
Customization Create a SharePoint CRM Application
Customization Create a SharePoint Discussion Board
Customization Create Wiki Library
Customization Edit the QuickLaunch
Customization Enable Document Versioning
Customization How to customize a Meeting Workspace
Customization How to remove the Quick Launch Menu
Customization Modify a view with a site column
Customization Remove Navigation Inheritance
Customization Top Link Bar (tabbed) Navigation Options
Security Add SharePoint Site to your Trusted Sites in Internet Explorer
Security Add Users to a SharePoint Security Group
Security Allow a read only user to update their user profile information
Security Manage Access Requests
Security Remove Permission Inheritance from subsite
Security Restore Permission Inheritance
Security Sign in as a different user
SharePoint Designer Create 5 step workflow
SharePoint Designer Create a new Workflow with SharePoint Designer
SharePoint Designer Edit a workflow
SharePoint Designer ELSE IF statements – conditional branching in Workflows
SharePoint Designer E-mail enable a SharePoint List with SharePoint Designer 2007 and Workflow
SharePoint Designer How to backup your site with SharePoint Designer
SharePoint Designer Open a SharePoint Site with SharePoint Designer
SharePoint Designer Open your SharePoint Site with SharePoint Designer 2007
SharePoint Designer Work with SharePoint Sample Master Pages with SharePoint Designer
SharePoint Designer Working with closed web parts in SharePoint Designer
SharePoint-Office Integration Connect SharePoint Contacts list to Outlook 2007
SharePoint-Office Integration E-mail Enable SharePoint Calendar for Outlook Meeting Invitations
SharePoint-Office Integration Publish an InfoPath Form template to a SharePoint Library as a new content type

The popularity of SharePoint Portal Server 2003 led Microsoft to tightly integrate the next SharePoint version, Microsoft Office SharePoint Server (MOSS) 2007, with its ASP.NET 2.0 WebPart framework. This tight integration enables the ASP.NET and SharePoint developer to do a number of things that previously weren’t possible. For instance, you can plug in your own Membership provider and implement custom authentication. MOSS 2007 also resolves one of SharePoint Portal Server 2003’s main problems: It relies on an ISAPI filter to route its requests. Microsoft replaced the ISAPI filter with ASP.NET’s HttpHandlers and HttpModules in the new version.

However, rather than attempt to cover all the new possibilities, this article focuses on the process of writing custom WebParts for MOSS 2007.

Note: The instructions are written for Microsoft Office SharePoint Server 2007, Beta 2)

A Tale of Two Base Classes

You don’t need to look very hard to find evidence of MOSS 2007’s integration with the ASP.NET 2.0 WebPart framework. The following is a high-level overview of the obvious integration points:

  1. A SharePoint Web page is a combination of an ASPX file and a precompiled DLL. If you have customized the page (“unghosted” it), the changes are stored in a database. So, the final ASPX is a combination of the uncustomized ASPX on the file system and the customization changes in the database. You usually find the precompiled class in the Microsoft.SharePoint.ApplicationPages namespace. Various SharePoint pages contain a complicated inheritance structure, but eventually they all end up inheriting from System.Web.UI.Page, which is part of the ASP.NET 2.0 framework. So, in short, all SharePoint ASPX pages are really ASP.NET 2.0 WebPages.
  2. SharePoint comes with a number of Web controls—not WebParts, just Web controls, that also inherit from System.Web.UI.Control.
  3. The SharePoint WebPartManager is a sealed class called SPWebPartManager. It inherits from System.Web.UI.WebControls.WebParts.WebPartManager, which is the ASP.NET 2.0 WebPartManager.
  4. A SharePoint WebPartZone is a public sealed class called Microsoft.SharePoint.WebPartPages.WebPartZone, which inherits from System.Web.UI.WebControls.WebParts.WebPartZone.
  5. A SharePoint WebPart inherits from an abstract base class called Microsoft.SharePoint.WebPartPages.WebPart, which inherits from System.Web.UI.WebParts.WebPart.

But wait a minute; doesn’t this mean you have two WebPart base classes? Writing a WebPart usually is rather simple. It just needs to inherit from the “WebPart” class. However, you have two WebPart classes here: an ASP.NET 2.0 one at System.Web.UI.WebControls.WebParts.WebPart, and a SharePoint one at Microsoft.SharePoint.WebPartPages.WebPart. So, which one do you use, and when?

For most scenarios, you simply can inherit from the ASP.NET 2.0 WebPart class. The Microsoft.SharePoint.WebPartPages.WebPart class just facilitates backward compatibility with SharePoint 2003. When you move a SharePoint 2003 WebPart over to MOSS 2007, you are simply rebasing your class to now inherit from Microsoft.SharePoint.WebPartPages.WebPart. Because a Microsoft.SharePoint.WebPartPages.WebPart simply inherits from a System.Web.UI.WebControls.WebParts.WebPart, it can live inside a SharePoint page. In addition, you may want to use the SharePoint WebPart when you need cross-page connections (connections between WebParts that are outside of a WebPartZone, a client-side connection, or the data-caching infrastructure). For the most part, however, you should use ASP.NET 2.0 WebParts instead.

Build and Deploy Your WebPart in MOSS 2007

For demonstration, put the following WebPart code in a class library:

public class SimpleWebPart : WebPart
{
   private string displayText = "Hello World!";

   [WebBrowsable(true), Personalizable(true)]
   public string DisplayText
   {
      get { return displayText; }
      set { displayText = value; }
   }

   protected override void Render(System.Web.UI.HtmlTextWriter writer)
   {
      writer.Write(displayText);
   }
}

Next, use the following code snippet to add the AllowPartiallyTrustedCallers attribute (located under the System.Security namespace) to the code’s AssemblyInfo.cs file:

[assembly: AllowPartiallyTrustedCallers()]

The reasons for adding this attribute will become clear shortly.

Your WebPart is now ready to use. The next challenge, of course, is deploying it. The following steps will enable you to do just that:

  1. Give your assembly a strong name. Just go into the Project Properties and then go to the “Signing” tab (see Figure 1) to do this. Alternatively, you can use the sn.exe command line tool to generate strong names for you.
  2. Figure 1: Give Your Assembly a Strong Name

  3. Find the public key token for your assembly. An easy way to this is to use a standard tool such as Reflector. Once the DLL is compiled and built, drag and drop it in Reflector. It should show you the public key token, along with the details shown in Figure 2.
  4. Figure 2: Details of Your Public Key Token

  5. Locate the SharePoint Web application in which you want to deploy this WebPart. You can do this via the IIS Manager under administrative tools. The default ones would be virtual directories that look like GUIDs under C:\Inetpub\wwroot\wss\<<GUID>>. In my case (yours may be different), the directory was C:\Inetpub\wwwroot\wss\VirtualDirectories\850832ce-d9d4-4a58-b4c9-b06e40870062\_app_bin.
  6. Drop the DLL in the _app_bin directory in the virtual directory. By doing this, you effectively allow ASP.NET to access the DLL. You still need to take a few more steps for SharePoint to use that assembly.
  7. Note: By dropping the WebPart in the bin directory, you are effectively giving it partial trust. If you were writing a plain vanilla ASP.NET 2.0 WebPart, you would need to decorate it with the AllowPartialTrustedCallersAttribute at the assembly level. You also could create a new trust policy for your WebPart (recommended), or raise the trust level in the web.config file (default is WSS_Minimal). Alternatively, you could just drop the WebPart in the GAC, which again requires strong naming.

  8. Under the same virtual directory, find Web.Config and add the following to the SafeControls section:
  9. <SafeControl Assembly="SPWebPart,
                 Version=1.0.0.0, Culture=neutral,
                 PublicKeyToken=d81b2da0f7305ec3"
                 Namespace="SPWebPart"
                 TypeName="SimpleWebPart" Safe="True" />
  10. With Web.Config modified, you have to add the WebPart to the gallery. Through your browser, go to the Web application whose virtual directory you have been using. Once on that site, go to Site Actions -> Site Settings -> Modify All Site Settings (see Figure 3).
  11. Figure 3: Browse to “Modify All Site Settings” Option

  12. Under that, click on “Web Parts” under Galleries as shown here:
  13. Click on “New” in the toolbar, and find the SPWebPart.SimpleWebPart as shown below:
    (Full Size Image

    Note that SharePoint puts a .webpart extension on the import file being created. If you were to export a WebPart out of an ASP.NET 2.0 page as a .webpart, you easily could use that file to simplify your deployment process.

  14. Check the checkbox, go to the top, and click on “Populate Gallery”. You should see the SimpleWebPart.webpart file ready to use in your site as shown here:
    (Full Size Image)

That’s it. Your WebPart is now ready to use in a SharePoint ASPX page!

Using the WebPart

Go to the site of your choice. I created a site called “TestSite” using the Blank Template included in SharePoint. Once at that site, click on Site Actions –> Edit Page as shown below:

Your page will prompt you to add new WebParts as shown below:


(Full Size Image)

In my case, I have two WebPartZones. Depending upon the template you selected, your exact UI may look different. Click the “Add a WebPart” button on any one of the WebPart zones. You will see the “Add Web Parts” dialog, which simply shows you a list of possible WebParts you could add to your page.

Under Miscellaneous, you should see the SimpleWebPart. Check the checkbox, and click “Add” (see Figure 4).

Figure 4: Add SimpleWebPartYou now should see the WebPart you wrote running under SharePoint, as shown below:


(Full Size Image)

Now, you can play with this WebPart a bit. Click the “Edit” menu, and select “Modify Shared Web Part” as shown here:

You will notice that an “EditorZone” pops up. Modify the values as shown below:

Figure 5: Modify the SimpleWebPart Values

Click OK, and then click “Exit Edit Mode” on the top, right-hand side of the page (this may be specific to the template your site is based on) as shown here:

You should see your fully customized WebPart running inside MOSS 2007. The following is an action shot of all your hard work:

Congratulations! You have just written a WebPart for MOSS 2007, deployed it, and used it successfully on a SharePoint Web page.

Microsoft Office and SharePoint Server 2007 Integration

This tutorial demonstrated how to write a simple WebPart and then host and use it in MOSS 2007. Your real world applications will probably require more complicated WebParts, but to keep the WebPart simple, the demonstration left out some details. For instance, SharePoint by default comes in a very locked-down, secure mode. When writing WebParts for SharePoint, you need to have a good understanding of how code-access security works.

About the Author

Sahil Malik (www.winsmarts.com) has worked for a number of top-notch clients in Microsoft technologies ranging from DOS to .NET. He is the author of Pro ADO.NET 2.0 and co-author of Pro ADO.NET with VB.NET 1.1. Sahil is currently also working on a multimedia series on ADO.NET 2.0 for Keystone Learning. For his community involvement, contributions, and speaking, he has also been awarded the Microsoft MVP award

Beginning SharePoint Web Part Development

This is the first article in a series focusing on WSS 3.0 development using Visual Studio 2008. This article is for beginners who are quite new to SharePoint web part development and want to learn about configuring WSS 3.0, developing web parts using Visual Studio 2008, deploying and publishing web parts and finally debugging a web part.

My development machine is equipped with following environment before installing any of SharePoint related software or tools:

  • Windows Server 2003 with SP1
  • IIS
  • SQL Server 2005 (comes with .NET 2.0) with SP2
  • Visual Studio 2008 (comes with .NET 3.5)
  • Office 2007

Before you start, you should have following installed on your machine:

Windows SharePoint Services 3.0 with Service Pack 1

WSS 3.0 Tools: Visual Studio 2008 Extensions v1.2

The entire source code for this article is available in the form of a free downloadable zip file. The solution was developed using Microsoft Visual Studio 2008 Team Edition on Microsoft Windows Server 2003 Standard Edition with Microsoft SQL Server 2005 Developer Edition and Windows SharePoint Services 3.0 SP1. I didn’t really test it in any other environment. I request that you post in the discussion area if you have any problems in execution.

Configuring WSS 3.0: Create Sample web site and site collection

Once you have installed WSS 3.0 and Visual Studio 2008 Extensions from the previous URLs provided, you can go through the following steps to create a sample web site and web page where our web parts can be tested.

NOTE: Once WSS is installed, the default web site (in IIS) gets stopped and the WSS web site runs on port 80 of IIS.

  • Go to http://localhost/default.aspx.
  • Go to Site Actions || Create
  • Select “Sites and Workspaces.”
  • In the “New Sharepoint Site” page, provide the Title, Description and URL name as follows, select “Blank Site” as the template and finally hit  “Create.”
  • Once new web site gets created, go to the web site and go to Site Actions || Create.
  • Select “Document Library.”
  • Provide details for the new document library as follows,and create it.

Configuring WSS 3.0: Create a web part web page

So far, we’ve created a new WSS site and document library. In this section we will create a web part page.

  • Once the new site collection gets created, go to that site collection and click on Site Actions || Create.
  • Select “Web Part Page.”
  • In the “Create New Web Part” page, provide details as follows.
  • Finally, you should land on the following page.

Beginning SharePoint Web Part Development – Developing your first WSS 3.0 web part using Visual Studio 2008 extensions

Go through the following steps for creating a new Sharepoint web part using Visual Studio 2008.

  • Open Visual Studio 2008.
  • Go to File || New Project.
  • In the “New Project” dialog, select Visual Basic || Sharepoint, “Web part” template and provide the name “TestSPWebPart.”
  • In the project properties, go to the “Debug” tab and provide http://localhost/testsite.
  • Modify the web part code so that it looks like the following:

Public Class WebPart1

Inherits System.Web.UI.WebControls.WebParts.WebPart

Public Sub New()

End Sub

Protected Overrides Sub CreateChildControls()

MyBase.CreateChildControls()

‘TODO: add custom rendering code here.

Dim label As New Label()

label.Text = “Hello World”

Me.Controls.Add(label)

End Sub

End Class

From the above, you must understand that our custom web parts are being inherited from the “System.Web.UI.WebControls.WebParts.WebPart” namespace. Unfortunately, there is no designer support in Visual Studio 2005/2008 for developing SharePoint web parts. Everything must be coded and developed in the same manner as an ASP.NET custom control.

Deploying and publishing a sample web part in WSS 3.0

Visual Studio 2008 has built-in support to deploy web parts directly to a WSS 3.0 site. This integrated approach saves lots of development time and also helps us to debug web parts very easily. Debugging web parts is covered in the last section of this article.

The following steps continue from where we left off.

  • Using Solution Explorer, right click on project and select “Deploy” as follows.
  • Open the Sharepoint Web Part page as shown below.
  • Change the mode to “Edit” by selecting Site Actions || Edit Page.
  • Click on “Add Web Part” as follows.
  • Select the deployed web part as shown below,and click “Add.”
  • Finally, the web part must be shown as in the image below.

You must note that once a web part is deployed, the IIS gets restarted. This happens every time a web part is deployed using Visual Studio 2008.

The previous web part is a very simple web part which displays a simple message. Let us modify the previous web part to display two labels, two text boxes and a button in a table. Once the user clicks on the button, it should multiply both numbers and give the result in a new label.

Modify your code in the web part so that it looks similar to the following:

Option Explicit On

Option Strict On

Imports System

Imports System.Runtime.InteropServices

Imports System.Web.UI

Imports System.Web.UI.WebControls

Imports System.Web.UI.WebControls.WebParts

Imports System.Xml.Serialization

Imports Microsoft.SharePoint

Imports Microsoft.SharePoint.WebControls

Imports Microsoft.SharePoint.WebPartPages

Imports System.Data

Imports System.Data.SqlClient

Namespace TestWebPart

<Guid(“68324554-9734-4813-958f-9301bcc7fe19”)> _

Public Class WebPart1

Inherits System.Web.UI.WebControls.WebParts.WebPart

Public Sub New()

End Sub

Protected Overrides Sub CreateChildControls()

MyBase.CreateChildControls()

Dim tbl As New Table

Dim tRow1 As New TableRow

Dim tRow2 As New TableRow

Dim tRow3 As New TableRow

Dim tR1C1 As New TableCell

Dim tR1C2 As New TableCell

Dim tR2C1 As New TableCell

Dim tR2C2 As New TableCell

Dim tR3C1 As New TableCell

Dim tR3C2 As New TableCell

tRow1.Cells.Add(tR1C1)

tRow1.Cells.Add(tR1C2)

tRow2.Cells.Add(tR2C1)

tRow2.Cells.Add(tR2C2)

tRow3.Cells.Add(tR3C1)

tRow3.Cells.Add(tR3C2)

tbl.Rows.Add(tRow1)

tbl.Rows.Add(tRow2)

tbl.Rows.Add(tRow3)

Dim txtFirst As New TextBox

txtFirst.ID = “txtFirst”

Dim txtSecond As New TextBox

txtSecond.ID = “txtSecond”

Dim lblFirst As New Label

lblFirst.Text = “Enter first:”

Dim lblSecond As New Label

lblSecond.Text = “Enter second:”

Dim lblResult As New Label

lblResult.ID = “lblResult”

Dim btnSubmit As New Button

btnSubmit.Text = “Submit”

AddHandler btnSubmit.Click, AddressOf btnSubmit_click

tR1C1.Controls.Add(lblFirst)

tR1C2.Controls.Add(txtFirst)

tR2C1.Controls.Add(lblSecond)

tR2C2.Controls.Add(txtSecond)

tR3C1.Controls.Add(btnSubmit)

tR3C2.Controls.Add(lblResult)

Me.Controls.Add(tbl)

End Sub

Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)

Dim i As Integer = CInt(CType(Me.FindControl(“txtFirst”), TextBox).Text)

Dim j As Integer = CInt(CType(Me.FindControl(“txtSecond”), TextBox).Text)

CType(Me.FindControl(“lblResult”), Label).Text = “Product = ” & CStr(i * j)

End Sub

Public Overrides ReadOnly Property Controls() As System.Web.UI.ControlCollection

Get

EnsureChildControls()

Return MyBase.Controls

End Get

End Property

End Class

End Namespace

Beginning SharePoint Web Part Development – A better web part with event handling: explanation

As Visual Studio 2008 doesn’t support a designer for developing Sharepoint web parts, we have to create all controls from scratch. We need to create a table having three rows with two columns (to hold six controls). Each of those controls must be added to each of those cells. Finally, the table must be added to page. The following explains how to do this in a step by step manner.

The first step is to create a table to hold all the controls. The following code does the same:

Dim tbl As New Table

Dim tRow1 As New TableRow

Dim tRow2 As New TableRow

Dim tRow3 As New TableRow

The above code creates a new table with three rows (rows are not added to table yet). Next, we need to create cells for each row.

Dim tR1C1 As New TableCell

Dim tR1C2 As New TableCell

Dim tR2C1 As New TableCell

Dim tR2C2 As New TableCell

Dim tR3C1 As New TableCell

Dim tR3C2 As New TableCell

Now we add the cells to their respective rows:

tRow1.Cells.Add(tR1C1)

tRow1.Cells.Add(tR1C2)

tRow2.Cells.Add(tR2C1)

tRow2.Cells.Add(tR2C2)

tRow3.Cells.Add(tR3C1)

tRow3.Cells.Add(tR3C2)

Then we add the rows to the table:

tbl.Rows.Add(tRow1)

tbl.Rows.Add(tRow2)

tbl.Rows.Add(tRow3)

Next, we create instances of the controls, provide values to properties and add event handlers (if any):

Dim txtFirst As New TextBox

txtFirst.ID = “txtFirst”

Dim txtSecond As New TextBox

txtSecond.ID = “txtSecond”

Dim lblFirst As New Label

lblFirst.Text = “Enter first:”

Dim lblSecond As New Label

lblSecond.Text = “Enter second:”

Dim lblResult As New Label

lblResult.ID = “lblResult”

Dim btnSubmit As New Button

btnSubmit.Text = “Submit”

AddHandler btnSubmit.Click, AddressOf btnSubmit_click

Now we add controls to their respective cells:

tR1C1.Controls.Add(lblFirst)

tR1C2.Controls.Add(txtFirst)

tR2C1.Controls.Add(lblSecond)

tR2C2.Controls.Add(txtSecond)

tR3C1.Controls.Add(btnSubmit)

tR3C2.Controls.Add(lblResult)

Finally, we add the table to a page (say, web part):

Me.Controls.Add(tbl)

The output of the web part should look like the following image:

Beginning SharePoint Web Part Development – Debugging a WSS 3.0 web part using Visual Studio 2008

In some situations, it will be necessary to debug a web part. In order to make a WSS web part able to be debugged, the web.config of the WSS web site must be modified. The default location of the WSS 3.0 web site will be installed in the following folder:

Open the Web.config file and modify the existing options to look like the following:

<SafeMode MaxControls=”200″ CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>

<PageParserPaths>

</PageParserPaths>

</SafeMode>

<customErrors mode=”Off” />

<compilation batch=”false” debug=”true”>

Once the web.config is modified, you can directly hit F5 in a Visual Studio environment. If a break point is provided for a line in a button click event, it should stop at the same location, similar to the following:

In this article, we have seen simple SharePoint web part development using Visual Studio 2008 and WSS 3.0. In my upcoming articles, we will see more and more examples of SharePoint development. I hope you enjoyed the article and any suggestions, bugs, errors, enhancements etc

Setting up SharePoint Blogs, Wikis, and Announcements

SharePoint works as an excellent repository for documents, but it is a lot more, too.  SharePoint allows you to manage entire projects and their associated information through the use of pages dedicated to Wikis, blogs, and announcements, supporting existing SharePoint purposes.  This allows you to create blogs and wikis within a project for informational and discussion purposes, enhancing SharePoint’s role in a project and providing a convenient location for all discussion associated with a project.

SharePoint contains predefined templates for Wikis and blogs, making them easy to create.  There is no limit to the number of wikis or blogs you can have, allowing for general and highly specialized subjects.

Wikis

Wikis are a useful living repository of information, allowing a build-up of shared knowledge in an easily managed and accessed format.  In its simplest form, a Wiki (Hawaii for “quick”) allows users to create customized Web pages and content using only a Web browser.  More commonly, though, a Wiki is thought of as a growing body of content that can be edited and updated by users freely, accumulating expertise in a non-structured manner.  A typical Wiki application is a repository of technical information, much like Wikipedia, but dedicated to a particular project.

Creating a Wiki as part of a SharePoint site is simple.  The steps to follow are:

  1. Under Site Actions, click Create
  2. Under Libraries click Wiki Page Library

  1. Enter the title and description for the wiki. For the Web Site Address enter the address to be used for the wiki.

  1. Click Create

By default, SharePoint Wikis are created as a home page which anyone with permission can modify. New pages can be added to the wiki using the New button, which creates a new page underneath the current Wiki page.  Thus, a hierarchy can be created within the Wiki.

Each Wiki page has a button on the top right that leads to an Edit function. The Edit function allows the content of that page to be modified (again, assuming permissions allow). All edits are performed in the web browser, ignoring external tools (such as Word), although content can be cut-and-pasted from most sources.

Changes to a Wiki page content are effective as soon as the Save button is clicked. SharePoint has a Change feature which allows users to see all the changes made to a document, and allows undoing of changes if necessary. All changes made to a document since its creation are tracked and can be displayed and rolled-back.

Blogs

Blogs (Web Logs) are similar to Wikis in that they allow users to add information, but unlike a Wiki, a Blog’s entries are dated and arranged in reverse chronological order (newest first). Under SharePoint, Blogs can contain any type of information including text, links, pictures, and other multimedia files.

As with Wikis, SharePoint blogs are created using the Blog template in the New SharePoint Site window. To create a blog, follow these steps:

  1. Under Site Actions, click Create
  2. In the Web Pages list, click Sites and Workspaces
  3. Enter the title and description for the blog (remember these appear on each page, so useful descriptions should be employed). For the Web Site Address enter the address to be used for the blog.
  4. Under Template, click the Collaboration tab and select Blog:

  1. Under Permissions, set the Blog permission to their initial values
  2. Click Create

The blog will now be created and you will be positioned at the blog home page:

By default, users can add to blogs based on their SharePoint permissions, but you can overrule those permissions to allow only restricted access, or allow specific people to have edit capabilities. More commonly, you will want to have everyone on the system have access (and the ability to post to) your blogs, even if they do not have these permissions on the parent site.  This is easy enough to accomplish by setting permissions for your Blog pages independently, instead of inheriting them from the parent.

The right side of the page allows users to add to the blog. Those with permissions can also edit and modify the blog.

To create categories for your blog, to allow subjects to be broken down more logically, follow these steps:

  1. Under Categories click the Add New Category link
  2. Enter the new category name and click OK

To modify an existing category title, click the Categories link at the left of the page, which displays a list of all the categories.  Then, click the edit button to the right of the category you want to change:

To delete a blog category, under the Category list click on the category name, then select Delete Item.  The category will be removed.

Announcements

Announcements are simply notices posted within SharePoint that are displayed and accessible for the whole team. Announcements appear on the home page by default, but can be placed anywhere in a site.

Announcements are part of a list, and there are several list templates provided in SharePoint, as well as sample announcements. To create announcements in SharePoint, follow these steps:

  1. Under Site Actions click Create
  2. Under Communications, select Announcements:

  1. Enter a title and body of the announcement and click OK:

The announcement will now appear on the default page:

Since new announcements join the old ones in a big list, you should periodically remove old and out of date announcements.

>> A Microsoft technology that allows a company to host intranet based webpages. It also enables the sharing of MS Office documents between users on the intranet. The Sharepoint resides on a server running the Sharepoint software.

>> Microsoft Office SharePoint Server 2007 is a server program that is part of the 2007 Microsoft Office system. Often used to facilitate collaboration, provide content management features, implement business processes, and supply access to essential information

>> Microsoft’s content management system. It allows groups to set up a centralized, password protected space for document sharing. Documents can be stored, downloaded and edited, then uploaded for continued sharing. See groupware

Key Features:

  • Collaboration
  • Personalized Portals
  • Enterprise Content Management and Integrity
  • Business Process Integration
  • On Demand Business Intelligence
  • Enterprise Search

Team Collaboration- Connects people with the information and resources they need. Workgroups can coordinate calendars, organize client documents, set up notifications and create team workspaces.

  • Task oriented, in-context collaboration
  • Users can create and control their own collaborative workspaces
  • Manage projects efficiently with built in task lists, task relationships, and project status.
  • Enable disconnected participation with offline support
  • Key technologies
    • IM, Blogs, wikis, issue tracking, project mgmt
    • Alerts, RSS
    • E-mail enabled lists
    • Rich offline experience

Personalized Portals– Rich, personalized aggregation point for your user experience, applications and information.

  • Build customized portal sites for each aspect of your business
  • Highly scalable architecture to build personal, divisional, intranet, extranet, and Internet sites.
  • Quickly build composite applications from existing systems.
  • Key technologies
    • NET 2.0 Support
    • Completely redesigned My Site
    • Information aggregation Web parts
    • Pluggable authentication and rich deployment models

Enterprise Content Management and Integrity– Streamline management of diverse content in a central repository and ensure the integrity of all stored documents on the portal.

  • Document management, records management, and web content management
  • Protect content from unauthorized users
  • Rich and seamless office integration
  • Single infrastructure management across multiple and multilingual websites.
  • Key technologies
    • Content Types
    • Integrated Workflow
    • Internet scale WCM
    • Records Management with policies and auditing

Business Process Integration- Automated workflow and electronic forms simplify collecting and validating data that drives your business processes

  • People centric workflow out-of-the-box and custom workflow design
  • Streamlines review, approval, and archive processes
  • Built on a rich platform – Windows Workflow Foundation
  • Integrates with structured business processes
  • Key technologies
    • Out of the box workflow templates
    • InfoPath Forms Services
    • Business Data Catalog
    • XML File Format
    • Out-of-the-box connectors: SAP, Siebel, Dynamics

On Demand Business Intelligence– Decision makers can access real time data and generate reports anytime anywhere.

  • The glue for “BI for the masses”
  • Broad Sharing of spreadsheets and reusable spreadsheet models.
  • Create personalized dashboards from disparate sources using Excel web parts
  • From KPIs , Reports , Dashboards, to Scorecards
  • Key technologies
    • Excel Spreadsheets and SQL Server Reporting Services
    • Report Center
    • KPIs and KPI Lists
    • Business Data Catalog
    • ODC Library

Enterprise Search- Fine tuned and relevant search allows information workers across the enterprise to quickly access appropriate data.

  • Unlocks relevant content in a wide range of repositories and formats.
  • Displays intelligent search results from LOB, relational databases and other structured content.
  • Actionable search results that respect security permissions
  • Leverage People Search by job title, expertise, and common interests
  • Search Entities
    • File Shares
    • Share Point Sites
    • Exchange Public Folders
    • Lotus Notes Database
    • Index Search

More about Microsoft Office SharePoint Server (MOSS):

SharePoint seeks to provide a wide range of messaging, collaboration, publishing and document management features in one server. SharePoint is hosted on a central server or server farm and is accessed by users either through a compatible web browser or directly via Microsoft Office.

Microsoft has defined the following key capacities for SharePoint 2010. Most of these are supported with the 2007 product unless indicated.

Sites

SharePoint 2010 Sites provides single infrastructure for all your business Web sites. SharePoint can be used to create sites from Internet to extranet sites through Intranet portals, blogs, wikis, to team sites.

Communities

SharePoint 2010 Communities provide collaboration tools including a social community and collaborative creation of content. Key community tools include collaborative document management, discussion forums, blogs, wikis and a Social Networking solution called MySites.

Composites

SharePoint 2010 introduced Composites. Composites offer tools and components for creating and distributing “do-it-yourself” business solutions. Composites are intended to accelerate the process of solution production through easy to use WYSIWYG tools. Composites allow users to create solutions to business problems in graphic tools without having to create or compile code by hand. Composites will allow users to share their solutions with other users on the SharePoint Server farm.

Composites aim to allow users to enable users to create solutions to business problems with familiar tools or in a web browser. The goal is that no code will be required to make the solution. These solutions can then be distributed through an enterprise via SharePoint Server. Composites will allows Enterprise web distribution of Microsoft Office products like Visio, Excel, and Access databases. There is also the ability to use the web page to build custom web parts. SharePoint Designer also offers users the ability to create solutions without code.

Content

SharePoint provides a Web Content Management platform for publishing web sites. It also provides a Document Management solution for collaborative document production.

Insights

SharePoint 2010 can be used to surface business information in databases, reports, business applications and other LOB applications.

Search

SharePoint comes with its own Enterprise search. SharePoint can also be implemented using Fast.com for improved search. The new SharePoint search now supports query syntax allowing search strings to contain OR, AND and NOT to refine the logic of the search. This now provides boolean search which was not supported in earlier versions. SharePoint Server 2010 now also supports wild card search using the ‘*’ character. [3].

SharePoint Server 2010 Search platform provides search of community data held in SharePoint MySites. Search is now designed to provide tacit knowledge about users and authors as well as semantic meaning[4].

SharePoint now provides FAST search technology as a potential added feature. FAST provides vastly most sophisticated search and can index up to a half billion documents [5].

Architecture Overview

A Single SharePoint Server

A SharePoint Server requires an external database to operate. SharePoint can only work with Microsoft SQL Server, though it is possible to install a stand alone version of a single SharePoint server on a single Windows Server that uses SQL Express for Databases. This configuration is recommended only for development.

A single SharePoint server also requires ASP.NET 3.5 be pre-installed along with IIS enabled. The free SharePoint Foundation product does not require a product key. SharePoint does not require an LDAP to run, and authentication can be provided via Active Directory, other LDAPs, or forms authentication.

SharePoint Farm

A group of SharePoint Servers can be joined in to a server farm. Different servers can be provided different roles, or sets of roles can be shared by a single server or servers in the farm. For example in SharePoint 2010 one or more servers can be dedicated to crawling content to create the search index. All servers in a farm are joined by sharing a common instance of SQL Server.

In this way the SharePoint Server Farm can be scaled to meet higher demands for availability, usage, and security.

Microsoft SharePoint 2010 enhancements over Microsoft Office SharePoint Server 2007

SharePoint 2010 was released to manufacturing (RTM) on April 17, 2010[6]

SharePoint 2010 is distributed in three editions: SharePoint Foundation 2010 which comes as a free download, SharePoint Server 2010 Standard and SharePoint Server 2010 Enterprise which both have a licensing fee.[7][8] Microsoft has described the new version as the “Business Collaboration Platform for the Enterprise and the Web”.[9] SharePoint 2010 has the following significant enhancements and changes over the previous edition.

  • SharePoint 2010 farms will only run on 64 bit servers, though 32 bit client machines are still supported;
  • SharePoint 2010 will no longer be supported on IE 6;
  • SharePoint 2010 UI makes significant use of JavaScript and Ajax;
  • Introduction of the editing Office Ribbon in line with Office 2007;
  • Web Edit, allowing easy customization of a site;
  • Easier ability to package and publish modificiations made in the UI, SharePoint Designer and Visual Studio;
  • Silverlight Web Part, allowing rapid integration of rich Silverlight applications;
  • Rich Theming, allowing improved skinning of a SharePoint 2010 site;
  • support for multiple browsers, including Internet Explorer, Firefox and Safari (amongst others);
  • Enterprise Metadata Management (“SharePoint taxonomy”), which enables a centralized taxonomy;
  • Records Management features provided throughout the document management;
  • Inline editing of lists and forms using Ajax, reducing the number of post-backs to the Server;
  • Closer confirmation to WCAG 2.0 AA standards (though not full compliance);
  • More master pages including a “simple” master page to make web design with SharePoint much easier;
  • Improved Search function, including bring Fast in to the SharePoint stack;
  • Improved two way integration with Line of Business (LOB) applications;
  • Expanding social computing features from previous MySites;
  • Adoption of Rest web service along with SOAP.

The product includes a collection of other new features relevant to IT professionals,[10] developers[11] and partners.[12] Complications in upgrading to SharePoint 2010[13][14] include a lack of support for Internet Explorer 6, only 64-bit architecture is supported, and businesses will need to run the latest versions of other Microsoft products (notably Windows Server 2008 R2 and Microsoft Office 2010) to take advantage of full functionality.

Features

Following key features were introduced with Microsoft Office SharePoint Server 2007 and have been continued an expanded in Microsoft SharePoint Server 2010

Office 2007 + integration

SharePoint Server integrates closely with Microsoft Office applications. It can render Microsoft Office documents in web pages. In addition, with the proper server side infrastructure, it can allow the documents to be edited from within the browser as well. For other document types in a document library, Microsoft Office applications can directly edit the document in the document library. This feature is available for Microsoft Excel and Microsoft InfoPath. Using Excel Services, SharePoint Server can allow Excel 2007 workbooks to be loaded, edited, and displayed in a SharePoint page. All calculations happen on the SharePoint Server. SharePoint Server can also host and render Microsoft InfoPath forms using the Infopath Forms Services to have it viewed and filled out using a browser.

Microsoft Office Outlook can also be used for accessing and synchronizing SharePoint document libraries.[15] On connecting a document library with Outlook, the library will be listed in the navigation pane, and the files in it will be listed along with certain metadata such as author. Compatible Microsoft Office documents will be previewed in the preview pane and Microsoft Office Outlook search bars can be used for searching the libraries as well. The search entered using the Outlook bar will be federated to the SharePoint server, and the results will be displayed in Outlook itself. By synchronizing a document library, Outlook can make the files available offline, which can be opened and edited using other Microsoft Office 2007 applications; the changes will be synchronized back to the SharePoint library by Outlook.

While it is not necessary to use Microsoft Office 2007 + to take advantage of the integration with the Microsoft Office suite, it offers the most integration with SharePoint Server 2007. A few examples of the improved integration with Office 2007 include:

  • 2-way synchronization of Outlook Calendar and SharePoint Calendar.
  • Overlaying a SharePoint Calendar on top of user’s Outlook 2007 Calendar.
  • SharePoint Task-Assignment Synchronization into user’s Outlook Task List.
  • Offline Synchronization of SharePoint Documents
  • Viewing SharePoint RSS feeds through Microsoft Office Outlook
  • Display of meta-data values for a given document type in the Office Ribbon as a user is editing a document from a document library.
  • SharePoint Server 2010 via Access Services, allows Access 2010 databases to be published to SharePoint, which enables multiple users to interact with the database application from any standards-compliant Web browser. [16]

Enterprise search

SharePoint Server can be used for enterprise search, to search across the document libraries and user groups.[17] SharePoint Server 2007 fully indexes all the documents stored in its library, in addition, it also indexes data stored in external databases which are exposed via ADO.NET or web services with a well-defined WSDL schema. Any search from the portal interface or client applications can use the SharePoint Server search capabilities to search over this index. SharePoint servers, Web sites, file shares, Exchange Public Folders, and databases can be set as data sources which it will then index. The indexing system is a tuned version of the one used in Windows Desktop Search. The indexing engine uses specified crawling rules to decide what is to be indexed. The index engine uses continuous propagation, which allows even a partial index to be queried against. It also exposes a UI for visual administration of the search capabilities. SharePoint Server 2007 also includes suggestion capability, which suggests search terms in case of typographical errors.

Microsoft Office SharePoint Server 2007 Standard, and Microsoft Office SharePoint Server 2007 Enterprise also includes a people search functionality, which can search for people, based on their affiliation and expertise, provided the enterprise infrastructure makes the information available. It can search from SharePoint user groups, as well as Active Directory and other LDAP directories provided the information has been imported into SharePoint Server.

Business Connectivity Services

Business Connectivity Services (BCS) in SharePoint 2010 replaces the SharePoint 2007 Business Data Catalog (BDC),[18] introduced in SharePoint Server 2007 – Enterprise Version, enables presenting business data from back-end server applications such as SAP or Siebel 2007 or databases to be viewed by the web-based interface of SharePoint without writing any code. It comprises a metadata repository and an object model. It provides a unified way to invoke operations. It presents a consistent, object-oriented interface to the business logic that is embedded in typical business applications. The Business Data Catalog provides homogeneous access to the underlying data sources by using a declarative metadata model that simplifies the client object model. The Business Data Catalog Definition Editor is now included in the SharePoint Server SDK.[19] The BDC Editor can connect to a database or a web service provided by a LOB system and then generate the Application Definition File for it. The task of maintaining the catalog is divided among four roles: business analyst who identifies the data to be presented, metadata author who creates the tags to identify the data to SharePoint, administrator, and developer.

MySites

MySite is an important feature in SharePoint Server 2007 that enables users to obtain access to a personalized view of the information that’s relevant to them. MySite has a Public view and a Private view. Users are able to determine the permissions on various pieces of information that are in a MySite and select whether their colleagues, manager, or everyone in the organization can see each piece of information. The Private view of a user’s MySite enables them to see the following types of information:

  • Workspace – Users can see and access the workspaces to which they have access, saving wasted navigation time.
  • My Links – A list of personal links that are important to the user. As users are browsing the SharePoint site, they can quickly add a link for a given page to the My Links list by selecting Add Link from a menu in the upper right corner of the page.
  • Personalization Sites – Special SharePoint sites that personalize content based on a user’s role in the organization can be pinned to the appropriate user’s My Site based on their organization role (HR, Facilities, Finance, etc.). Microsoft has released several role-based personalization templates to help people get started with this feature.
  • Colleague Tracker – Enables users to track the changes that they have permission to see in their colleague’s MySites.
  • Outlook e-mail – Web Parts are available for users’ MySites that display their e-mail and calendar information from Exchange.
  • Distribution Groups – In the public version of MySite, you can see the distribution groups that you’re a member of and, when looking at other users’ MySites, can see the distribution groups that you have in common with them.
  • Standard WSS Site Features – Since a MySite is a WSS site at its core, users’ MySites have all of the typical functionality that comes with Windows SharePoint Services (Document Libraries and Lists, Recycle Bin, Version Control, Workflow, etc.)

If the system has the appropriate multi-language packs and templates installed, users can be given the option of creating their MySite in one of the languages available on the system instead of being forced to use the language that governs the more public areas of the SharePoint system. This might be useful in a scenario where a global enterprise is enabling their users in China and Spain to create their MySite in Chinese or Spanish.

Accessibility

Although SharePoint Server 2010 continues the improvement in accessibility has improved since SharePoint Portal Server 2003,[20] it is still difficult to get a Sharepoint web site to adhere to the WCAG (Web Content Accessibility Guidelines) 1.0 specification.[21] Sharepoint 2007 relied extensively on table-based layouts, especially in the Web Parts Framework, and XHTML is also problematic as Sharepoint’s built-in controls produce markup that does not validate under XHTML doctypes.[22] Substantial custom development is therefore essential in order to comply with these standards.[23] This has proven to be a key stumbling block to the adoption of Sharepoint solutions in situations where strict adherence to accessibility standards is of particular importance, such as the public sector.[20]

SharePoint 2010 moved to producing XHTML to be more compliant with WCAG 2.0 AA standards of accessibility. That said because of the ease of using the content publishing it is very likely that a deployed site will could easily contain features that do not comply to XHTML standards. For example in standard discussion one can post directly from an existing web page, carrying all HTML over which will be included in the side regardless of its compliance to XHTML standards.

Microsoft Office Sharepoint Server – Workflow
Microsoft Office Sharepoint Server – Designer
Microsoft Office Sharepoint Server – SQL Reporting Services Reports
PDF Microsoft Office Sharepoint Server – Business Data Catalog
PDF Microsoft Office Sharepoint Server – Enterprise Search
PDF Microsoft Office Sharepoint Server – Excel Services and BI
PDF Microsoft Office Sharepoint Server – Info Path and Sharepoint Forms



Tag Cloud