Chris’s SharePoint Reflections

Just another WordPress.com weblog




  • Chris Zhong

    IT consultant Australia








Archive for August, 2008

SharePoint development tools

Posted by chrissyz on August 18, 2008

Just a show-off of my SharePoint development tool set :)

Must have:

·         Visual Studio 2008 + Visual Studio 2008 Extensions version 1.2

Before we use Visual Studio 2005 + Extension for WSS3.0 is because the development of Custom Web Parts, Site and list definitions etc for SharePoint is not readily available in Visual Studio 2008. Since the new WSS extension for 2008 released in June 2008 and fully support various SharePoint custom development templates, I think we can call it a day for VS2005

·         SharePoint Designer 2007

Visual Studio is great to develop custom features in SharePoint. But have you ever tried to modify a SharePoint pages in Visual Studio? SPD is great when comes to the issue of branding. It gives you great preview and all the controls SharePoint controls in a menu ready to drag & drop and use. The DataView Web Part is another great feature of SPD. It takes a short time to get a DataView Web Part on your page and linked up to a data source. Creating custom views and filtering information from/around the site simple using this feature.

·         IE Developer Toolbar

Inspect HTML source, style usage, IFRAME content, image location etc. Definitely play an important role when you have to start changing the CSS in SharePoint or need to address accessibility in your website

·         Lutz Roeder’s Reflector for .NET

No need to explain. Most developers in .NET world know this tool.

·         U2U CAML Query Builder

From U2U. A great tool for writing and firing CAML queries.  It helps you decipher CAML and do queries against your lists to see if your CAML will work. You can also save your queries in XML format and launch from your application or web parts.

Optional:

·         WSPBuilder

A SharePoint Solution Package creation tool for WSS and MOSS.  The manual process of packaging our solution is: we create your own manifest.xml and DDF file and use makecab.exe for nice granular control. With this tool, WSPBuilder will automatically traverse a “12″ folder structure and creates a SharePoint solution manifest.xml and the wsp file based on the files it finds. It makes SP deploying and packaging very easily.

·          Fiddler HTTP Debugger

Inspected and manipulate HTTP traffic between your browser and the server, handy for debugging web services

·         Power Shell

Write scripts to automate administration and configuration tasks. A small tip here, the next version of SharePoint STSADM will be based on Power Shell.

·         BDC Metaman

Generate BDC XML from SQL data source. The commercial version also builds definitions for web services. An alternative is baked into the MOSS SDK, but BDC Metaman will continue to be the gold standard

·         SmartPart

Another great community tool by U2U. A SmartPart is a SharePoint web part that can host any ASP.NET control. You can create your own web parts using VS.NET designer instead of coding everything by hand.

Posted in General | 5 Comments »

Custom Site Definition

Posted by chrissyz on August 1, 2008

Try to answer some questions regarding custom site definition in my company. Thought maybe it is worth sharing here. :)

1 – Can we make changes in an already created site, by making some changes to the Site Definition, or will the change be applied only to sites which will be newly created thereon?

 There is no easy way to modify site definitions once they are deployed. There is always the possibility of breaking existing deployed sites derived from the site definition once you modify an existing site definition. The best practice is always copy from one of the existing site definitions, rename it and modify it and then add to the site definitions.  The most popular one to start with is STS (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\). I  start with BLANKINTERNET, a bit tricky, don’t recommend. Alternatively, you can start from scratch (not recommended either).

 

2 – What are the basic advantages of creating a Site Definition?

Well there are pros and cons regarding the custom site def and I think you should know both sides

Pros:

·         The biggest one will be the performance as the pages are cached on the file system instead of in the database. You might want to go over the ghosted /unghosted concept if you are not familiar with it.

·         Higher level of customization by directly editing all the schema files and not depending on the existing site definition as a site template does.

·         Activate the features (especially site columns and page layout) during the site creation

·         Upgrade independent. Subsequent upgrades to SharePoint Products and Technologies may overwrite existing default site definitions. Using custom site definitions excludes your sites from potential upgrade issues.

·         Certain kinds of customization to sites or lists require use of site definitions, such as introducing new file types, defining view styles, or modifying the Edit menu.

Cons:

·         Relative complex process, require access to the file system of the front-end Web Server (need to get an admin involved for deployment)

·         User cannot apply a SharePoint theme through a site definition

·         Editing a site definition after deployment is difficult

 

3 – How maintainable and flexible a site definition is from the perspective of making any changes to it, if required in future.

 

A combination of site definition and features is the best approach although MOSS versioning is still a pain.

 

4 – How can we make changes to the site definition? Feature Stapling is one option I have heard of.

 

Yes, when you want to activate a feature on a site definition that is already in production, or to add it to a OOTB site definition, you need to use feature stapling.  It is bad practice (and not supported) to change the site definition after it is being used in production.  Therefore, the feature stapling is a good option to go.

 

5 – Do we have any document on best practices that we can follow while creating a Site Definition?

There is a good article on MSDN regarding working with Site Templates and Site Definition. Worth to have a look.

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

 

 

Posted in Site Definition | Tagged: , | 1 Comment »