A Developer's First Look at Web Parts Microsoft Office SharePoint Portal Server 2003 and Windows SharePoint Services offer an exciting key technology: Web Parts.Both SharePoint offerings ship with an array of sample Web Parts; putting them in action is the best way to learn what Web Parts are and how they are used. Creating Web Parts in Visual Studio.NET is about to become one of the most powerful tools in your developer's repertoire. From the end user point of view, Web Parts provide customization tools that affect the appearance and content displayed on a workspace. Web Parts empower end users to design their own user interfaces to fit a personal way of thinking, analyzing, and of getting the job done, using drag-and-drop plug-and-play components on each individual's SharePoint workspace. These plug-and-play components display a wide variety of information in a number of formats and views. | " | Web Parts can be added to Web Part Zones at design time or left empty, waiting for the user to add the specific Web Parts they want to use.
| " |
One of the key concepts behind Windows SharePoint Services and Web Parts is that non-programmers can assemble the information they need and control how they want it displayed. On a single page, someone could analyze sales information, keep an eye on a stock ticker, review a calendar, and monitor a sports news feed. Some of these functions are less vital than others, but a non-programmer now has the ability to view this sort of information if they want to. All of the customization is done at run time while the user views a live page. Changes are made when the user specifies modifications to the current page; a list of available Web Parts is displayed, a Web Part is selected, and a simple drag and drop places it in the desired location. The Web Part displays whatever content it has been programmed to display, be it sales information and sales graphs, a customer list, a stock ticker, or fantasy football results. Users drag and drop a Web Part into a specified Web Part Zone on a specific type of Web Part Page that is designed to be receptive. The latest SharePoint products and technologies use Microsoft ASP.NET Web Part Pages to design and display SharePoint sites. How much freedom users have to use Web Parts and Web Part Pages depends on to which security group (or groups) the user is assigned and the rights assigned to each group. From a developer's point of view, a Web Part is just a collection of ASP.NET server controls. The primary difference between a standard ASP.NET control and a Web Part is that standard ASP.NET controls are added to ASP.NET pages at design time by developers, and a Web Part is added to a Web Part Zone on a Web Part Page at run time by users. | " | As part of its integration with Windows SharePoint Services, FrontPage 2003 provides the capability to build Web Parts Pages comprised of Web Part Zones.
| " |
One thing you might have noticed is that Web Parts don't fit the mold of traditional programming with a definite demarcation between design time and run time. Run time demands a new role for users: real-time page design and creation. This simplifies Web design because the focus can be on page design and layout, done in Microsoft Office FrontPage 2003 or Microsoft Visual Studio.NET. Adding a Web Part to a SharePoint Server Portal 2003 Page In order to add and change Web Parts on a shared-view SharePoint site, you must be granted the Add and Customize Pages rights for the site. As a member of the Web Designer and Administrator site groups, you will be granted this right by default. In order to add and change Web Parts on a personal view of a SharePoint site, you must be granted the Add/Remove Private Web Parts right and the Update Personal Web Parts right. In addition to being granted to the Web Designer and Administrator site groups by default, these rights are also granted to the members of the Contributor group. Let's look at a sample SharePoint Service Portal 2003 page (see Figure 1). The page contains some headings including Home, News, Topics, and Site Directory. You'll also notice a section in the body of the page for News, Events, Links for You, and Portal QuickStart Guide.  Figure 1: This is a sample SharePoint Portal Server 2003 site. | & | | 
By: Jim Duffy Jim Duffy is founder and president of TakeNote Technologies, an award-winning training, consulting, and software development company specializing in .NET software developer training and helping clients create business solutions with Microsoft enterprise technologies like Virtual Earth. Jim's expertise is with Visual Studio, Visual Basic, ASP.NET, SQL Server and Visual FoxPro-to-.NET conversions. He has a BS degree in Computer and Information Systems and over 25 years of programming and training experience. He is an energetic trainer, skilled developer, and has been published in leading developer-oriented publications.
Jim is a Microsoft Regional Director, a Microsoft MVP award recipient since 2003, an INETA speaker, and is an entertaining and popular speaker at regional user groups and international developer conferences. He is also a co-host of Computers 2K9, a call-in radio show on WRBZ (AM 850), 850 The Buzz, in Raleigh, NC.
You can find additional information about Jim, TakeNote Technologies, links to his blog, as well as a public training class schedule, on-site training information, consulting information, and software development services at www.takenote.com.
jduffy@takenote.com | Fast Facts | | XML files that reference a Web Part's namespace, class name, assembly, and additional optional property settings are called .dwp files. | |
|