Tuesday, December 28, 2010

SharePoint User Permissions

When SharePoint is installed, by default it will create a set of Permissions, which can be viewed by “Central Administration” => “Application Management” => “Manage WebApplications” => Highlight the WebApplication => Click on “User Permission”.

image

To secure the contents at various levels within SharePoint sites, it is these permissions that has to be enabled by the administrators. Each permission has a level of it’s own which can be; List, Site or Personal.

These Permissions are grouped/combined to create the Permission Levels. 

List level Permissions…

Permission Description Type Permission Level

Manage Lists

Create and delete lists, add
or remove columns in a list,
and add or remove public
views of a list.

List

Full Control, Design, Manage
Hierarchy

Override
Check Out

Discard or check in a document
that is checked out to
another user.

List

Full Control, Design, Approve,
Manage Hierarchy

Add Items

Add items to lists, and add
documents to document
libraries.

List

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Edit Items

Edit items in lists, edit documents
in document libraries,
and customize Web Part
pages in document libraries.

List

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Delete Items

Delete items from a list, and
documents from a document
library.

List

Full Control, Design, Contribute,
Approve, Manage Hierarchy

View Items

View items in lists, and documents
in document libraries.

List

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy, Restricted Read

Approve Items

Approve a minor version of a
list item or document.

List Full Control, Design, Approve
Open Items

View the source of documents
with server-side file
handlers.

List

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy, Restricted Read

View Versions

View past versions of a list
item or document

List

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy

Delete
Versions

Delete past versions of a list
item or document.

List

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Create Alerts Create alerts List

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy

View
Application
Pages

View forms, views, and application
pages; enumerate lists.

List

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy

Site level Permissions…

Permission Description Type Permission Level

Manage
Permissions

Create and change permission
levels on the website
and assign permissions to
users and groups.

Site Full Control, Manage Hierarchy

View Web
Analytics Data

View reports on website
usage.

Site Full Control, Manage Hierarchy

Create
Subsites

Create subsites such
as Team sites, Meeting
Workspace sites, and
Document Workspace sites.

Site Full Control, Manage Hierarchy

Manage
Web Site

Grant the ability to perform
all administrative tasks for
the website, as well as manage
content.

Site Full Control, Manage Hierarchy

Add and
Customize
Pages

Add, change, or delete
HTML pages or Web Part
pages, and edit the website
using a Microsoft SharePoint
Foundation compatible editor.

Site

Full Control, Design, Manage
Hierarchy

Apply Themes
and Borders

Apply a theme or borders to
the entire website

Site Full Control, Design

Apply Style
Sheets

Apply a style sheet (.CSS file)
to the website.

Site Full Control, Design
Create Groups

Create a group of users that
can be used anywhere within
the site collection.

Site Full Control

Browse
Directories

Enumerate files and folders
in a website using SharePoint
Designer and WebDAV
interfaces.

Site

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Use Self-
Service Site
Creation

Create a website using Self-
Service Site Creation

Site

Read, Contribute, Design,
Full Control

View Pages View pages in a website. Site

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarchy, Restricted Read

Enumerate
Permissions

Enumerate permissions on
the website, list, folder, document,
or list item.

Site Full Control, Manage Hierarchy

Browse User
Information

View information about users
of the website.

Site

Full Control, Design, Contribute,
Read, Limited Access, Approve,
Manage Hierarchy

Manage Alerts

Manage alerts for all users of
the website.

Site Full Control, Manage Hierarchy

Use Remote
Interfaces

Use SOAP, Web DAV, the
Client Object Model, or
SharePoint Designer interfaces
to access the website.

Site

Full Control, Design, Contribute,
Read, Approve, Manage
Hierarch

Use Client
Integration
Features

Use features that launch client
applications. Without this
permission, users must work
on documents locally and
upload their changes.

Site

Full Control, Design, Contribute,
Read, Limited Access, Approve,
Manage Hierarchy

Open

Allow users to open a website,
list, or folder in order
to access items inside that
container.

Site

Full Control, Design, Contribute,
Read, Limited Access, Approve,
Manage Hierarchy, Restricted
Read

Edit Personal
User
Information

Allow a user to change his
own user information, such
as adding a picture.

Site

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Personal level Permissions…

Permission Description Type Permission Level

Manage
Personal
Views

Manage
Personal
Views

Personal

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Add/Remove
Personal
Views

