Friday, January 29, 2010

Developer Dashboard In SharePoint 2010

SharePoint 2010 Developer Dashboard is same as ASP.NET  Tracing. Once we built and deployed SharePoint 2010 solution into SharePoint Server there may be Unexpected issues such as which part of the application is causing a delay to load or consuming more resources etc. To nail down and easy to solve these problem  SharePoint 2010 provides a Dashboard to developers which can be turned on as required. 

what Dashboard provides:

The developer dashboard logs and displays performance statistics related to the code that executed to produce the page. Tracking involves both elapsed time as well as the load placed on the system by queries and tracking of exceptions

image

image

The following screenshots shows Developer Dashboard output which shows the Elapsed time of every operation .image 

Nandri(Thanks)

SreenivasaRagavan.

Wednesday, January 27, 2010

Download VHD for SP2010 and Office 2010

 

This download contains a two Virtual Machine set for evaluating and demonstrating Office 2010 and SharePoint 2010

image

http://www.microsoft.com/downloads/details.aspx?FamilyID=0c51819b-3d40-435c-a103-a5481fe0a0d2&displaylang=en

image

Nandri(Thanks)

SreenivasaRagavan.

Sunday, January 24, 2010

Hosting Sliverlight Application inside SharePoint 2010

In this blog i am going to show you how to host  Sliverlight 3.0 application inside the SharePoint 2010.  With VS.NET 2010 this is very simple to do. Even we can host our existing Silverlight application in SharePoint 2010.

Steps :

1) Create Sliverlight application.

2) Create SharePoint application and reference the  .XAP output of the Sliverlight app.

3) Deploy to SharePoint.

4) Add Silverlight Web part to SharePoint Page and Load our Sliverlight application.

Step 1:

First I am going to create a new simple Silverlight application  using VS.NET 2010.

image

We are going to host the above Silverlight application inside SharePoint, so we do not need a another web project to host the Silverlight application. Now you can uncheck the checkbox and click OK.

image

Since i do not need Silverlight Hosting Application i Unchecked it and selected Silverlight version as 3.0

image

Once project is ready now time to add some UI to it . Now open MainPage.xaml in silverlight application and add some XAML code.  Here i just added one <TextBlock> ,<Button> inside <StackPanel> to keep it simple.

image

 

Second Now we need to add NEW SharePoint Project to this Solution. 

NOTE: First check Visual Studio running as the Administrator mode,  if  not save the solution close the VS.NET 2010 and fire up again in Admin mode. otherwise VS.NET 2010 tells you that the project requires elevated permissions in order to run.

image

Step 2:

Adding New Empty SharePoint Project.

image 

Sandboxed:

Sandboxed solution is new feature in SharePoint 2010. we get some advantage when deploying SharePoint Project in  Sandboxed solution.

1)  Debugging the SharePoint application is very easy because  Application pool wont recycled. 

2) Very Secure and monitored .    etc..

image

We need to add our siliverlight application output XAP file to SharePoint 2010 project . To do first we need to add Module template to our SharePoint Project as shown below.

aimage

Since there is no way to add Sliverlight application as reference to our SharePoint project using Add Reference option. we are going to use different approach  as shown below.

Now right click on the newly added Module template and select Properties. In the Properties window click in the Project Output References and then click the ellipse button (…). In the Project Output References dialog click the Add button. Expand (+) the deployment location property on the new reference then change the Project Name to the Silverlight project name ( SilverlightApplicationToHostInSharePoint2010)  and the Deployment Type to ElementFile.

image

 

image

Step 3:

Now our  application is ready to be deployed. since we selected as sandboxed  deployment its very easy to debug the app so right click the SharePoint project and select Set as Startup Project and hit F5. Visual Studio will build and deploy your project to your local SharePoint site and then open it in the browser.

Now We need to add Our sliverlight app to add any one of the our site pages.

Step 4:

image

image

image

image

for better look we need to edit Sliverlight Web part as shown below. set Pixels size as 400 and Chrome type to None.

image

 

image

Nandri(Thanks)

SreenivasaRagavan

Wednesday, January 20, 2010

Business Connectivity Service (BCS) using SharePoint Designer 2010

Using SharePoint Designer 2010 is easy way to create BCS connection because this method required no code at all. In this blog post i am going to connect MS- SQL DB and bring data into SharePoint. To do this first we need to create External Content Type (ECT). So let us Fire up SPD 2010.

