SharePoint Free Training Thursday, Jan 7 2010 

Hi guys I came across this free training for SharePoint 2007 and SharePoint 2010. The training is for both SharePoint developer and SharePoint Administrator. I would like to share this with all my SharePoint friends.

SharePoint Training

Cheers…

Batch Update – SharePoint Tuesday, Dec 8 2009 

Hi Guys, Today i would like to explain you about the batch update process in SharePoint. Batch (Group of items), the meaning is to update a large number of items to the SharePoint list by passing the values as XML elements. Consider if u want to update the list with more than 100 items. In this case if u use foreach it will be very expensive and it suck ur time. Moreover if u use SPListItem.Update() it takes 2.8secs for updating a single item. If u r using ProcessBatchUpdate it takes 30 secs to update to a maximum of 200 – 300 items based on ur requirement. So my suggestion is to use ProcessBatchUpdate for Adding, Updating and Deleting a large number of items from the SharePoint List.
 
Lets see how to perform this command through the SharePoint object model
 
Consider that u r adding items in the list with Title field as a running numbers. This is for example ah
 
First of all u should format the XML file for Inserting, Updating or Deleting the items in list
 
StringBuilder methodBuilder = new StringBuilder();
string batchFormat = “<?xml version=\”1.0\” encoding=\”UTF-8\“?>” +
                                “<ows:Batch OnError=\”Return\“>{0}</ows:Batch>”;
// For Updating
string methodFormat = “<Method ID=\”{0}\”>” +
                                   “<SetList>{1}</SetList>” +
                                   “<SetVar Name=\”Cmd\”>Save</SetVar>” +
                                   “<SetVar Name=\”ID\”>{2}</SetVar>” +
                                   “<SetVar Name=\”urn:schemas-microsoft-com:office:office#Job_x0020_No\”>{3}</SetVar>” +
                                   “</Method>”;
For update command pass the ItemID for ID parameter and the values.
 
// For Inserting
string methodFormat = “<Method ID=\”{0}\”>” +
                                   “<SetList>{1}</SetList>” +
                                   “<SetVar Name=\”Cmd\”>Save</SetVar>” +
                                   “<SetVar Name=\”ID\”>New</SetVar>” +
                                   “<SetVar Name=\”urn:schemas-microsoft-com:office:office#Job_x0020_No\”>{2}</SetVar>” +
                                   “</Method>”;
for (int i = 0; i < 10000; i++)
{
    methodBuilder.AppendFormat(methodFormat, i, listGuid, “1”);
}
 
If u observe the code we are passing the MethodID as running numbers, listguid, values
 
// For Deleting
string methodFormat = “<Method ID=\”{0}\”>” +
                                   “<SetList>{1}</SetList>” +
                                   “<SetVar Name=\”Cmd\”>Delete</SetVar>” +
                                   “<SetVar Name=\”ID\”>{2}</SetVar>” +
                                   “</Method>”;
For delete command get the item collection to delete and pass the ItemID to delete.
 
Note: Please pass the Fields internal name in the XML.
 
batch = string.Format(batchFormat, methodBuilder.ToString());
 
The above method will perform the operation and will return XML value as string. It is not necessary. Just capture that value in a string.
 
I hope u understand the concept of ProcessBatchUpdate in SharePoint. Just give a try and later u will become impressed. If there is any query don’t forget to mail me. Catch me at sudharsan_1985@live.in, sudharsan.zylog@gmail.com
 
 Cheers…
 
 
 

SPGridView Problem – Paging and Grouping Tuesday, Dec 8 2009 

Hi guys, i hope u all enjoyed my previous posts. Here i would like to share some information regarding SPGridView in SharePoint. It is one of the most effective and advanced control in SharePoint. Many of them have used this control and they succeed in their part. As per one of the client requirement i have developed a application page with SPGridview and i have added Paging and Grouping. First i add only the paging with custom paging template it works fine. But, when i try to add the Grouping it throws an Unknown Error. I have searched all over the net and i have found the solution. If anyone has encountered this problem please change the EnableViewState property to false and it will work.

Cheers…

WPF Document Features Wednesday, Dec 24 2008 

WPF provides an array of features that enable you to create rich, document-based content.

Document Types:

  1. Fixed Document Types
  2. Flow Document Types

Fixed Document Types: It enable a precise presentation, independent of the display or printer hardware.

Flow Document Types:
It dynamically adjust their content based on variables such as window size.

Document Controls and Text Layout

WPF comes with the following controls for displaying of document content and text:

  • Document Viewer displays fixed document content in read-only mode.
  • FlowDocumentReader enables you to switch between several viewing modes.
  • FlowDocumentPageViewer shows content a page at a time.
  • FlowDocumentScrollViewer shows content in a scrolling mode.
  • Text Block displays small amounts of text.

 

Document Packaging:

WPF provides efficient document packaging with the System.IO.Packaging APIs, which include the default Zip Package implementation. An object in a package is a Package Part and you can add additional information to a package by using a Package Relationship.

 

XML Paper Specification:

XML Paper Specification (XPS) is a subset of XAML that is targeted towards fixed format documents. The XPS Document format conforms to the Open Packaging Conventions for data organization and enables users to create, share, print, and archive paginated documents.


Powerful Layout and Control Features of WPF Applications Tuesday, Dec 23 2008 

WPF provides new techniques for application development, and makes better use of current hardware and technologies. These significant advances include several features that relate to the layout and control of applications, as described in the following table.

 

Feature

Description

Layout WPF provides layout elements to enable you to build an adaptable user interface. These elements include a flow-style layout, where content flows left to right and then onto the start of the next line. WPF also provides a grid, which enables table-like layouts.
 

 

The grid layout enables you to resize content automatically or proportionally. You can nest layout elements to produce complex layouts and write new element types if the built-in types are not suitable.

Content Model The templates for many controls, such as labels and captions, contain placeholders for additional content, which allows for the composition of elements. Traditionally, these placeholders allowed only text, or sometimes a bitmap. WPF has a flexible content model that enables you to use any content in these placeholders, including other controls, drawings, or animations.
 

 

This lack of restrictions enables a host of visual design possibilities and includes a great deal of power for visual designers.

Lookless Controls In WPF, most controls are lookless because WPF disassociates the appearance from the control. Controls provide behavior, but you can easily customize the entire appearance of a control without the need to write a custom control. Controls usually have a built-in template that provides a default appearance; however, you can replace this template to change the look of the control.
 

 

This feature means that WPF controls are much more flexible than Windows Forms or Win32 user interface components.

Data binding With WPF controls, you can use anything as the content of the control, including dynamic content from a data source.
 

 

WPF data binding provides a simple and consistent way for applications to present and interact with data. You can bind elements to data from a variety of data sources and use data templates to specify how a control must display an object. Data templates act as a bridge between objects and the user interface, and give designers great flexibility to manage data presentation.

Styles Styles are lists of properties and values that enable consistency across an application. You can apply a style to any element in a user interface and use a style to set any property.
 

 

You can only apply a style to framework elements. Styles are a declarative feature and this enables you to manage the look of an application independently of its behavior and structure.

Triggers A trigger is a declarative mechanism that specifies how a control should respond to certain stimuli. You can declare a trigger inside a style or a template. One use of a trigger is to start an animation.
 

The declarative nature of triggers enables designers to create a user interface that responds to actions without the need for code from a developer.

The Importance of User Experience in WPF Tuesday, Dec 23 2008 

User Experience: User experience is more than looks. User experience represents the overall interaction process of the user with a product. The interaction provides the user with added value and it also provides tremendous business value by:

  • Creating brand awareness.
  • Enabling the user to differentiate products, and increase customer satisfaction.
  • Helping the user to work with products in an easy, consistent and secure manner.
  • Encouraging the user to use your product and others like it.

Traditionally, functionality has been more important than user experience in software development, at least partly because the available technologies did not always make it easy to create compelling user interfaces (UI). The introduction of WPF now enables the seamless convergence of user interface, media, and documents, and means that you can create applications with a compelling user experience with a minimum of work.

Presentation:

  • Appropriate features for the program and its target users.
  • Aesthetic appearance, often in a subtle way.
  • High-quality usability and flow.
  • Durable good impression.

Professional Design: Along with the developer, professional designers have an important role to play in user experience. The role of the designer is to create an interface that is useful, usable, desirable, and feasible. WPF provides features such as XAML that greatly improve the collaboration possibilities between the designer and the developer of an application.

The Evolution of WPF Tuesday, Dec 23 2008 

The evolution of WPF begins with the Internet Explorer and dynamic HTML model. This model can produce sophisticated content but has scalability, content, and media limitations. Microsoft also saw a need for a new platform that could exploit the significant graphical power of modern computers. At the start of 2001, Microsoft established a new project to build an integrated Web client platform. The project team made four crucial decisions:

Managed or Unmanaged Code: At the start of the project, the first version of the .Net Framework had not shipped. However, because it was clear to Microsoft that managed code would be the focus of future development, the team decided to use managed code to build the platform.

Markup Language: The choices available to Microsoft were either to invent a new markup language or build one that used Extensible Hypertext Markup Language. The project team wanted parallelism between the markup language and the .Net Framework and decided to create a new markup language, known as Extensible Application Markup Language (XAML).

Code Base: The Windows Presentation Manager Platform was built from the ground up to provide a managed interface for Windows development. The platform is built upon an unmanaged layer called the Media Integration Layer (MIL) that provides support for both device-independent and vector graphics by using the underlying services of DirectX. The developer API, however, is exposed entirely as managed code.

Platform Support: Although supported on Windows XP SP2, WPF was designed for Windows Vista. Windows Vista provides new WPF-enabled drivers that take better advantage of WPF, providing a richer experience with higher fidelity graphics and smoother animations. Although WPF applications run on Windows XP, they do not look as visually compelling as on Windows Vista.

ASP.NET 3.5 Windows-Based Authentications Monday, Dec 15 2008 

ASP.NET 3.5 provides to use Windows and Form authentication to our application. From this post we can see how to use Windows authentication in our application.
Authentication is the process of identifying and validating the client accessing your application. Simpler, it is the process of identifying “Who” the end user is and when they visit the site. Authentication is typically used in combination with Authorization — which is the process of figuring out whether the authenticated user has permissions to access a particular page/resource or to perform some action. In ASP.NET terms, authentication is the process that determines the identity of a user. After a user has been authenticated, a developer can determine if the identified user has authorization to proceed. It is impossible to give an entity authorization if no authentication process has been applied. You should never authorize access to resources you mean to be secure if you have not applied an authentication process to the requests for the resources

Hello world! Saturday, Dec 13 2008 

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Enterprise Search Friday, Sep 5 2008 

Introduction:
Enterprise Search is one of the most compelling features of SharePoint Server 2007. The out-of-the-box capabilities can drastically improve end users’ experience in retrieving relevant information. The same capabilities are available for custom SharePoint applications through dedicated APIs.
There are three ways to create and run search queries against the SharePoint API, each with specific advantages. A description of each approach follows.
  • Keyword Search Queries
  • Search Web Service
  • List Query API (SPQuery Class)

Keyword Search Queries:

This is the most straightforward approach. Once you specify in your code what keywords to look for, you can just run that query and start retrieving results. For its simplicity, the keywords-only approach comes with limitations. In particular you will not be able to define comparison constraints in the query.

Search Web Service:

SharePoint Server 2007 exposes most of its search functionalities as a web service. You can reference this web service from any other application to run queries against your SharePoint farm and use those results outside the context of SharePoint Server. Because all our code executes in the context of SharePoint Server, we passed on leveraging the search web service to favor full text SQL queries.

List query API (SPQuery class):

SPQuery is the class of choice to query and return items from a single SharePoint list. The query syntax uses CAML (Collaborative Application Markup Language). CAML queries were already available in SharePoint Server 2003. They provide a way to run XML-formatted queries against SharePoint content. The syntax is quite powerful, with the ability to filter data based on field comparisons. Note that by default only queried items in a single list folder will be returned. Items from subfolders will not be included in the search results.

Cheers…

Next Page »