Add or remove personal Web
Parts on a Web Part page.

Personal

Full Control, Design, Contribute,
Approve, Manage Hierarchy

Update
Personal Web
Parts

Update Web Parts to display
personalized information

Personal

Full Control, Design, Contribute,
Approve, Manage Hierarchy

A blog post on Permission levels soon to be released. Winking smile

Manage SharePoint Farm Administrators

To Manage SharePoint 2010 Farm Administrators, follow the steps given below.

Go to “Central Administration”, select “Security” and go to “Manage the Farm Administrators Group”. Within this screen we can manage the Farm Administrators.

image

To remove a user, select the user by clicking on the checkbox on the leftmost column, go to “Actions” and click on “Remove Users from Group”.

(The reason why I wrote this simple blog post is, in one of the popular SharePoint 2010 Administration books I read recently, they have guided the reader in a wrong path)

Monday, December 13, 2010

Corporate portal with classic authentication or with claims-based authentication

These design samples illustrate a typical corporate deployment, with the most common types of SharePoint sites represented. The two samples differ only in the mode of authentication that is implemented -- one uses classic authentication and one uses claims-based authentication.

SharePoint 2010 Corporate Portal_ClassicAuth

SharePoint 2010 Corporate Portal_ClaimsAuth

You can download it in PDF, Visio or in XPS formats from here.

Thursday, December 9, 2010

Fortune 500 Companies Using SharePoint

Below text is extracted from an article written by Julian Corlaci about Fortune 500 companies using Microsoft SharePoint.

image

“Microsoft is still claiming SharePoint Server as the fastest growing product in company history, which is very impressive coming from such a diversified software maker powerhouse.”

“According to Association for Information and Image Management (AIIM) one in two corporations are now using SharePoint Server and in 22% of the companies, every employee uses this popular Microsoft collaboration tool. SharePoint usage is widely spread due to its complex collaboration structure and its flexibility. From enterprise search, enterprise content management (ECM), Business Process Management, business intelligence, records management, archiving, Intranet/Extranet, file sharing to public-facing websites, which will be covered in this article.”

Read More

image

Thursday, December 2, 2010

Free Sessions - Claims Based Authentication and Visio Services in SharePoint 2010

Sri Lanka .NET Forum
.NET User Group Meeting – December 2010

Session1: Claims based authentication
SharePoint Server 2010 utilizes a new authentication model called claims-based authentication(CBA). CBA is based on the concept of identity and utilizes open source standards and protocols so that it works with any corporate identity system, not just Active Directory and not just Windows-based systems. Lean how SharePoint 2010 has expanded its authentication mechanism beyond Windows Authentication and Forms Authentication.

Session 2: Visio Services in SharePoint 2010
A picture is worth a thousand words, and Visio provides the canvas and the tools to create drawings that represent ideas and concepts ranging from network topologies to landscape design, and process diagrams to UML. Using Visio you can connect the information stored across disparate repositories to shapes, and now the drawing is dynamic instead of static.
 
Speaker: Prabath Fonseka
Software Architect - IronOne Technologies
MSc. in Advanced Software Engineering
MCPD, MCTS, MCP

Date: 3rd December 2010 (Thursday)
Time: 6.00 PM Onwards
Venue: Training Room (Sithuvili) , 11th, DHPL Building, Colombo 02
Entrance: Free

Thursday, November 11, 2010

Deploy Project Server 2010 on SharePoint 2010

By any chance if you come across the requirement of installing and configuring Microsoft Project Server 2010, technet has provided a nice and easy guide of deploying Project Server 2010.

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

In this section:

Sunday, November 7, 2010

SharePoint 2010 Farm Topologies

Normally a SharePoint Farm topology vary on number of factors.

1) Number of users.
2) Redundancy requirements.
3) Service applications being used.

Looking back at SharePoint 2007, it was SSP (aka Shared Service Provider) we had. But with the new service applications model in SP 2010 the users have greater flexibility in deployments.

Given below are the different Farm Topologies used in SP 2010 Deployments.

Single Server Farm
This is ideal for a user base of less than 100. This farm consists of a single server catering the requirement of the Web Front End (WFE), Database Server and the Application Server.

image

Two Server Farm
This farm is equipped with one Database Server and one Webserver that performs all the application services. For high availability a clustered or mirrored database server is recommended. This farm can cater the requirement of 100 to 10,000 user base.
image

