Sunday, November 22, 2009

Hardware and Software requirements for SharePoint Server 2010

Hardware and Software requirements for SharePoint Server 2010

Harware Requirements
Processor
--> 64-bit, dual processor, 3 GHz
RAM --> 4 GB for stand-alone or evaluation installation (or) 8 GB for single server and multiple server farm installation for production use
Hard disk --> 80 GB


Software Requirements

Database server in a farm: The 64-bit edition of Microsoft SQL Server 2005 with Service Pack 3 (SP3), or the 64-bit edition of Microsoft SQL Server 2008 with Service Pack 1 (SP1)

Stand-alone server
1) The 64-bit edition of Windows Server 2008 Standard with SP2
2) Web Server (IIS) role
3) Application Server role
4) Microsoft .NET Framework version 3.5 SP1
5) SQL Server 2008 Express with SP1
6) Microsoft "Geneva" Framework
7) Microsoft Sync Framework Runtime v1.0 (x64)
8) Microsoft Filter Pack 2.0
9) Microsoft Chart Controls for the Microsoft .NET Framework 3.5
10) Windows PowerShell 2.0 CTP3
11) SQL Server 2008 Native Client
12) Microsoft SQL Server 2008 Analysis Services ADOMD.NET
13) ADO.NET Data Services v1.5 CTP2


Front-end Web servers and application servers in a farm
1) The 64-bit edition of Windows Server 2008 Standard with SP2
2) Web Server (IIS) role
3) Application Server role
4) Microsoft .NET Framework version 3.5 SP1
5) Microsoft "Geneva" Framework
6) Microsoft Sync Framework Runtime v1.0 (x64)
7) Microsoft Filter Pack 2.0
8) Microsoft Chart Controls for the Microsoft .NET Framework 3.5
9) Windows PowerShell 2.0 CTP3
10) SQL Server 2008 Native Client
11) Microsoft SQL Server 2008 Analysis Services ADOMD.NET
12) ADO.NET Data Services v1.5 CTP2


Client computer
1) Microsoft Silverlight 3.0
2) A supported browser

Saturday, November 21, 2009

Advantage of 64-bit OS for SharePoint Server 2010

Advantage of 64-bit OS for SharePoint Server 2010

The main reason for building SharePoint Server 2010 on 64-bit OS is
(remember optimum benefit is derived only when 64-bit hardware and software are working together)

1. A server that has both a 64-bit CPU and a 64-bit data bus is better able to process and manage the large database files associated with Office SharePoint Server 2007. Among other benefits, a 64-bit CPU can calculate individual tasks two times as fast as a 32-bit model and can address significantly more random access memory (RAM) than the 4-gigabyte (GB) limit imposed by 32-bit processors. The prevalence of 32-bit servers puts some limitations on the speed, reliability, and scalability of applications that require a lot of resources, such as Office SharePoint Server 2007.
2) A 32-bit system architecture can directly address only a 4-GB address space whereas a 64-bit system architecture that is running a 64-bit edition of Windows Server can support up to 1,024 GB of both physical and addressable memory.
3) The 64-bit editions of Windows Server can address 16 terabytes of virtual memory by using a flat addressing model.
4) A 64-bit system offers practically unlimited address space for user mode processes.
5) Improvements in parallel processing and bus architectures enable 64-bit environments to support as many as 64 processors and provide almost linear scalability with each additional processor.
6) Function calls are also faster in a 64-bit environment because as many as four arguments at a time can be passed in registers to a function.
7) It is less likely that the buffer will overflow
8) Fewer lost connections, improved I/O handling

Thursday, November 19, 2009

Access STSADM.EXE From any Directory in a Command Prompt

Access STSADM.EXE From any Directory in a Command Prompt

STSADM.EXE the main administration utility for SharePoint, is a command line utility. You'll find it in c:\program files\common files\microsoft shared\web server extensions\12\bin . To run it, you have to actually be in that directory... but its itching to go to that path and then executing the command Instead, add the directory to the PATH environment variable so you can type STSADM.EXE from any directory on your system. To do this:

Start -> All Programs -> Control Panel -> System
On the Advanced tab, click the Environment Variables button.
Select the variable Path and click the Edit button.

Add the following to the end of the Variable value field (don't forget the semicolon... the Path environment variable is a semicolon delimited string of directories):;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
OK out of all the dialogs.
Next time your system restarts, you'll be able to type STSADM.EXE at a command prompt from any directory on your system.

Tuesday, November 17, 2009

Adding navigation hierarchial nodes to BreadBrumb

Showing links to Sub Folders of Document Library in BreadCrumb

While navigating to folders within Document library, have you ever noticed the name of the folder in BreadCrumb........
By default you will not be seeing folders of a document library in BreadCrumb, you will be able to see only till the name of the Document Library
Unless you customize the BreadCrumb,
so How to customize it?
Follow the below steps to display the Sub Folders of a Document Library in BreadCrumb
1. Open SharePoint Desigenr 2007
2. Open that web site where you want to customize the BreadCrumb
3. Go to that document library. Inside you can see a folder with the name of "Forms".
4. Double click to open it.
5. Double click on "AllItems.aspx" file.
6. Within that source, you can see the below code. sometime, the below code will not be available. If the code is not available, add the below code in between any of the 2 Content blocks.


Content1" ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server">



7. Change the SiteMapProvider value as "SPContentMapProvider" instead of "CurrentNavSiteMapProviderNoEncode"
See the Sample Code below:
Content1" ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server">


Navigate to a sub folder in the document library where we modified the code
And you are done..... :)