1) Open a site ( You want to work with) in SharePoint Designer 2010. and wait for site to load.

image

Now Select External Content Types in left pane and click Top Menu  External Content Type to create .

image

Now Name the ECT &  Click to Discover External data sources and Define Operations as shown below .

image

Now Click on Add Connection and select the Data Source Type Selection from Given Drown down List.

image

image

Edit SQL Server Connection Details .

image

Once connection is Successfully established to external Data source you will able to see the Tables in Data Source Explorer as shown below.

image

Now right click on the table and select the operation which you wanted to generate  and follow the wizard .

image

image

image

image

image

Now save the work. This time SPD will write ECT to DBC Metadata store DB.

image

Now Create Profile page.

Profile page for an instance of a Business Data Connectivity service application site are stored in a site in the farm that hosts the Business Data Connectivity service. You can specify the site where profile pages are hosted.

image

Now we need to create External list . go to the site you ware working on.

image

Now Select ECT Type from the list. here we are going to pick ASSET DETAILS.

image

Name the External List and select ECT for this list and Click Create .

image

Once the above step is completed you will see the  SP List populated with our External SQL DB Tables Records as shown below. 

image

Now you are able to add , View the records with in SharePoint environment.  basically you can do all  (CRUD = Create, Read, Update, Delete) straight from the SharePoint 2010 list.

image

image

Nandri(Thanks)

SreenivasaRagavan.

Tuesday, January 19, 2010

Business Connectivity Service (BCS) using WCF in SharePoint 2010

In this blog i am going  to show how to bring external Data into SharePoint via BCS using WCF. Here i am considering my MS-SQL DB as external Data source. so  first we need to Host the WCF service with CURD Operations Contracts which will perform on MS-SQL DB Tables.

 Creating a WCF Service and Hosting it

image

Here i am going to use  EF (Entity Framework) to model my Data source  from DB.  so now we need to add ADO.NET Entity Data Model Template to our WCF Project.

image

Now we are going to select  Generate from Database option and click next.image

Now Select the Tables you wanted to Include in the Entity Data Model.

image

Now Define the WCF Service & Operation Contracts and Implement the Operations Contracts. My Asset Table have lot of columns so i have created Data contract with only selected columns and named as AssetInfo.

image image

The below screenshot shows the  IAsset Contract Implementation.

image

image

Creating External Content Type

Once you get here you have successfully  created WCF Service. Now we are going to use SharePoint Designer 2010 to Create External Content Type. BCS its all about creating External content type.

Now Fire up SharePoint 2010 Designer and open your site.  once that is loaded now click on External content Types and create it.

image

Now we need edit settings for External content Type .

image

Now click on   Click Here to Discover External Data sources and define Operations( See above screenshot bottom).

image

Now Click Add Connection button, you will asked to select External Data source type selection . here in our case we are going to select  WCF Service.

image 

Now Edit WCF Connection Settings.

image

image

Once you successfully Connected to WCF Service you can see WCF Service Operation contracts in Data Source Explorer.

Now one by one, you will generate the method for CRUD (Create, Retrieve, Delete) and Retrieve List. Now  Right click “GetAllAssets” Operations and select “New Read List Operation”, a wizard will open up as shown below..

image

image

image

 

image

Now Save the work. Now this changes are saved into BDC Metadata Database.

image

Now time to create profile page this can be done within SharePoint designer or you can go to CA you can do it there. since we are already is SharePoint Designer environment i am going to create it from here just clicking  Create Profile page.

image

Profile Page:

Profile pages for an instance of a Business Data Connectivity service application site are stored in a site in the farm that hosts the Business Data Connectivity service. You can specify the site where profile pages are hosted.

image

Creating External List

Now go to SharePoint site and create External List .

image

image

Select the ECT Picker   ECT-External Content Type.

image

Here shows our External Data with in SharePoint as List. now you can Create, view an item etc..

image

Viewing an Item.

image

Adding new item.

image

Now with SharePoint 2010 we can  connect to our existing  Web Service(.ASMX) /WCF Service and display, edit,create and delete the data inside the SharePoint with gives unified User Interface experience  . Next blog post we will see how to connect External data source using SharePoint Designer 2010 with No CODE I promise.

Nandri(Thanks)

SreenivasaRagavan