Two-Tier Small Farm
This environment is adequate for a user base of 10,000 to 20,000 with low service usage. Two Web Servers, one Web Server performing the tasks of the Application Server and the Database Server (clustered or mirrored).
image

Three-Tier Small Farm
Three-Tier small farm is much more similar to a Two-Tier Small Farm. A dedicated Application Server is added to cater the requirements of the Services. To improve the performance of the Search Service a the Search Database can be moved to a dedicated Database server. This Farm Topology is ideal for a solution with a Search Database containing nearly 10 million items which can be considered as a large Search Database. Though its optional, it’s a good practice to have a Database Cluster or a mirror.
image

Medium Farm
This is a Three-Tier Farm. The general rule in planning is to have 10,000 users for a WFE Server. In the First Tier we can utilize two or more Web Servers. In the Second Tier there are two servers dedicated to crawling contents and serving search queries and one or more servers for all other application services. In the Third Tier there are dedicated servers for Search Databases and one or more servers can be used for all other SharePoint Databases.
image
The middle tier can be expanded to to handle the growth by adding more servers to cater the requirement of application services.
*optional servers are in gray color.

Large Farm
A Large Farm is built on the Server Group concept as it used in the Medium Farm. Additionally a Large Farm could consist of dedicated servers for Sandboxed code.
image

It's always recommended to use the concept of “server groups” to group services with similar performance characteristics together onto a single server and then add servers based on the needs of those particular services.

Friday, November 5, 2010

Visual Studio 2010 and SharePoint 2010 Launch at SLIIT

SLIIT is one of the most popular Universities in Sri Lanka. I was invited to host two technical sessions in the month of August for the launch of VS 2010 and SP 2010.

The first session was on Visual Studio 2010. Covered most of the new and cool features of VS 2010 IDE.

image

My second session was all about my love Smile SharePoint 2010. Actually this was a totally new experience for most of the participants as it was the first time they heard about SharePoint. But feedback I received made me amazed, session was a kick start for many students.

image

image

Read Uditha’s Blog for more pics.

ASP.NET Workshop at Wayamba University

This was a two day session. I was invited as a guest speaker to host a session on ASP.NET. The attendees were very enthusiastic about the session. As it was a Workshop they were managed to work on Visual Studio and to create ASP.NET applications.

Visual Studio is a product which can be used to develop applications without having a clue about basic concepts or core of it. But as a techie, that’s something I strongly refuse to do nor guide anybody. So with the chance I got, I hosted the session giving an introduction on how ASP.NET handles a client requests.

4
5
6
7

Thanks to Mr. Wellington, Microsoft Student Champs and to Wayamba Uni Team.

I was at Tech.Ed 2010 Sri Lanka

Yep I’m way too late to publish this post. But today I found few community sessions I did, which I couldn’t publish in my blog, so its always better to be late than never.

It was in February 2010, Microsoft Sri Lanka organized Tech-Ed 2010 Sri Lanka. The second day, 9th February 2010 was a remarkable day for me. I was invited to host a 1 hour Session on Microsoft Wrokflow Foundation 4.0 by the organizing committee. Though 1 hour is not enough, I gave an introduction to WF and to the new features of WF 4.0.

TechEd

Bruce Schneier, the security guru was one of the guest speakers. I was lucky to sit for a pic with him Smile

IMG_0350

Monday, September 13, 2010

SharePoint 2010 SDK

An updated version of SharePoint 2010 is available for download which is around 334Mb. The Microsoft SharePoint 2010 Software Development Kit (SDK) contains conceptual overviews, programming tasks, code samples, and references to guide you in developing solutions based on SharePoint 2010 products and technologies.

What’s New in this SDK Update

This free update replaces previous 2010 versions of the SDK and includes the following:

    * New code samples:  Silverlight List Viewer, plus new samples in Business Connectivity Services (BCS), Enterprise Content Management (ECM), and User Profiles and Social Data
    * Updated documentation, including: new and updated How To, reference , and conceptual content
    * Updated IntelliSense XML files for tooltips and auto-complete in Visual Studio

Here are two MSDN topics listing new and updated content and code samples in the AUG2010 version of the SDK (14.0.4763.1031):

    * What’s New in the SDK for SharePoint Foundation 2010
    * What’s New in the SDK for SharePoint Server 2010

A complete listing and description of the 44 code samples currently available in the SDK can be found here on MSDN Code Gallery: http://code.msdn.microsoft.com/sp2010sdk.

Have fun with SharePoint :)

Tuesday, May 25, 2010

SharePoint 2010 PowerShell Commands

I was playing with some PowerShell Commends. Suddenly came to my mind, how to get the whole SharePoint 2010 related PowerShell Commands. Simple as given below. smile_wink
Open the PowerShell Window (aka SharePoint 2010 Management Shell), type the command…

Get-Command –PSSnapin “Microsoft.SharePoint.PowerShell” | select name, definition | format-list > C:\SP2010_PowerShell_Commands.txt

image

Have fun with PowerShell.

Thursday, May 13, 2010

SharePoint 2010 for Developers

Today the 13th May, I did another successful presentations with demos on “SharePoint 2010 for Developers” at dotNetForum monthly session. Actually it’s a very special day to all the techies as 12th was the Global Launch of Office 2010 and SharePoint 2010.
Though it was bit warm without the air condition, there were over 100 attendees. In the two hour session I covered 3 main topics.
. What’s new in SharePoint 2010 (for Developers)
. Visual Studio 2010 tools for SharePoint
. Deploying SharePoint 2010 Web Parts.
With the time constraints, I was unable to cover the 4th topic, “Deploying SharePoint 2010 Workflows”.
13th May dotnetforum
My sincerer thanks to all the participants and special thanks to Jinath and Wela.

Business Process Automation with SharePoint and Workflow Foundation

Yeah, I know I’m late on this too. smile_wink On Friday the 7th May 2010 at ANC auditorium I hosted a workshop on “Business Process Automation with SharePoint and Workflow Foundation. Actually it was my 1st workshop (Free of charge) at NetAssist, a nice crowd of over 90 participants were attended.
This workshop targeted both the Business users as well as the technical users. Started with an introduction to SharePoint 2007, followed by InfoPath 2007 forms and Workflow on SharePoint Designer and OOB Workflows. I’m happy as the Q&A session too went very well, many questions came from the business users. Photos after the brake. Thanks everybody who attended.
IMG_0465 IMG_0466 IMG_0468IMG_0469IMG_0471IMG_0472

Wednesday, May 12, 2010

SharePoint 2010 and Office 2010 Global Launch

Are you ready for the BIG DAY? SharePoint 2010 and Office 2010 Global Launch. Watch the keynote done by Stephen Elop, President of the Microsoft Business Division, join the virtual launch conversation, and participate in on-demand sessions where you’ll learn more about how Microsoft products can solve the unique productivity challenges you’re facing as you look to the future.


Keynote is focused on...
  • Deliver maximum productivity across PC, phone, and browser
  • Enhance IT choice and flexibility
  • Leverage a platform for developers to build innovative solutions

Tuesday, May 11, 2010

Microsoft SharePoint 2007 Development – Fun with Lists

List Management

List is more like a Table in a Database. Of all the tasks a SharePoint programmer can do in SharePoint, working with Lists is the mostly common task.
Namespace: Microsoft.SharePoint
Classes: SPList, SPListItem, SPListItemCollection

With MOSS 2007 and WSS, we get different kinds of lists. To name them…
. Announcements list
. Contacts list
. Discussion Board list
. Links list
. Calendar list
. Tasks list
. Project Tasks list
. Issue Tracking list
. Survey list
. Custom list
. Custom list in Datasheet view
. KPI list (SharePoint Server 2007 only)
. Languages and translators (SharePoint Server 2007 only)
. Import spreadsheet
This article doesn’t cover what SharePoint is or its usage. Targeted audience is the programmers who are already familiar with SharePoint who’s looking for a programming introduction to Lists in SharePoint and leverage the features of SPList and SPListCollection classes in SharePoint Object Model.

Enumerating Lists
Yes you see it right, its Lists. Before getting to the list items, let’s try to get a collection of lists implemented in a site. So basically in other words we are trying to enumerate through any SPListCollection instance.
First we need to create a SPSite object and get all webs in to a SPWeb object by calling the AllWebs() method of the SPSite object. Then it’s just a matter of iterating through the SPLists objects available in the SPWeb object.
Create a new C# console application and paste the code below changing the SPSite class’s input parameter url.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;

namespace AllLists
{
class Program
{
static void Main(string[] args)
{
SPSite site = new SPSite("http://dc:8844");
SPWeb web = site.AllWebs[0];
foreach (SPList list in web.Lists)
{
Console.WriteLine("{0}{1} - {2} items.",
list.Hidden ? "*" : "",
list.Title, list.ItemCount);
Console.WriteLine("Created by {0}", list.Author.Name);
Console.WriteLine("{0}", list.Description);
Console.WriteLine("................................");
}
Console.WriteLine("\n{0} lists found.", web.Lists.Count);
Console.ReadKey();
}
}
}
image 

Enumerating list items in Lists

It is the SPList you have to iterate through to find the SPListItem. But you might run in to some errors if you do the list iteration against a top level site collection instead of a team site.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;

namespace AllLists
{
class Program
{
static void Main(string[] args)
{
SPSite site = new SPSite("http://dc:8844/sales/");
SPWeb web = site.AllWebs[0];
foreach (SPList list in web.Lists)
{
Console.WriteLine("{0}{1} - {2} items.",
list.Hidden ? "*" : "",
list.Title, list.ItemCount);
Console.WriteLine("Created by {0}", list.Author.Name);
Console.WriteLine("{0}", list.Description);
Console.WriteLine("------------------------");
foreach (SPListItem item in list.Items)
{
Console.WriteLine("\t * {0}", item.Title);
}
Console.WriteLine("\n");
Console.WriteLine("................................");
}
Console.WriteLine("\n{0} lists found.", web.Lists.Count);
Console.ReadKey();
}
}
}

Make sure you add reference to Microsoft.SharePoint.dll assembly prior writing the code above.

Managing Lists

When working with Lists, the source container is always an object created from SPListCollection. Given code give below, I create two Task Lists, selecting the “Task” template.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;

namespace ManagingLists
{
class Program
{
static void Main(string[] args)
{
SPSite rootSite = new SPSite("http://dc:8844");
SPWeb rootWeb = rootSite.AllWebs[0];

SPListTemplate sourceTemplate = rootWeb.ListTemplates["Tasks"];
Guid newListGuid = rootWeb.Lists.Add("My First Task List",
"My First Task List", sourceTemplate);
Guid secondNewListGuid = rootWeb.Lists.Add("My Second Task List",
"My Second Task List", sourceTemplate);
SPList newList = rootWeb.Lists[newListGuid];
SPList secondNewList = rootWeb.Lists[secondNewListGuid];
secondNewList.Delete();
newList.Description = "My Custom Task List - From Code";
newList.Update();
Console.WriteLine("List creation completed.");
Console.ReadLine();
}
}
}

Browse your SharePoint site, where you could see both the Task Lists you created using code above.

Managing List Items

Managing List Items is same as managing Lists. Okay, let’s add a task item in to task list in code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;

namespace ManagingListItems
{
class Program
{
static void Main(string[] args)
{
SPSite rootSite = new SPSite("http://dc:8844");
SPWeb web = rootSite.AllWebs[0];
SPList taskList = web.Lists["My Task List"];
SPListItem newTask = taskList.Items.Add();
newTask["Title"] = "My Task List Title";
newTask["DueDate"] = SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Now.AddDays(30));
newTask["PercentComplete"] = 0.1;
newTask.Update();

newTask = taskList.Items.Add();
newTask["Title"] = "This Task will be deleted.";
newTask.Delete();
taskList.Update();

Console.WriteLine("Work completed.");
Console.ReadLine();
}
}
}

Summary
The SharePoint object model is so powerful that you have the full control over each and every component SharePoint provides. This article provides you an entry point to accessing and managing SharePoint Lists in code.

Monday, April 12, 2010

Site Collections or Sub-Sites

Currently I’m working on Sri Lanka’s largest SharePoint implementation. According to the structure and the requirements of the project, my plan was to go for Site Collections. Specially the capacity and security. But I always like ideas from my team members which is helpful and knowledgeable in many different ways.
One of my team members Dinusha, came up with this article by Steve Goodyear.

Determining Between SharePoint Site Collections and Sub-Sites.

Sunday, April 11, 2010

SPoint.me

For people who have not heard of SPoint.me, it’s the premier social networking site for people in SharePoint industry. Yes, I know that info is not enough, right? smile_nerd

[Click the image below for a detailed description]
image

Visual Studio 2010 Launch

