Wednesday, November 10, 2010


Project Server 2010 Architecture
Microsoft Project Server 2010 is a true multi-tiered system that extends the architecture introduced in Microsoft Office Project Server 2007. The Project Server architecture includes Microsoft Project Professional 2010 and Project Web App clients in the front-end tier. The front-end applications communicate with the middle tier only through the Project Server Interface (PSI) Web services, which in turn communicate with the business object layer. Business objects use the databases through the data access layer (DAL). Client applications do not directly access the primary databases; Project Server hides business objects and the DAL from clients.
The major differences between Project Server 2010 and Office Project Server 2007 are the following:
  • Project Server 2010 requires Microsoft SharePoint Server 2010 to be installed on the computer running Project Server and on all Project Web App servers within a SharePoint farm.
  • The PSI includes both the Windows Communication Foundation (WCF) interface and the ASMX interface for Web services.
  • The Project Server workflow platform is integrated in the PSI, business object layer, and DAL, and built on Windows Workflow Foundation (WF) in the SharePoint platform.
  • In Project Server 2010, you can use the WCF or the ASMX interface of the PSI. The Project Web App and Project Professional 2010 clients both use the WCF interface.
  • The PSI Forwarder in the following diagram consists of two components, a WCF Forwarder and a Web Service Forwarder. Clients that use the ASMX interface call the PSI through the Web Service Forwarder. Clients that use the WCF interface call the PSI through the WCF Forwarder.
  • The SharePoint Web Services site is part of SharePoint Server 2010 and is not shown in the following diagram. The SharePoint Web Services site includes the Project Service Application with the PSI virtual directory for the ASMX and WCF services. The Project Service Application in Project Server 2010 replaces the Shared Services Application in Project Server 2007.






Architecture of Project Server 2010
  1. The front-end tier includes third-party applications, Project Professional, and Project Web App. Project Web App uses Internet Explorer to display Microsoft ASP.NET 3.5 pages. The Project Web App pages use Project Server Web Parts that communicate with the PSI and also use standard SharePoint Server 2010 Web Parts.
  2. Client applications on separate computers call the PSI through service proxies. External clients that use the WCF interface access the PSI through http://ServerName/ProjectServerName/_vti_bin/psi/ProjectServer.svc. Clients that use the ASMX Web service interface use one of the Project Web App URLs, such as http://server1/pwa/_vti_bin/psi/project.asmx. If applications do not have intranet access to Project Server, they can use a Project Web App server in a perimeter network.
  3. If they can directly access the Project Server computer, client applications and back-end components of line-of-business (LOB) Web applications can use PSI proxies that use the Project Server service application URL for the PSI Web services, such as http://server1:32843/ProjectServiceApplication/project.asmx. Port 32843 is the default port for the SharePoint Web Services application in SharePoint Server 2010. Direct access to the Project Service Application virtual directory should be used only when an application needs to use impersonation or run with elevated permissions.
  4. The middle tier includes the PSI and the business logic layer, which consists of logical business objects that represent Project Server business entities. Business objects include Project, Task, Resource, Assignment, and so forth. The PSI and the business logic tier are tightly coupled and are located on the same server. A client application calls the PSI Web services, and the PSI invokes business objects in the business logic tier.
  5. The DAL provides communication between the middle tier and the database. All Project Server data is stored in Microsoft SQL Server databases. The Project Server databases are factored into the following stores: Draft, Published, Archive, and Reporting. Client applications can read the Reporting database for project data. Clients should use only the PSI to access the Draft, Published, or Archive databases. The Reporting Data Service (RDS, which is not shown in Figure 1) updates the Reporting database from published data in nearly real time. In Project Server 2010, all of the Project Server databases can be located on separate servers.
  6. The Project Web App components of Project Server also use the SharePoint Foundation 2010 configuration database for project site setup and the content database for project site content such as custom pages, workflows, management settings, documents, and lists of issues, risks, and commitments. The SharePoint configuration and content databases support additional features for project management, such as project templates and workspaces, custom lists for team collaboration, and reports.
             Project Server Interface