Monday, November 16, 2009

Creating a Custom HttpHandler in Windows SharePoint Services 3.0

Creating a Custom HttpHandler in Windows SharePoint Services 3.0

ASP.NET programming supports the creation of custom HttpHandler components, which provide a flexible and efficient way to process requests that don't return standard HTML-based pages. For example, HttpHandler components are great for situations in which you want to return simple text, XML, or binary data to the user.


The easiest way to create a custom HttpHandler component is to create a source file with an .ashx extension. You must then add a @WebHandler directive to the top of the .ashx file, along with a class definition that implements the IHttpHandler interface. Any class that implements the IHttpHandler interface must provide an implementation of the IsReusable method and the ProcessRequest method. If you want to be able to program against the Windows SharePoint Services object model from inside the HttpHandler component, you can also add an @Assembly directive to reference the Microsoft.SharePoint assembly.

<%@ Assembly Name="Microsoft.SharePoint, [full assembly name]" %>
<%@ WebHandler Language="C#" Class="HelloHttpHandler" %>
using System;
using System.Web;
using Microsoft.SharePoint;
public class HelloHttpHandler : IHttpHandler {
public bool IsReusable {
get { return false; }
}
public void ProcessRequest(HttpContext context) {
SPSite siteColl = SPContext.Current.Site;
SPWeb site = SPContext.Current.Web;
context.Response.ContentType = "text/plain"
context.Response.Write("Hello HttpHandler from the site " +
site.Title +
" at " +
site.Url);
}
}


After you create an .ashx file that defines an HttpHandler component, you must deploy it within the \LAYOUTS directory as you would deploy a custom application page. A best practice is not to deploy any files directly inside the \LAYOUTS directory but instead to create a project-specific or company-specific directory and then to deploy files inside this inner directory. That way you don't run the risk of file name conflicts as you deploy a custom solution.
After you deploy your .ashx file within a directory nested within the \LAYOUTS directory, it is accessible to any site in the farm by using a site-relative path.


http://MyWebServer/sites/Sales/_layouts/Litware/HelloHttpHandler.ashx

As with a standard application page, the HttpHandler component can gain an entry point into the Windows SharePoint Services object model to the current SPSite and SPWeb objects by using SPContext.Current.Site and SPContext.Current.Web.
You can write content back to the caller by using one or more calls to context.Response.Write or context.Response.BinaryWrite. You can also write data directly to the ASP.NET output stream by using various classes available in the System.IO namespace.
Finally, note that you are often required to programmatically assign a value to the ContentType property of the ASP.NET Response object. This example demonstrated using a ContentType value of "text/plain" to indicate that simple text is returned. You use a value of "text/xml" if your handler creates and passes back an XML document. There are also other values that you can use to indicate other types of files, such as Microsoft Word documents, PDF files, and media files such as audio clips and movies.

Sunday, November 15, 2009

Floating (Movable) Web Part Task Pane

Floating (Movable) Web Part Task Pane

The following script will allow you to attach javascript dragging events to any element on the page, using only it's "ID" field. The only trouble that I had implementing this into SharePoint is that you have to circumvent the out-of-the-box tag. This is easy enough with a little change to your master page.

1. Download "
dom-drag.js" from the website mentioned above
2. Upload this script somewhere on your server
3. Open your master page in SharePoint Designer 2007
4. Find the line in your master page that begins with

5. Replace this line with the following code:

6. In the section of your master page, add the following code:




7. Add this code to your default CSS file:


