6/27/2011

Sharepoint 2010 Client Object Model

1. Why do we need Client Object Model ? /  Why Client Object Model evolved ?
    
        Microsoft was constantly getting request from customers for more webservices. to make it easier to get data from outside of sharepoint (for example : to show sharepoint data on your desktop, by consuming a webservices), So there are two options: 1) Request microsoft to produce more web serivices or 2) Create your own custom web services, Instead creating more and more web services over and over agin in each release,  Microsoft  came up with a different approach , they created someting called 'Client Object Model'.
 
2.Client Object Model comes in three flavours:

a. .NET web services
b. ECMAScript(javascript)
c. Silverlight

      

3.Where SP Client Object Model can be used to get data :

 a.Site Collections and Sites
 b.Lists,List Items,Views, and List Schemas
 c.Files and Folders
 d.Web,List, and List Item Propert bags
 e.Web parts
 f. Security
 g.Content Types
 h.Site Templates and Site Collection Operation


SharePoint 2010 allows using its Object model to run against a server running SharePoint. For clients (not running SharePoint in the box), the simplest way to communicate with SharePoint server is web services. SharePoint Client Object Model (OM) can be run on client PC (where SharePoint is not installed) to communicate with SharePoint server. So whereas SharePoint (Server) Object Model runs in a SharePoint server and can manipulate SharePoint objects, client OM can run in client PC and communicate with SharePoint server remotely.



Video : http://msdn.microsoft.com/en-us/SP2010DevTrainingCourse_OverviewoftheClientObjectModel 

6/23/2011

Sharepoint 2010 Workflows

1.What is a WorkFlow?
  •   Workflow is a series of action that corresponds to a work process, such as creating remedy request, making purchase orders.
  •   Sharepoint 2010 helps to automate these workflows , thereby increasing the productivity and efficiency of the organization.
2.What are the type of workflows that can be designed in SP 2010?
  •  List workflows
  •  Reusable List workflows
  •  Site Workflows
3.What are Reusable List workflows and Site Workflow?

   Resuable Workflows: We can create reusable list workflow in the top-level site in  the site collection and that workflow can be made globally reusable - meaning the workflow can be associated to any list, library or content type in the site collection. We can create reusable workflow in any subsite in the site collection and this workflow will be available for reuse in that particular subsite.

Site Workflow: Site workflow is associated to a site - not to a list/library/content type

4.What is a Three State workflow:

    read : http://www.dotnetfunda.com/interview/exclusive/x1078-what-is-a-threestate-workflow-in-sharepoint-.aspx





6/15/2011

Yotube Rss feeds

You tube offers its RSS feeds for your webiste/blog : http://googlesystem.blogspot.com/2008/01/youtube-feeds.html

How to embed youtube video to you site:

<iframe width="200" height="150" src="http://www.youtube.com/embed/filename" frameborder="0" allowfullscreen></iframe>

6/13/2011

Sharepoint 2010 recycle bin

Recycle bin allows users to restore the objects that are deleted.Microsoft sharpoint server 2010 supports two stages of recycle bin:
a.The first stage recycle bin 
b.Site collection - the second stage .

When recycle bins are enabled then users can restore items,documents etc.


When a user does this The item is The item can be restored by
Deletes an itemHeld in the first-stage Recycle Bin until the item is deleted from the Recycle Bin or the item has been in the Recycle Bin longer than the time limit configured for an item to be held in the Recycle Bin.Users or site collection administrators
Deletes an item from the Recycle   BinHeld in the second-stage Recycle BinSite collection administrators



First Stage Recycle bin: The first stage recycle bin is located at site level and it is available to users who have Contribute, Design or Full Control permission on a site.When a user deletes an item from a Web site, the item is sent to the site's first-stage Recycle Bin. Items located in the first-stage Recycle Bin count toward the site quota.Items remain in one of the first-stage Recycle Bins in the site until a specified time period has been reached (the default setting is 30 days).

Second Stage Recycle Bin: The second stage site collection is located at site collection administrator level.
Items remain in the second-stage Recycle Bin until a specified time period has been reached (the default setting is 30 days) or until the second-stage Recycle Bin reaches its size limit, at which time the oldest items are deleted. The time limit for the Recycle Bins applies to the total time after the item was initially deleted — not the time spent in either Recycle Bin stage.                                           
                                                                                                                                                  read more

6/08/2011

Tabel-less Web desing

coming soon.......

Table-less Web desing

The power of  css float.... (CLICK ON THE IMAGE FOR FULL VIEW)

1) position:static - divs lying one below other


2) position:absolute - positioned from co-ordinates of the browser

3)position:relative; postioned to its adjacent divs.

1) without 'float':

2) with float: there you get it !!!


CSS positioning

6/07/2011

SharePoint Farm

Sharepoint Farm can be defined as collection of one or more Sharepoint server and SQL servers.

but when do we need  a farm? . Small orgnization with limited people, and independent of location doesn't need a farm , they can use Single server system.

SharePoint 2010 developer dashboard

The developer dashboard is an instrumentation framework.Developer Dahsboard contains an extensible mechanism for measuring various performance counters at various scopes.

The developer dashboard records and displays the performance statistics of the code that executed to produce the current page .

Developer Dashboard contains an extensible mechanism for measuring various performance counters at various scopes. Within Developer Dashboard, the following performance counters are used to monitor usage and resource consumption at each stage of the requests.

Per-threaded Counters:
These counters measure values for the current request or timer job:
  • Thread execution time
  • Number, duration, call stack information and query text of each SQL Server query generated by the page
  • Number, duration, and call stack information of each WCF call
  • URL or timer job name
  • Current user
  • Execution start time
The Developer Dashboard can be displayed in the following modes:
  • On
    When enabled in On mode, the Dashboard is viewable on all pages that use the default master page.
  • OnDemand
    When the Developer Dashboard is set to OnDemand mode, an icon is displayed on the top right side of the page. This icon allows the user to toggle the Dashboard on and off.
Run this command in powershell:

PS C:\Users\Administrator > stsadm -o setproperty -pn developer-dashboard -pv on

                                                                                                        read more

6/03/2011

Step by Step WCF example

Step by step procedure to create WCF:

A.Creating the service (Server side)

Step 1: Open Visual Studio 2010 and create project ,choose  "Windows Service  Application", and give a name to your project say MyService.

Step 2: Open IService.cs  , in that you can see [ServiceContract] where your intetface name is declared and [OperationContract] here you function contract should be defined here (note: delete the default functions if they are not needed), initialize you addData function here




Step 3: Open Service1.svc.cs and add the code for the addData function, ( note: delete the default functions if they are not needed)

                                  

Step 4: Declare your endpoint in web.config file add the below code which is in  bold and Italics.
                                 
                                   

Step 5:Save the project and run it

                                       
B. Creating the client to consume the service (Client side):

Step 1: Open another Visual studio 2010 , create a new ASP.net web application.right click the project and go to 'Add Service reference' ,copy and paste the service  url and press OK

Step 2: Open Default.aspx , create a simple button and lable controls

Step 3: Double click the button and add this following code

                                         

Ste 4: Build and run the project ,now your client has comsumed the services!!

                                          

read more

msdn :http://msdn.microsoft.com/en-us/library/ms734712.aspx 

6/01/2011

Creating event receivers for sharepoint list

In sharepoint 2010 the following new event receivers have been added:

What are Sharepoint 2010 Event receivers?
  Event receivers are one of the power feature of sharepoint , the event receiver is in essence a managed-code assembly that is deployed to sharepoint and react to an event such as adding an item to the list,creating new list item..etc

For example , you might also want to log a transaction when a certain lists are updated, prevent the default error page and redirect to your own custom error page.



List Events:
List is being added, deleted

List Item Events:
List received a context event

Workflow:
Workflow in starting ,has started, completed,postended

List Email:
List received an email message

Web:
Site is being provisioned
Site was provisioned

Sharepoint service database tables