The PSI is the API of Project Server. The PSI object model exposes Project Server functionality to all external applications. Project Professional 2010, Project Web App, LOB, and other third-party applications use the PSI to access Project Server data in the Draft, Published, and Archive databases. The PSI is available through WCF services and through ASMX Web service calls by back-end LOB applications, or through a PSI proxy.

 Data Access Layer and Databases
The DAL is internal to Project Server and is not exposed to external applications. The DAL translates between the logical business entity representation of the data and the physical database tables. Each logical entity is stored in a number of different tables. The DAL encapsulates the work required to manage connections, execute queries, and begin/commit/roll back transactions.
Project Server data is partitioned into four databases in SQL Server.
  • The Draft database contains tables for saving unpublished projects from Project Professional and other applications. Project Web App does not show project data in the Draft database.
  • The Published database contains all of the published projects and enterprise resources, the enterprise global template, and other project templates. Published projects are visible in Project Web App. The Published database also contains tables that are specific to Project Web App (timesheets, models, views, and so on), and global data tables (custom fields, lookup tables, security, and metadata).
  • The Archive database saves backup versions of projects and other data.
  • The Reporting database (RDB) is the staging area for generating reports and OLAP cubes. Data in the Reporting database is comprehensive and is updated nearly in real time. The tables and views are optimized for read-only report generation; for example, the RDB tables are denormalized to provide redundant data and reduce the number of relational tables.

Monday, October 18, 2010

EPM --> MS Project --> MS Project Server


EPM:
  1. Enterprise Project Management (EPM), is the field of organizational development that supports organizations in managing Projects, Resources and the Cost of the projects.
  2. EPM provides the proper governance for the projects which are running under the organizations in terms of Schedules, Cost and Resources.
  3. Schedules meant for creating tasks related to the project to be completed in a particular timeframe. Cost includes the money and the time spent to the project and Resources stands for the people and resources needed for completing the project.
  4. EPM is very useful to make life easier for the managers to manage, monitor, and assess the status of all projects under them.
  5. Project Portfolio Management (PPM) is also a part of the EPM which is used to create a portfolio (per budget size, per calendar year, per budget year, per business line, etcetera) for projects.
  6. Project Portfolio Management also includes the creation of various scenarios to decide which is the most optimal portfolio (for a certain year, business, budget, etcetera)
  7. There is already number of tools available for EPM in the market. "Microsoft Project and Microsoft Project Sever" are the tools which have been provided By Microsoft for adopting EPM Capabilities.
Microsoft Project:
  1. Microsoft Project (or MSP or WinProj) is a project management software program developed and sold by Microsoft which is designed to assist project managers in developing plans, assigning resources to tasks, tracking progress, managing budgets and analyzing workloads.
  2. MSP is a Microsoft Office tool the can be used to create applications that creates critical path schedules, and critical chain and event chain methodology Schedules can be resource leveled, and chains are visualized in a Gantt chart. Additionally, Project can recognize different classes of users. These different classes of users can have differing access levels to projects, views, and other data. Custom objects such as calendars, views, tables, filters, and fields are stored in an enterprise global which is shared by all users.
  3. Microsoft Project 2010 features the Ribbon user interface; the current Version for the MSP is 2010.
  4. The following diagram shows the basic look of a project which has been created using project sever 2010.
  1. The above diagram shows the project which has been created by manager which contains all main Phases involved in that project. The Gantt chart shows the Schedules for each phase.
  2. This contains Menu with all the capabilities includes task scheduling Resource management.


    All these above can be done when we have been installed with MS Project Software. These files cannot be useful if we don't have project. This leads Microsoft to Develop Microsoft Office Project server 2010.
Microsoft Office Project Sever 2010
1) Microsoft Office Project Server is a project management server solution made by Microsoft. It uses Windows SharePoint Services as its foundation, and supports both a web interface and Microsoft Project as the client application.
2) Microsoft extends the capabilities of Microsoft Project with Project Server and Project Web Access. Microsoft Project Server stores project information in a central SQL Server database, protected from unauthorized access and corruption. A Project Administrator can control security defining users and access rights.
3) Being it built on Sharepoint, We can extend its capabilities by developing the Webpart programming and can use Sharepoint object model for programming from other applications using SP API's.
4) The following screen shows a project created by the manager in the Project Sever 2010 Web application.


5) We can sync this application with MS Project by creating project service application in Sharepoint.

 

SharePoint 2010 Search

1) Search connects people to the information they need to get their jobs done. General productivity search solutions increase employee efficiency by connecting a broad set of people to a broad set of information.

Microsoft Provides following search Capabilities for Sharepoint Enterprise Search

a) SharePoint Foundation 2010
b) Search Server 2010 Express
b) Search Server 2010
d) SharePoint Server 2010
e) FAST Search Server 2010 for SharePoint

2) Microsoft provides SharePoint Foundation 2010 and Search Server 2010 Express free of charge for you to use on licensed Windows® servers. These entry level products offer the ability to crawl and index content and provide a user interface for executing queries against the catalog of crawled content.

3) SharePoint Server 2010 and Microsoft Search Server 2010 offer improved scalability and options for indexing content from many different sources, while fulfilling the configurability, manageability, and reporting requirements of your organization.

4) SharePoint Server 2010 provides a great platform for creating general productivity search applications.

5) FAST Search Server 2010 for SharePoint is a new product from Microsoft, and it delivers the power of FAST with the simplicity and total cost of ownership (TCO) benefits of Microsoft products. FAST Search Server 2010 for SharePoint further enhances the crawling, content processing, user interface, and scale
of SharePoint Server 2010.

Feature Comparison

You can use the following table to make quick comparisons of the enterprise search features provided by each product in the SharePoint 2010 Products.

Feature
SharePoint Foundation 2010
Search Server 2010 Express
Search Server 2010
SharePoint Server 2010
FAST Search Server 2010 for SharePoint
Basic site search
Y
Y
Y
Y
Y
Best Bets
Y
Y
Y
Y
Visual Best Bets
Y
Similar Results
Y
Duplicate Results
Y
Y
Y
Y
Y
Search Scopes
Y
Y
Y
Y
RSS Feeds for Search Results
Y
Y
Y
Y
Y
Alerts for Search Results
Y*
Y*
Y*
Y*
Advanced Search Page
Y
Y
Y
Y
Search Enhancement based on User Contexts
Y
Crawled and Managed Properties
Y
Y
Y
Y**
Entity Extraction
Y
Query Federation
Y
Y
Y
Y
Query Suggestions
Y
Y
Y
Y
Sort Results on Managed Properties or Rank Profiles
Y
Relevancy Tuning by Document or Site Promotions
Y
Y
Y
Y**
Shallow Results Refinement
Y
Y
Y
Y
Deep Results Refinement
Y
Document Preview
Y
Windows 7 Federation
Y
Y
Y
Y
People Search
Y
Y
Phonetic Name Search***
Y
Y
Nickname Search***
Y
Y
Self Search
Y
Y
Social Search
Y
Y
Taxonomy Integration
Y
Y
Multi-Tenant Hosting
Y
Rich Web Indexing Support
Y
 
First Steps


There are some general tasks you will need to perform when you are evaluating search products or implementing enterprise search solutions that meet your organization's requirements. The following sections can help you get started.

Identify your content

The first step you need to take before performing any actions is to identify the content in your organization that you want to index. Content from SharePoint sites is automatically included in all of the SharePoint search products, but you can also index content from file shares, Microsoft Exchange public folders, external Web sites, Lotus Notes databases, and your line-of-business applications.

You can also use SharePoint Designer 2010 or Visual Studio 2010 to create Business Data Catalog applications that enable custom databases, Web services, and other custom solutions to be indexed.