/* float web part panel */ .ms-ToolPaneOuter { position: absolute; height: 80% !important; border: 2px #6f9dd9 solid; top: 0; left: 0; } td#MSOTlPn_MainTD { width: 0 !important; } td#MSOTlPn_ToolPaneCaption { cursor: move; }

Notice that we moved the "_spBodyOnLoadWrapper();" event into our custom onload event. This allows us to call the event as normal, but also to add our own custom onload javascript. The CSS basically hides the right-hand column and then "floats" the task pane by giving it an absolute position within the page. You can adjust the "top" and "left" values to make the task pane appear anywhere within the window.


Saturday, November 14, 2009

Redirecting Web Sites in IIS 6.0 (IIS 6.0)

Redirecting Web Sites in IIS 6.0 (IIS 6.0)

When a browser requests a page or program on your Web site, the Web server locates the page identified by the URL and returns it to the browser. When you move a page on your Web site, you can't always correct all of the links that refer to the old URL of the page. To make sure that browsers can find the page at the new URL, you can instruct the Web server to redirect the browser to the new URL.

You can redirect requests for files in one directory to a different directory, to a different Web site, or to another file in a different directory. When the browser requests the file at the original URL, the Web server instructs the browser to request the page by using the new URL.


Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".
Procedures
To redirect requests to another Web site or directory
1.In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
2.Click the Home Directory, Virtual Directory, or Directory tab.
3.Under The content for this source should come from, click A redirection to a URL.
4.In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.


To redirect all requests to a single file
1.In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
2.Click the Home Directory, Virtual Directory, or Directory tab.
3.Under The content for this source should come from, click A redirection to a URL.
4.In the Redirect to box, type the URL of the destination file.
5.Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.
You can use wildcards and redirect variables in the destination URL to precisely control how the original URL is translated into the destination URL.
You can also use the redirect method to redirect all requests for files in a particular directory to a program. Generally, you should pass any parameters from the original URL to the program, which you can do by using redirect variables.

To redirect requests to a program
1.In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
2.Click the Home Directory, Virtual Directory, or Directory tab.

3.Under The content for this source should come from, click A redirection to a URL.
In the Redirect to box, type the URL of the program, including any redirect variables needed to pass parameters to the program. For example, to redirect all requests for scripts in a Scripts directory to a logging program that records the requested URL and any parameters passed with the URL, type /Scripts/Logger.exe?URL=$V+PARAMS=$P. $V and $P are redirect variables.

4.Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.


Source: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true

Friday, November 13, 2009

Copying dll's from GAC (Global Assembly Cache)

Stealing assemblies (dll's) from Global Assembly Cache GAC


have you ever tried copying dll's from GAC


there is a way how you can  do it

go to start --> click "Run" then type "c:\WINDOWS\assembly\gac_MSIL" and type OK


now from the folders you can copy which ever the dll you want.

Thursday, November 12, 2009

MOSS 2007 pages and Query String Parameters

MOSS 2007 pages and Query String Parameters


Most of the time it might require for us to edit the SharePoint pages using browser.
Incase if the pages is created using a specific layout or other ways we can use "Edit Page" option from "Site Action" menu.
But what if we need to edit application pages like DispForm.aspx, AllItems.aspx...etc. Can you use "Edit Page" option from "Site Action" Menu the answer is unfortunately no :(.
Then how to edit the page...


Dont worry there are always ways to acheive the solution for problems,


use Query string variable to solve the problem:


append the page with the query string parameters
http://...../dispForm.aspx?ToolPaneView=2&PageView=Shared


below are some of the other options


Content=1  ---- Displays the page WebPart Maintenance View Mode

Mode=View/Edit (View or Edit)

DisplayMode=Design

ControlMode=Edit

ToopPaneView=1/2/3 (1 or 2 or 3)

PageView=Shared/Personal (Shared or Personal)

and many more....
try using permutations and combinations of these you will see the magic...

Wednesday, November 11, 2009

MOSS 2007 Alternate Access Mapping

Alternate Access Mapping


Alternate Access Mapping enables you to access your Sharepoint site via a typical url like http://mysharepoint.com instead of hitting the server name at http://mysharepointserver. In combination with DNS A host entries you can also define urls like http://mysite.mysharepoint.com even though your My Site web application is hosted on a different port.


1. Go to Central Administration for your WSS or MOSS instance.


2. Click on the Operations Tab


3. Click on Alternate Access Mappings under Global Configuration


4. You should now see a list of your web applications, switch over to the one you want to map to the new URL by selecting it from the drop down on the right side.


5. Click on Edit Public URLs and change the desired zone URL type to your new domain name. You can also change your internal URLs also by clicking Add Internal URLs.


6. Now you’ll have to switch over to your DNS server.


Within the DNS Management Console and Under Forward Lookup Zones:


7. Add a new Primary Zone with your new domain name.


8. Add a new Host (A) to the records and point the IP Address to the sharepoint server.


And that should be it! Now you can have friendly URLs pointing to whatever Sharepoint Site Collection/Web Application you’d like without exposing the server names or ports.

Tuesday, November 10, 2009

MOSS 2007 Checking In and Checking out multiple documents

MOSS 2007 Checking In and Checking out multiple documents



Below are the steps to check out / check in multiple documents in MOSS 2007

1. Make sure you have appropriate privileges
2. Select "Manage Content and Structure" under Site Actions menu.
3. You will be diplayed with all the site hierarchy to the left of the page
4. Navigate to the site and click on the document library where you want to check out / in multiple documents
5. You will be displayed with the documents with check boxes beside them.
6. Select all the documents you want to check in or check out.
7. Now click on Actions menu displayed on the top and select the action of your choice


and you are done :)

Monday, November 9, 2009

Programming SharePoint 2007 Web Services

Programming SharePoint 2007 Web Services

In the below example we will see how to get list items from a SharePoint list using SharePoint built in web services.
1. Open Visual Studio 2005
2. Create a new web application/web site of your choice, give the name MossWebServiceExample.
3. Add Web reference - either you can choose web services from local machine or by specifying the url http://servername:portnumber/_vti_bin/Lists.asmx - give the name ListService to the added web reference
4. Wihtin the page class file add a reference to the added web service
using MossWebServiceExample.ListService;

use the below code and you are done

ListService.Lists listService = new Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");

ndViewFields.InnerXml ="";
ndQuery.InnerXml = "Specify text;

try
{
XmlNode ndListItems =
listService.GetListItems("", null, ndQuery, ndViewFields, "", null, null);
Page.Response.Write(ndListItems.InnerXml);
}

catch (System.Web.Services.Protocols.SoapException ex)
{
Page.Response.Write("Message:\n" + ex.Message + "\nDetail:\n" + ex.Detail.InnerText + "\nStackTrace:\n" + ex.StackTrace);
}

Sunday, November 8, 2009

Page Processing in SharePoint Server 2007 and MCMS

Page Processing


Page processing in Office SharePoint Server 2007 is more integrated with the ASP.NET 2.0 core elements, and is no longer an extension on top of IIS. SharePoint Server also takes advantage of the tighter integration to Windows SharePoint Services 3.0.

As a result, in SharePoint Server, page processing follows these steps:
1. The browser requests a Web page from IIS.
2. IIS passes the request to ASP.NET 2.0
3. ASP.NET 2.0 retrieves the page via a Windows SharePoint Services 3.0 file provider.
4. The stream for Page Layout associated with the current page is loaded
5. The stream for the master page is loaded.
6. Page Layout runs each control on the page in the context of the page that was requested.
7. IIS returns the page to the browser.

Due to the change of technologies, page processing differs between MCMS 2007 and Office SharePoint Server 2007.
In MCMS 2002, page processing follows these steps:
1. The browser requests a Web page from IIS.
2. The MCMS ISAPI filter determines that the request is an MCMS page (posting) or resource.
3. The filter rewrites the request with help from the MCMS Content Server.
4. The filter passes the updated request back to IIS.
5. The ASP.NET ISAPI extension determines that the request is for an ASP.NET–based file.
6. The extension passes the request to the ASP.NET worker process.
7. The worker process communicates with the MCMS Content Server to assemble all the information for the page.
8. The ASP.NET worker process returns the assembled page to IIS.
9. IIS returns the page to the browser.

Saturday, November 7, 2009

Resuable content in Mocrosoft Office Share Point Server 2007

Resuable content in Mocrosoft Office Share Point Server 2007


SharePoint Publishing controls are rich in presenting the information with a rich UI experience. Though these controls like RichHTML provides options to format you text using HTML styles, it will be more helpful if you can have a predefined layout sort or content to place in it with ease,
but they are variable height and require several background images so we are talking about inserting a bit of “complex” html. How can we provide a user friendly interface with as little customisation as possible?


Let us see how we can acheive this using Resuable Lists that comes with MOSS 2007. Remember this comes only with Publishing sites and not for all types of sites.


The styling of the box, including the background images is done via CSS. The header and footer are fixed height, whereas the content area is variable height and has a background image that repeats in the vertical direction.


when you create a site collection using the Publishing Site Site Definition, you should have a list called "Reusable Content" in your root web. You can navigate to it using Site Content and Structure. We will create an item in this list that will be a “template” for our box.


Create a new item by selecting "Reuable HTML" Content Type from the list as shown below:



While creating the new  item do not forget to deselect the check box "Automatic Update", otherwise you will not be able to edit the template content while editing from the target control.





If you want to customize the content after selecting the template click on button edit HTML Source Customize the template to fit your requirement. Click OK will create a new Reusable list item that can be placed withing your RichHTML SharePoint Publishing control.


Now select the template as shown below:







and you are done customize the content by placing the curson at the content area.



Thursday, November 5, 2009

Business Connectivity Services (BCS)

Business Connectivity Services (BCS)


Microsoft Business Connectivity Services (BCS) (formerly named the Business Data Catalog) provides read/write access to external data from line-of-business (LOB) systems, Web services, databases, and other external systems within Microsoft SharePoint 2010 and Microsoft Office 2010 applications. Both SharePoint 2010 and Office 2010 applications have product features that can use external data directly, both online and offline. Developers can gain access to a rich set of features and rapidly build solutions using familiar tools such as Microsoft Visual Studio 2010 and Microsoft SharePoint Designer 2010.


Business Connectivity Services enhances Office application and SharePoint application capabilities and their user interface (UI) through features, services, and tools. These enhanced capabilities and UI streamline development of solutions with deep integration of external data and services. Experienced users, developers, and business unit IT professionals can integrate assets from external systems and enable interaction with the external data through many types of Office client and server applications. The Business Connectivity Services feature set enables rapid development and deployment of scalable and security-rich solutions. The following diagram shows a high-level view of Business Connectivity Services.






 The following are some of the new features of Business Connectivity Services.


Write-Back to External Systems
Using Business Connectivity Services, you can Create, Read, Update, Delete, and Query (CRUDQ) to the external system from a Microsoft Office application or SharePoint site if the external system supports the operations and is modeled appropriately in the Business Data Connectivity (BDC) service


Familiar SharePoint and Office UI on External Data
External content types provide SharePoint behaviors (such as lists, Web Parts, and profile pages) and Office Type behaviors (such as Microsoft Outlook Contacts, Tasks, and Calendars, Microsoft Word documents, and Microsoft SharePoint Workspace 2010 lists), and capabilities (such as searching and working offline) to external data and services. As a result, users can work in their familiar work environments without needing to learn different (and often proprietary) user interfaces. 

Offline Access to External Data
Business Connectivity Services provides rich cache and offline work features, and supports cache-based operations. Users working with solutions that are deployed on Microsoft Office 2010 applications, such as Microsoft Outlook 2010 and Microsoft SharePoint Workspace 2010, can manipulate external data efficiently, even when they are working offline or if the server connectivity is slow, intermittent, or unavailable. The read/write operations performed against cached external entities are synchronized when connection to the server becomes available. It also provides a flexible external data caching mechanism that is as transparent as possible while still enabling the user or application to have explicit control over the content of the cache when required via automatic and manual cleanup.


More Connectivity Options
The core function of BDC is to provide connectivity support to the following types of external systems:  
  • Databases 
  • Web/WCF services 
  • Microsoft .NET Framework connectivity assemblies 
  • Custom data sources Extensible Provider Model
    In addition to connectors for the previous list of data sources provided by BDC, BDC provides a pluggable framework with which developers can plug in connectors for new external system types, thus enabling these new data source types to be accessed via the BDC.


    Batch and Bulk Operation Support
    In Microsoft Office SharePoint Server 2007, BDC supported only single item operations, such as search. BDC now provides batch and bulk operation support which enable you to read multiple items in a single call thus reducing round trips to the backend dramatically.

    Symmetrical Server and Client Runtimes
    In Microsoft SharePoint Server 2007, BDC was provided only in the Microsoft Office SharePoint Server 2007 Enterprise CAL. In Microsoft Office 2010 and SharePoint 2010, BDC is included in both client and server to provide symmetrical client/server scenarios. The preceding diagram shows the presence of BDC in both SharePoint Server and in the Office client applications. The primary reason for the client-side presence is to enable external data integration scenarios on Office client applications such as Microsoft Outlook 2010 and Microsoft SharePoint Workspace 2010. On the client computer, a SQL CE database is used to cache external data to provide a uniform experience offline in the absence of network connectivity. BDC supports two data paths from client to external system:  
    • Client connects directly to external system (known as online connection mode)  
    • BDC client fetches data from the local cache (known as cached connection mode)



Read Blobs
BDC now supports reading binary large object (BLOB) data. This is useful for streaming BLOBs of data from the external system.


Read and Write-Back of Complex Types
BDC now supports dot notation in field names and therefore enables you to read and write complex types


Life Cycle Management
Business Connectivity Services provides a set of tools to facilitate creation of models and Office 2010 application artifacts, declaratively and by writing code. You can use Microsoft SharePoint Designer 2010 to rapidly create composite solutions that meet external unit needs without writing code. You can use Visual Studio to create or extend solutions with sophisticated workflows and data that spans structured line-of-external (LOB) systems, unstructured SharePoint applications or Microsoft Office applications, and Web 2.0 services.


Business Connectivity Services Solutions are assembled from a diverse array of artifacts that must be deployed on the client (an Office 2010 application such as Microsoft Outlook 2010) and the server running SharePoint Server 2010. Business Connectivity Services provides automatic packaging and deployment for solutions. It packages all related artifacts as a single, versioned unit and then publishes them to a SharePoint site. After the artifacts are published on the server, the solution is available to the SharePoint sites immediately. The solution package can then be proactively distributed and deployed (the push model) to the clients or users, and they can be required to "opt in." Business Connectivity Services uses the Visual Studio Click Once deployment to rapidly deploy solutions on the clients.


Enhanced API Set and Extensibility
Developers can use the BDC Runtime object model to write generic applications by using the stereotyped APIs as building blocks. Such generic applications are then assured to work against any external system, including those that are preexisting and those that are yet to be built.


Developers can also write specific applications that make assumptions about the abstract entity model (the fields exposed by these, and the types of the fields).


And with the .NET Assembly Connector, Custom Connector, and the pluggable Secure Store Provider, it provides a rich extensibility mechanism for software developers.











    Wednesday, November 4, 2009

    Useful MOSS Search Development Related Articles

    Useful MOSS Search Development Related Articles


    Best Practices: Writing SQL Syntax Queries for Relevant Results in Enterprise Search --http://msdn2.microsoft.com/en-us/library/bb219479.aspx


    Creating Search Queries Programmatically by Using the Search Object Model in SharePoint Server 2007 - http://msdn2.microsoft.com/en-us/library/bb626127.aspx


    Creating Search Queries Programmatically by Using the Search Web Service in SharePoint Server 2007 -http://msdn2.microsoft.com/en-us/library/bb625950.aspx


    Evaluating and Customizing Search Relevance in SharePoint Server 2007 --http://msdn2.microsoft.com/en-us/library/bb499682.aspx


    Book Excerpts "Chapter 3: Customizing and Extending the Microsoft Office SharePoint 2007 Search (Part 1 of 2)" --http://msdn2.microsoft.com/en-us/library/bb608302.aspx


    Book Excerpts "Chapter 3: Customizing and Extending the Microsoft Office SharePoint 2007 Search (Part 2 of 2)" - http://msdn2.microsoft.com/en-us/library/bb608305.aspx


    Creating a Custom Search Page and Tabs in the Search Center of SharePoint Server --http://msdn2.microsoft.com/en-us/library/bb428855.aspx


    Creating and Exposing Managed Properties in the Advanced Search Page of SharePoint Server Enterprise Search -- http://msdn2.microsoft.com/en-us/library/bb428648.aspx


    Creating and Exposing Search Scopes in SharePoint Server 2007 Enterprise Search --http://msdn2.microsoft.com/en-us/library/bb428856.aspx


    Displaying Search Results in a Grid View in SharePoint Server 2007 -- http://msdn2.microsoft.com/en-us/library/ms497338.aspx


    Exposing Enterprise Search in SharePoint Server 2007 by Using Internet Explorer 7 and the Office Research Pane -- http://msdn2.microsoft.com/en-us/library/bb625970.aspx


    Creating Custom Enterprise Search Web Parts in SharePoint Server 2007 --http://msdn2.microsoft.com/en-us/library/bb871647.aspx


    Customizing Search Results with Custom XSLTs in SharePoint Server 2007 --http://msdn2.microsoft.com/en-us/library/bb896018.aspx


    Searching in MOSS in the SDK -- http://msdn2.microsoft.com/en-us/library/ms497338.aspx


    Class Library reference in MOSS SDK -- http://msdn2.microsoft.com/en-us/library/ms577961.aspx

    Windows PowerShell for SharePoint Foundation 2010

    Windows PowerShell for SharePoint Foundation 2010


    Windows PowerShell™ is a new command-line tool and a supporting scripting language from Microsoft that complements Cmd.exe in the Windows administration context and that supersedes the Stsadm.exe administration tool. Although both Cmd.exe and Stsadm.exe will be maintained for backward compatibility, all current and future development of scripts and administrative files in SharePoint Foundation should use this new scripting technology.

    Windows PowerShell Basics

    Unlike most command-line tools, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. This fundamental change in the environment brings entirely new tools and methods that greatly improve control, efficiency, and productivity for developers and administrators.

    Windows PowerShell is a simple command-line tool that introduces the concept of a cmdlet. A cmdlet is a verb-noun combination comprising a command and an object on which the command acts. Windows PowerShell cmdlet names are comprised of verbs and nouns, separated by a dash (-), which together denote their functional properties. For example, the cmdlet name Get-SPSite combines the verb (command) "Get" with the noun (object) "SPSite" to name the cmdlet that retrieves a specified SPSite object. You can use cmdlets individually, or you can string cmdlets together in linked sequences to perform complex tasks.

    Cmdlet nouns take parameters as name-value pairs that give specificity to the cmdlet noun. When cmdlets are invoked, they return output objects. The objects that are returned also have properties that display as name-value pairs. Because cmdlets return objects, these objects can be passed (or "piped") to another cmdlet, in sequence. In this way, cmdlets can be chained together, providing enormous flexibility.

    In fact, this is just the beginning of the significant differences between a Windows PowerShell cmdlet and commands in stsadm.exe. For example, it is important to note that a cmdlet is not an executable; rather, it is an instance of a .NET Framework class. So, with a few exceptions, cmdlets return objects rather than text streams, and they process their input objects from an object pipeline.

    As you can see, Windows PowerShell is not just a new command-line tool. It is also, and perhaps more importantly, a new scripting language. Windows PowerShell installs natively with over 100 core Windows cmdlets. The library of SharePoint Foundation cmdlets, which presently number over 500, will install on top of these core cmdlets.

    Windows PowerShell Cmdlets for SharePoint Foundation

    Windows PowerShell provides both general and SharePoint-specific implementations. Under the hood, this difference is reflected in the fact that, while Windows PowerShell cmdlets generally derive from the base class PSCmdlet, the Windows PowerShell cmdlets for SharePoint Foundation derive instead from a specialized SharePoint base class called SPCmdlet.

    Following is the signature for the SPCmdlet base class. Note that SPCmdlet derives from the PSCmdlet class.

    public abstract class SPCmdlet : PSCmdlet

    Note that when you use the variable operator cmdlets, which include Get, Set, New, and Remove, you must use the specific SPCmdlet class implementations, not those derived from the PSCmdlet class. This is consistent with the scripting model for using Windows PowerShell cmdlets in SharePoint Foundation.

    For cmdlets that handle persistent objects:

    Get cmdlets: SPGetCmdletBase
    Set cmdlets: SPSetCmdletBase
    New cmdlets: SPNewCmdletBase
    Remove cmdlets: SPRemoveCmdletBase

    For cmdlets that handle nonpersistent objects:

    Get cmdlets: SPCmdlet
    Set cmdlets: SPCmdlet

    For action cmdlets:

    SPCmdlet

    Tuesday, November 3, 2009

    SPMetal Linq with SharePoint 2010

    LINQ and SharePoint 2010

    SPMetal is a command line tool that generates entity classes, which provide an object oriented interface to the Microsoft SharePoint Foundation content databases. These classes are primarily used in LINQ to SharePoint queries; but they are also be used to add, delete, and change list items with protection against concurrency conflicts. Finally, they can be used as an alternative to the regular SharePoint Foundation object model for referencing content.

    The tool is included with SharePoint Foundation and is usually located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\BIN.

    SPMetal is typically executed as a prebuild command in Microsoft Visual Studio because the code it generates is usually part of a solution that includes a new site type that is itself evolving during the development cycle. Because SPMetal overwrites the files it generates with each execution, for a given output path and against a given Web site, you should not make changes to these files. The classes it generates are partial, so you can add members to them in separate, manually created, code files.

    If your solution is based on an existing site type, such as the Team Site that ships with SharePoint Foundation, and it references only lists that are always present in such sites and only fields (columns) that are always present in those lists, you can run SPMetal just once and make changes to the generated file that will not be overwritten.

    For more information about the practicalities of using SPMetal, see How to: Use SPMetal.

    SPMetal uses the basic syntax of other Windows command line tools:

    SPMetal [options]

    Each option is preceded by a forward slash. Most options require values, in which case the option name is followed by a colon and the value follows the colon:

    SPMetal /option1 /option2:value /option3:"value with a space"

    Options can be in any order. Not every option is required, but if you include an option, you must give it a value. If a value contains spaces, you must enclose the whole value in quotation marks (").

    Example
    Generate C# code:
    SPMetal /web:http://ContosoServer/Marketing /code:MarketingSite.cs

    Generate Visual Basic code for client-side execution with custom parameters settings:
    SPMetal /web:http://ContosoServer/Marketing /code:MarketingSite.vb /useremoteapi /parameters:MarketingSite.xml

    Generate Visual Basic code from a specified user context:
    SPMetal /web:http://ContosoServer/Marketing /code:MarketingSite.vb /user:Contoso\sally /password:7Yj38d

    Monday, November 2, 2009

    New Namespaces added in SharePoint 2010

    New Namespaces added in SharePoint 2010
    One of the best ways to get a taste for what's new in SharePoint 2010 is to peruse the new Object Model.  As you can imagine, the changes are substantial.  There are literally hundreds of new classes and thousands of new properties and methods.

    From my initial exploration, very few items appear to have been deleted or moved around.  For the most part, SharePoint 2010 is an improved superset of MOSS 2007.

    Within the technical preview, I've identified 66 new namespaces:
    Microsoft.SharePoint.Administration.AccessControl
    Microsoft.SharePoint.Administration.Claims
    Microsoft.SharePoint.ApplicationPages.Calendar
    Microsoft.SharePoint.ApplicationPages.PickerQuery
    Microsoft.SharePoint.ApplicationPages.Applications
    Microsoft.SharePoint.ApplicationPages.Applications.GroupBoard
    Microsoft.SharePoint.BusinessData
    Microsoft.SharePoint.BusinessData.Administration
    Microsoft.SharePoint.BusinessData.Infrastructure
    Microsoft.SharePoint.BusinessData.Infrastructure.Collections
    Microsoft.SharePoint.BusinessData.MetadataModel
    Microsoft.SharePoint.BusinessData.MetadataModel.Collections
    Microsoft.SharePoint.BusinessData.MetadataModel.Constants
    Microsoft.SharePoint.BusinessData.MetadataModel.Dynamic
    Microsoft.SharePoint.BusinessData.MetadataModel.Static
    Microsoft.SharePoint.BusinessData.MetadataModel.Static.DataAccess
    Microsoft.SharePoint.BusinessData.Offlining
    Microsoft.SharePoint.BusinessData.Parser
    Microsoft.SharePoint.BusinessData.Runtime
    Microsoft.SharePoint.BusinessData.SharedService
    Microsoft.SharePoint.BusinessData.SystemSpecific
    Microsoft.SharePoint.BusinessData.Upgrade
    Microsoft.SharePoint.Calculation
    Microsoft.SharePoint.Client
    Microsoft.SharePoint.Client.Application
    Microsoft.SharePoint.Client.Utilities
    Microsoft.SharePoint.Client.WebParts
    Microsoft.SharePoint.Client.Workflow
    Microsoft.SharePoint.Cmdlet
    Microsoft.SharePoint.CoordinatedStreamBuffer
    Microsoft.SharePoint.Diagnostics
    Microsoft.SharePoint.Diagnostics.ULSEventTemplates
    Microsoft.SharePoint.Internal
    Microsoft.SharePoint.Internal.Converters
    Microsoft.SharePoint.JSGrid
    Microsoft.SharePoint.JsonUtilities
    Microsoft.SharePoint.Linq
    Microsoft.SharePoint.Linq.Provider
    Microsoft.SharePoint.Linq.Rules
    Microsoft.SharePoint.MobileMessage
    Microsoft.SharePoint.Portal.ClaimProviders
    Microsoft.SharePoint.Portal.Internal
    Microsoft.SharePoint.Portal.MobileControls
    Microsoft.SharePoint.Portal.Search.PortalCrawl
    Microsoft.SharePoint.Portal.WebServices
    Microsoft.SharePoint.Publishing.Cmdlet
    Microsoft.SharePoint.RBSWrapper
    Microsoft.SharePoint.Search.Cmdlet
    Microsoft.SharePoint.SocialData
    Microsoft.SharePoint.SocialData.WebService
    Microsoft.SharePoint.Taxonomy
    Microsoft.SharePoint.Taxonomy.Cmdlet
    Microsoft.SharePoint.Taxonomy.ContentTypeSync
    Microsoft.SharePoint.Taxonomy.Generic
    Microsoft.SharePoint.Taxonomy.OM
    Microsoft.SharePoint.Taxonomy.Upgrade
    Microsoft.SharePoint.Taxonomy.WebServices
    Microsoft.SharePoint.TenantAdministration
    Microsoft.SharePoint.UserCode
    Microsoft.SharePoint.Utilities.Cab
    Microsoft.SharePoint.Utilities.SimpleParsers
    Microsoft.SharePoint.Utilities.SqlTrace
    Microsoft.SharePoint.Utilities.Win32
    Microsoft.SharePoint.WorkflowActions.WithKey

    Sunday, November 1, 2009

    Programming concepts of Microsoft SharePoint2010 - for developers

    One of the most exciting developer feature for me in SharePoint 2010 is LINQ. It basically provides a consistent, strongly-typed way of dealing with entities in your data. In SharePoint’s terminology, this means webs, lists and list items. Consider the below example:

    Previuosly with SharePoint 2007 PObjct model code:
    using (SPSite site = new SPSite("http://MySharePoint2010Site.com")
    {
         using (SPWeb personalWeb = site.OpenWeb("/PersonalSite"))
        {
              SPList announcementsList = personalWeb.Lists["Announcements"];
              foreach (SPListItem announcementItem in announcementsList.Items)
             {
                 DateTime expires = DateTime.MinValue;
                 if (DateTime.TryParse(announcement["Expires"].ToString(), out expires))
                {
                             // here comes the value for
                }
            }
        }
    }
     
    With SharePoint 2010 object model code using LINQ:
    // Get DataContext from page context
    DataContext data = new DataContext(SPContext.GetContext(this.Context).Web.Url);
    EntityList Announcementslist = data.GetList("Announcements");
             var AnnouncementItems = from announcements in Announcementslist
                                                      where announcements.Title == "New Announcement"
                                                      select announcements;

    foreach (var ann in AnnouncementItems)
    {
                 Page.Response.Write("id = {0}, Title = {1}", ann.CustomerId, ann.Title);
    }

    LINQ provides your data access abstraction for free. In addition, other data access scenarios such as inserting/updating list items and querying lists (think SPSiteDataQuery or SPQuery) will also be simplified. If you don’t already, my advice would be to start to understand fundamental aspects of how LINQ works

     Recommended reading:
    jQuery:
    Another innovation in SharePoint 2010 is the client object model, which allows us to work with SharePoint data on the client (e.g. in JavaScript or Silverlight) in much the same way as we’re used to in .Net code on the server. In the case of JavaScript, jQuery will be useful here (though certainly not mandatory) because of the script which will frequently surround your use of the client OM. Put simply, whatever kind of objects you’re using in JavaScript, if you’re interacting with page elements jQuery is likely to reduce and simplify the code required.
    Recommended reading :
    jQuery in Action

    PowerShell 
    PowerShell will play a greater role in SharePoint than previously courtesy of the many cmdlets included in the product – certainly admins who are script-inclined are likely to be very happy. The draw here is the sheer power – PowerShell is known for being able call into the .Net framework (and your own custom code), but is also capable of dealing with the filesystem, registry etc. This means that PowerShell can be used for a variety of SharePoint related tasks – scripted installations, configuration scripts, site provisioning/updates and more.
    Recommended reading:
    Silverlight
    Whilst it wouldn’t necessarily have been difficult for skilled developers to build a custom web part to render Silverlight movies, it’s an indication of Microsoft’s desire to make it easy to build rich sites that Silverlight web parts are included in the SharePoint 2010 box. Having had to integrate Flash movies from other teams with XML data sources in the past, having this kind of technology on the “Microsoft developer” side of the fence is pretty appealing. If you have the skills you’ll be able to build web parts with killer user interfaces, and assuming Silverlight is available to your audience the whole SharePoint world will be able to use them.

     Recommended reading:
    FAST search
    You’ve probably heard that SharePoint Server 2010 has native integration with FAST search technology. If you’ve seen the capabilities of FAST and/or had conversations with clients about going beyond a ‘standard’ implementation of search, you’ll know how exciting this is. On my last project I worked with some guys from FAST on a proof-of-concept with extremely custom integration between SharePoint/FAST, so it’s great to see the barrier to entry being lowered here. For many, seeing the art of the possible in this space is a real eye-opener – often you don’t realise what you’ve been missing until you see it. On this one, my main recommendation at this stage is solely to introduce yourself to the concepts used by FAST such as the document processing and query pipelines, dictionaries, entity extraction and so on.

     Recommended reading:
    WCF
    SharePoint’s own web services are now WCF services, but also because if you ever want to build a service application in SharePoint 2010, you’ll need to do WCF work. In general terms, it’s good advice that all new .Net web services should be built using WCF (.svc) rather than as .asmx web services anyway.
    Recommended reading: