Raghu's SharePoint Corner: June 2009

My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
http://www.sharepointcolumn.com
and update your bookmarks.

June 9, 2009

Difference Between SiteTemplate and SiteDefinition

Site Templates : Are snapshots of sites at a point in time. When a user customizes a site from the UI or SPD, the custom template consists of the difference between the original state of the site (determined by its definition) and the state of the site or list when the custom template is generated.

Custom templates remain tied to a particular site definition (for example, the site definition for SharePoint Web sites or Meeting Workspace Web sites), so that if the site definition is not present or is changed, the custom template cannot work.

Site Definitions : As the name implies, A Site definition is "core definition of a site" . Each site definition emerges through a combination of files that are placed in the 12 hive of WFE during installation of SharePoint. Site definition files include .xml, .aspx, .ascx, and .master page files, as well as document template files (.dot, .htm, and so on), and content files (.gif, .doc, and so on).

Difference between them are as follows

Site Definitions
  1. Files are on disk, better performance.
  2. Highly customizable and extensible (XML and .NET code is much more flexible than UI)
  3. Can provision multiple webs This could be achieved using Provisioning handler ( For more info, refer to the Publishing Site Definition in the 12 hive )
  4. Complex to create
  5. Requires admin access to server for deploying.
  6. Modifying the site definition after provisioning at least one site from it is not supported and might break existing sites.

Site Templates
  1. Files are in database, less efficient.
  2. Not easily extensible (You are limited by what UI offers)
  3. Can only provision one web
  4. Easier to create
  5. Installable from a Web UI by site owners.
  6. Custom templates can be modified without affecting existing sites that have been created from the templates(**).


** Please note that If the site definition on which the custom template is based does not exist on the WFE, the custom template does not work.

On the surface, it appears that a site template has numerous advantages; it is certainly easier to create and deploy, and you can change it without breaking sites that use earlier versions of the template because it is not centralized in the 12 hive.

However, the fact that a site template contains everything about a site in a single file makes granular modifications of individual elements very difficult. For many projects, that is a good enough reason to suffer the additional complexity of site definitions.

However, site definitions present a different challenge. If you change an existing site definition in the 12 hive, you run the risk of breaking any sites that were created previously and use the existing definition. ( Besides, this is not supported by Microsoft ) , The key is to adopt the same strategy as for the core WSS site definitions:

Keep the definition as simple as possible and use feature stapling for everything else. Feature stapling allows you to add a feature to an already existing site definition. You may think this would be a complete waste of time, because you can simply add the feature into the site definition using far less code than having a feature staple, but when I tell you that

Microsoft does not support modifying a site definition in any way after a single site has been provisioned from that site template, you may reconsider.

Features are not an alternative to site definitions. Features are a complement to site definitions. If you keep the site definition as simple as possible and use features for the majority of a site elements, you gain the benefits of granular control in the development environment while reducing the risks involved in making changes to production systems over the life of the sites.

June 5, 2009

Assembly Version Number Details

Before i start describing about the version number in assembly, lets understand why we need them. Much before Microsoft released .Net Framework, thats in the era of Visual Basic, Most of the developers had problem in maintaining different version of DLL once deployed in GAC(Global Assembly Cache) and this problem was called has DLL HELL PROBLEM . In order to come up with this issues microsoft introduced versioning of assembly.

Versioning on assembly can be done only if they have strong name. In order to place assembly in GAC it must have a strong name. An assembly can have version information in 2 ways

1. The assembly's version number, which, together with the assembly name and culture information, is part of the assembly's identity. This number is used by the runtime to enforce version policy and plays a key part in the type resolution process at run time.

2. An informational version, which is a string that represents additional version information included for informational purposes only.

Assembly Version Number

Each assembly has a version number though which it can be identified. As such, two assemblies that differ by version number are considered by the runtime to be completely different assemblies. This version number is physically represented as a four-part string with the following format:


For example, version 1.5.1254.0 indicates as follows
1 as the major version, 5 as the minor version, 1254 as the build number, and 0 as the revision number.


The version number is stored in the assembly manifest along with other identity information, including the assembly name and public key, as well as information on relationships and identities of other assemblies connected with the application.

June 3, 2009

Microsoft Bing Features Rock

Finally the new search engine rather i can say it has a updated version of Windows live is called as BING... BINGO you got what you where looking for!!!.
Its into beta release, in the next 12 month Microsoft his going to update the Bing with new features. All the features of Bing currently are not available across the world.so if you want to have look at the full version of Bing, go to this page and set English - US as your default region. You can now enjoy all the Bing features from anywhere.

There is a lot of improvement in the Search engine compared to live but not definitely a Google Killer. So for few days i will be using Bing lets see weather i will stick to it or move back to Google.

1. The first thing that i noticed is the left result tab i.e All Results Menu, its like summary of all the results easiest way to directly access the concern topic you are looking for.



on the right side of the search result you will find the summary of the site and page details






2. The second i was fascinated with the image search check out the All Results Tab, it has categorized images into size, layout, color, style and people. If you hover on any of the images you will see the images pops u.. cool na apart from this on right side corner of the search result you will the types of layout simply awesome






3.In video Search you can view videos according to the following categorization, length, screen size, resolution and the most importantly search.



I started loving Bing by the time i finished writing this post.. Hope i will stick to it..