Note: SharePoint Foundation 2010 can only index content in SharePoint sites. All other enterprise search products from Microsoft can index content in the content repositories mentioned above by using the connector framework.

FAST Search Server 2010 for SharePoint also provides enhanced capabilities for indexing business intelligence data. You can obtain the Business Intelligence Indexing Connector to provide enhanced search and analysis for business intelligence assets.

Crawl your content

The next step is to crawl the content in the content repositories that you have identified. You can implement both full and incremental crawl schedules to ensure that indexed data is as fresh as possible.

The new index partitioning capabilities of Search Server 2010, SharePoint Server 2010, and FAST Search Server 2010 for SharePoint enable you to balance the indexing load (and query load) across servers that are dedicated to provide search for large amounts of content.

Scale your search infrastructure

One of the design goals for Search Server 2010 and SharePoint Server 2010 is to provide sub-second query response times for up to 100 million indexed documents. For FAST Search Server 2010 is designed to provide sub-second query response times for more than 1 billion indexed documents. To achieve sub-second query response times for your organization you may need to scale your server farm to include multiple query servers. Additionally, to ensure that indexed data is as fresh as possible when indexing a large number of documents, you may need to include multiple indexers. The highly componentized architecture of the enterprise search products from Microsoft enables you to do just that; for example, you can implement partitioned indexes on multiple indexers to be able to cope with crawling demands, and you can include multiple query servers to balance the query processing load at search time.

Customize the end-user search experience

Optionally, you may want to provide a customized user interface so that information workers can search for information and manipulate results in the most efficient way for your business. The Enterprise Search Center for SharePoint Server 2010 and the FAST Search Center are highly customizable without requiring developer effort. For example, you can create search scopes, modify properties of search Web Parts, apply XSLT styles, and apply themes to search centers with minimal effort. All of this can be done through the Web browser or by using SharePoint Designer 2010.

If you need to customize the search experience further, then developers can create a completely customized user interface by creating new Web Parts that inherit functionality from the existing search Web Parts. Furthermore, the search API is completely open so developers can create new paradigms and ways of working with search, such as by creating new Web Parts or even Silverlight applications that run searches and render results.

Customize the content processing pipeline

One of the key differentiators between FAST Search Server 2010 for SharePoint and other search products is the ease with which you can customize content processing at indexing time. FAST Search Server 2010 for SharePoint enables you to create your own metadata extractors that will be used in the content processing pipeline. This enables you to define how managed properties are populated from crawled content, and you can then use that metadata in deep refiners; you can then include these organization-specific vocabularies in the metadata refinement panel which enables you to provide search solutions in the terms and language of your business.


 

Thursday, August 19, 2010

Sharepoint 2010 Basics

Here im posting some Brief points from Sharepoint 2010 That I learn from Microsoft Virtual Techdays yesterday. 
1) Introduction to SharePoint 2010 :
a) In Introduction they have explained about the base Architecture of the Sharepoint 2010 and what changes have been made in 2010 from 2007.
b) This even concentrated on how to get data from sharepoint to the other applications using REST client services.
c) REST Services in Sharepoint has been established as WCF service. They named it as listdata.svc. This located under _vti_bin folder.
d) Also Explained about Sandbox solutions and the difference between sandbox and Farm Solutions. 

2) Sharepoint 2010 and custom workflows :

a) In this section they explained about Different types of work flows available in Sharepoint 2010.
b) Previously there are three ways to create workflows, They are using Browser Based, Designer based and VS Based.
c) Now we can even use Visio 2010 to create workflows. An example has been shown to create workflows using visio.
d) Selecting tool to create workflow will be based on the business it is going to approch.

3) Business Connectivity Services in SharePoint 2010:

a) Business Data Catalog in Sharepoint 2007 is now Enhanced as Business Connectivity Services in Sharepoint 2010.
b) This is responsible for all Data operations including Search in Sharepoint 2010.
c) Search Service uses a new Query Language called FQL to retrieve the data.
d) There are two Key areas BCS. They are Presentation, Connectivity. For presentation there are meny webparts are provided according to the Requirement. And for connectivity there are different driver to connect Other databases and WCF communication with other applications.
4) SharePoint 2010 and Silverlight:
a) The rich interface of Sharepoint 2010 is because of Silverlight. Every thing include popups are developed using silverlight in Sharepoint 2010.
b) We can create a silverlight applications and we can Deploy that wsp to sharepoint to use those xaml files as webparts in sharepoint.
c) We can even Connect Data in Sharepoint with Silverlight applications. An example has been provided this.

Here are some URLS to learn Sharepoint 2010 form Basic to Advanced level.

All the videos and Slides of this Sessions are uploaded to the techdays site. We can refer them when ever we want.

Thursday, July 22, 2010

Sharepoint Backup Scheduling using Powershell

So long i have been waiting for a good topic to post!!
Here we go


This is about powershell backup script to automate sharepoint backups.

Hope most of you got a good idea about microsoft new revolution PowerShell. That even rocking Sharepoint 2010.
(To know more about Windows poweshell click
Here)
(To know more about Sharepoint poweshell click Here)

* Refers to the above links Windows powershell runs with powershell commands.
* These powershell script files will be stored with extension .ps1
* To run this script files user needs to be provided with powershell admin priviliges.
* You can use Backup-SPFarm to do it. For help and examples, type get-help Backup-SPFarm -examples.

For example, the follow script will start a full backup to .

Backup-SPFarm -Directory -BackupMethod full

Save it as .ps1 . You may need to use "set-executionpolicy RemoteSigned" to allow a local unsigned ps1 file to run.


And put the following as your scheduled command line, or inside your batch file....
powershell -command .ps1

In task scheduler, the account need to be set to the one who has admin permissions (or at least with powershell permission)

otherwise it cannot run properly.


When you do a Farm level backup, SharePoint tells SQL to do database dump to that location. Here are some things that have to

work in order for a farm backup to work:

1.Your Central Admin app pool account must have read/write access to the location of the backups.
2.Your SQL Service account must have read/write access to the location of the backups.
3.If you're running a farm backup from STSADM or Windows PowerShell, the account you're running it as must have read/write

access to the location of the backups
4.The location must be accessible from the SharePoint machine the backup is running on.
5.The location must be accessible from the SQL instance that SharePoint is trying to back up.
6.This is why all the examples are UNCs, \\server\share, and not local paths, C:\backups
7.Hope that helps


Go through following links which refers to write powershell script for Web applications,Site collections,Sites and lists or

libraries

http://technet.microsoft.com/en-us/library/ee428315.aspx

Wednesday, June 30, 2010

Programming Against a List Using the Lists Web Service


Program against lists in SharePoint 2010, which enables you to manage, create, read,

update, and delete (CRUD) operations against the list. To program against a list, follow these steps:

1. Open Visual Studio 2010 and click File ➪ New ➪ Project. In the New Project dialog, navigate to
the Windows templates under the Installed Templates gallery and select “WPF application.”

2. Provide a name for your application (forexample, WPFSPListApp) and a location,
and then click OK. Visual Studio 2010will create a new solution for you that
includes a number of files. Right-click the MainWindow.xaml file, and select View
Designer (if the view is not already open).

3. Add five labels, four textboxes, and three buttons to your Designer from the Toolbox
so that the UI looks similar to Figure 2-20. Table 2-1 provides a summary of the control
types and names that you will add to the WPF application.

4. The UI uses a type of XML syntax called Extended Application Markup Language (XAML), which
is specific to Windows WPF and Silverlight applications. The XML must be well formed, and,
when you drag and drop controls from the Toolbox onto the designer surface, the XAML will
automatically be generated for you. You’ll need to add a couple of event handlers to the button
controls to manage the loading of the SharePoint list data into the application. So, after you add
the button controls to the Designer, go to the XAML code view, click your mouse within the button
element, and press the spacebar. This will trigger IntelliSense, allowing you to select the Click
event. Accept the default event handler name, and Visual Studio will add a method for your buttons
in the code behind. The XAML for your application should look something like the following:

xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
Title=”MainWindow” Height=”300” Width=”500”>
Height=”28”
HorizontalAlignment=”Left”
Margin=”21,14,0,0”
Name=”lblTitle”
VerticalAlignment=”Top”
Width=”162”
FontWeight=”Bold”
FontSize=”13” />
Height=”28”
HorizontalAlignment=”Left”
Margin=”21,56,0,0”
Name=”lblCompanyName”
VerticalAlignment=”Top”
Width=”120” />
Height=”28”
HorizontalAlignment=”Left”
Margin=”21,90,0,0”
Name=”lblRegion”
VerticalAlignment=”Top”
Width=”120” />
Height=”28”
HorizontalAlignment=”Left”
Margin=”21,124,0,0”
Name=”lblSize”
VerticalAlignment=”Top”
54 ❘ Chapter 2 Getting Started with SharePoint 2010 Development
Width=”120” />
Height=”28”
HorizontalAlignment=”Left”
Margin=”21,158,0,0”
Name=”lblSales”
VerticalAlignment=”Top”
Width=”120” />
HorizontalAlignment=”Left”
Margin=”119,56,0,0”
Name=”txtbxCompanyName”
VerticalAlignment=”Top”
Width=”245” />
HorizontalAlignment=”Left”
Margin=”119,90,0,0”
Name=”txtbxRegion”
VerticalAlignment=”Top”
Width=”245” />
HorizontalAlignment=”Left”
Margin=”119,124,0,0”
Name=”txtbxSize”
VerticalAlignment=”Top”
Width=”245” />
HorizontalAlignment=”Left”
Margin=”119,158,0,0”
Name=”txtbxSales”
VerticalAlignment=”Top”
Width=”245” />
Height=”23”
HorizontalAlignment=”Left”
Margin=”29,218,0,0”
Name=”btnUpdate”
VerticalAlignment=”Top”
Width=”75”
Click=”btnUpdate_Click” />
Height=”23”
HorizontalAlignment=”Left”
Margin=”119,218,0,0”
Name=”btnClear”
VerticalAlignment=”Top”
Width=”75”
Click=”btnClear_Click” />
Height=”23”
HorizontalAlignment=”Left”
Margin=”210,218,0,0”
Name=”btnExit”
VerticalAlignment=”Top”
Width=”75”
Click=”btnExit_Click” />
Working with SharePoint Lists ❘ 55

5. Right-click the MainWindow.xaml file, and then click View Code. This will open up the code view.

6. Right-click the References project node, and select Add Service Reference. On the Add Service
Reference dialog, click the Advanced button and then click Add Web Reference on the Service
Reference Settings dialog.

7. In the Add Web Reference dialog, click the Web services on the local machine link. This will search for and display all of the Web services that are located on your developer machine, which will include the SharePoint Web services,