It’s less than 2 hours for me to step in to 12th of April, but according to the time zone difference there's few more hours for the big day, launch of Visual Studio 2010 at DevConnections.

image

Counting… fingerscrossed

Microsoft SharePoint 2007 Development – Sites and Webs


This article doesn’t cover what SharePoint is or its usage. Targeted audience is the programmers who are already familiar with SharePoint who’s looking for a programming introduction to sites and webs in SharePoint and learn how to interact with sites and site collections with the classes SPSite and SPWeb in SharePoint Object Model.
Simplifying Sites and Webs
At a glance, yes, it’s complicating. Though the Webs and Sites sound similar, in SharePoint these are two different concepts. The site, as far as SharePoint is concerned, is actually a site collection. Each site collection consists of one or more root websites. If you use the object model to create a site collection and you indicate that the template for that site collection should be a Team site, what you have actually done is created a site collection and a root website (SPWeb instance) that was provisioned from the Team Site template. So simply that means you cannot have a site collection that doesn’t have a root website. Two things you should never forget.
•SPSite class is the model for a collection of SPWeb objects.
•To get at the list of site collections on a given web application, you simply reference the Sites property of an instance of the SPWebApplication class.
Working with SPSite Class
SPSite class can be used to create, delete and updating of site collections. For the complete listing of all properties and methods, glance through the online SharePoint Software Development Kit (SDK) found on MSDN (http://msdn2.microsoft.com/en-us/library/aa905858.aspx).
Enough training in the shallow end, let’s get to the deep end. Hit VS 2008 and create a new windows application. Add reference to Microsoft.SharePoint.dll. Add few textboxes, labels and button to the windows form as given below.

image

Switch to the coding window.

image

Then write the below coding in the click event of the button. (TextBoxes have been used as in given in the order).
Let’s have a look at the coding. First I have created a SPSite object called site passing the absolute URL as a parameter. The text on txtSPSite textbox represents the absolute URL.


image 

Next step is to create a SPWebapplication object. Site creation is done by calling the Add() on the SPSiteCollection class instance. 
There are multiple overloads that allow you to supply progressively more information to create the new site collection. Okay, let’s see the parameters I have used in the Add() method. First it’s the siteUrl, next the Title of the site and the Site Description. LCID is the Local Identifier. Default is 1033 for U.S. English. Next comes the Template ID, followed by the owner login, owners name and finally the owners email address.
image

Given above is the windows form filled with sample data according to my SharePoint server.


image

If you can see the above message in your screen, Congratulations! You have successfully created a SharePoint site programmatically using SharePoint Object Model. Open your web browser http://sharepointsvr:4488/sites/TestNewSite/default.aspx [http://sharepointsvr:4488 is my test server] and you can see a screen similar the one given below. For your convenience I’ve provided the default web templates in the table below.

image

Template ID Description
STS#0 Team site
STS#1 Blank site
STS#2 Document workspace
MPS#0 Basic meeting workspace
MPS#1 Blank meeting workspace
MPS#2 Decision meeting workspace
MPS#3 Social meeting workspace
MPS#4 Multipage meeting workspace
WIKI#0 Wiki
BLOG#0 Blog

Updating a site is not easy as creating one. You need to get an instance of the SPWeb class for the root web of the site collection (which was created by default when you created a new site collection).

Working with SPWeb Class
SPWeb class provides most of the functionality of single websites, whereas the SPSite class is designed to deal with site collections.
Let’s add a subweb, a blog as a subweb to the parent site collection we created earlier. To add a new web to the root web of a site collection, you obtain a reference to that site and then call the Add() method on the AllWebs property.
image 

Type the code above in your windows application, make sure to add reference to the Microsoft.SharePoint.dll. Pay attention to the overloads of the Add() method. Hit F5 to test the code. If you see the message box with the message “Web created successfully”, yes you have successfully created a blog web.
image

You can obtain a reference to a SPWeb instance either by obtaining it through an indexer property on a SPWebCollection instance.

image

There are some properties on a website that cannot be changed after the site has been created. Changes made to a SPWeb instance are only saved after calling the Update() method. One last code block to change the title of the blog site we just created.


image
image

Summary
The SharePoint object model is so powerful that you have the full control over each and every component SharePoint provides. But honestly the hard task is to remember the methods and the properties of the classes.
All comments welcome. :)