8. One of the Web services is the Lists service (with the endpoint listed as http:///_
vti_bin/Lists.asmx). Select this service. Note that you may need to change the Web service
URL to reflect your local server, for example http://fabrikamhockey/_vti_bin/Lists.asmx.
Provide a name for the service (for example, MySPWebService) and click Add Reference. (You can
also explore the Web methods that are a part of that service before you click Add Reference.)
9. At this point, you can add an event handler for each of the buttons in your WPF UI (which should
already be stubbed out for you). The Update button is the one button that will leverage the
Web service connection to SharePoint. You’ll also require a set of class-level variables to get the
user input and pass that into the Lists Web service. When you call the Lists Web service, you’ll
also need to create an XML construct that passes the data from your WPF application to your
SharePoint list. This XML is called the Collaborative Application Markup Language (CAML).
56 ❘ Chapter 2 Getting Started with SharePoint 2010 Development
10. The following code snippet illustrates the three event handlers, one for each of the buttons. The
bolded code is what you will need to add to the default code that is created for you by Visual
Studio. If you use the accompanying source code, you’ll need to ensure that you update the Web
service reference (by re-adding the service to the Visual Studio project), and update any URL references
in the code. For example, you would need to update the following line of code:
myListService.Url =
http:///_vti_bin/Lists.asmx”;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using System.Xml.Linq;
namespace WPFSPListApp
{
public partial class MainWindow : Window
{
string strCompanyName = ““;
string strRegion = ““;
string strSize = ““;
string strSales = ““;
string strListID = ““;
string strViewID = ““;
public MainWindow()
{
InitializeComponent();
}
private void btnUpdate_Click(object sender, RoutedEventArgs e)
{
strCompanyName = txtbxCompanyName.Text;
strRegion = txtbxRegion.Text;
strSize = txtbxSize.Text;
strSales = “$” + txtbxSales.Text;
WPFSPListApp.MySPWebService.Lists myListService =
new MySPWebService.Lists();
myListService.Credentials =
System.Net.CredentialCache.DefaultCredentials;
myListService.Url =
http://fabrikamhockey/_vti_bin/Lists.asmx”;
XmlNode myListView = myListService.GetListAndView(“Customers”, ““);
Working with SharePoint Lists ❘ 57
strListID = myListView.ChildNodes[0].Attributes[“Name”].Value;
strViewID = myListView.ChildNodes[1].Attributes[“Name”].Value;
XmlDocument myListDoc = new XmlDocument();
XmlElement batchXML = myListDoc.CreateElement(“Batch”);
batchXML.InnerXml = “” +
strCompanyName + “” + strRegion +
” + strSize +
” + strSales +
” + “”;
XmlNode myListReturn = myListService.
UpdateListItems(strListID, batchXML);
MessageBox.Show(“SharePoint List was updated!”);
}
private void btnClear_Click(object sender, RoutedEventArgs e)
{
txtbxCompanyName.Text = ““;
txtbxRegion.Text = ““;
txtbxSales.Text = ““;
txtbxSize.Text = ““;
}
private void btnExit_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
}
}
11. Assuming that your code reflects what is shown here, you should now be able to press F5 and run the application in Debug mode, add some string entries to the WPF application, and click Update to add the record to your SharePoint list, as shown in Figure 2-22.
Figure 2-22 Updated list How It Works The SharePoint Web services offer quite a range of functionality for the developer and should be one of your first stops when developing for SharePoint (to leverage what already ships with SharePoint).Many of these are services that were available in SharePoint 2007 and have evolved to be supported in SharePoint 2010. For those who used them in production code in 2007, this is good news, because upgrading your 2007 code should not prove too difficult.For this example, you used the Lists Web service, which provides a number of different ways to interact with a list — for example, you can add or delete a list, add an attachment to a list, get the list, and soon. In this example, you used the GetListAndView Web method, which returns a schema for a list that you pass in as a parameter to the GetListAndView method call. Note that, in this call, you passed the
name of the list, Customers, and mapped the return value to an XMLNode object.

XmlNode myListView = myListService.GetListAndView(“Customers”, ““);

The example also used CAML to insert data back into the SharePoint list. Admittedly, CAML is a little overbose, as you can see from the following line of code. (You’ll see different ways to interact with a list.

batchXML.InnerXml = “” +
strCompanyName + “” + strRegion +
” + strSize + “
+ strSales + “” + “”;
The last key piece in this example was the UpdateListItems method, which passed the list ID (that is,
the name of the list) and the list schema that was mapped to the CAML construct (which was further
tied to the data in the WPF client).
XmlNode myListReturn = myListService.UpdateListItems(strListID, batchXML);
While this method leverages native Web services, there are both pros and cons to using them. Pros

include ease of use and service plumbing that exists, as opposed to your having to create a custom Webservice. Cons include potential performance hits with service integration and syntax verbosity with theCAML construct.

If you followed along with this example and successfully updated your SharePoint list, then
congratulations!
You just wrote your first application against SharePoint 2010 that interacts with a
SharePoint list.