Saturday, March 31, 2012

SPDesigner vs. Visual Studio

Often Sharepoint developers face this dilemma, is SharePoint Designer the way to go or Visual Studio? Let's take a closer look at these two completely different tools to solve two completely different types of problems.

SharePoint Designer -  as stated by MSDN is
    SharePoint Designer is a free tool that helps advanced users and developers quickly create SharePoint solutions. Advanced users can compose solutions that encompass a variety of common scenarios, from collaborative sites and web publishing to Line-Of-Business data integration, business intelligence solutions, and human work flows, all leveraging the building blocks available in SharePoint in an easy-to-use environment. Developers can use SharePoint Designer 2010 to get a quick start on SharePoint development projects
More details and downloads can be found here.

From my experience, SharePoint Designer is a perfect tool for branding the site, customizing the layout, updating CSS and designing Master Pages for a rapid development timeline, a prototype, demo etc. However, customizing the pages makes the pages performance heavy and the development team should make sure that the production environment has a Visual Studio wsp solution file deployed which is thoroughly tested on the staging environments.

In a couple of my project implementations I have used SP designer to implement the Branding, and this is quick and easy. I have used designer to create XSLT List view web parts. More details here.

  1. Branding
  2. Customizing the page layouts
  3. Updating CSS
  4. Designing Master Pages
  5. Create Interactive Web Pages without writing CODE.
  6. XSLT List view web part - More details here.
  7. List Work flows - A good video that I refer to often is here
  8.  Sharepoint Online - SP Designer offers a lot. MSDN reference link I referred often for my SP Online project is here.
When not to use SP Designer :
  1. Needs a lot of careful and attention on the developers par, a checked out file will not ensure that the expected results are achieved.
  2. Reusable work flows are not supported in SP Designer
  3. UnGhosted - When one customizes any page or a page template,  that page basically becomes unghosted. All the changes are now stored in content Database rather than on your file system. Now retrieving data from file system is faster than from the content database.
  4. Using share point designer you can create new site templates. Any updates by Microsoft will affect this ( say changes to core.css) A Site definitions however, is independent and Microsoft updates will have no effect.
Best Practises for SP designer usage
  1.  Avoid customizing a Pages based on a File in the 14 Hive. ("C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\14")
  2. Avoid installing SharePoint Designer 2010 on SharePoint Server
  3. Do not edit the Out of the Box CSS files. ( Core.css)
  4. Do not start customizing from Production directly.
  5. Avoid customizing pages which are frequently accessed and require less page load time
  6. Web Part Properties in Web Part Zones are not versioned so we need to be extra careful.
  7. Enable versioning for the artifacts that are being customized.  In case of any issues, this will help with rolling back to a previous version.
My Views and suggestions to the Sharepoint Teams for rapid development and long term risk mitigation :
  1. Only Technical End users should have the permissions to use SharePoint Designer
  2. Reusable workflows should be exported to Visual Studio and then enhanced
  3. Any Master page customizations that are done in SharePoint Designer for rapid prototyping should be exported to Visual Studio and deployed and tested on the staging and production via a feature activated by WSP.

Visual Studio is the tool of choice when you want to extend SharePoint functionality by writing your own custom code. Within the enterprise, this is a very powerful tool for developers. However, in SharePoint online space, you can only use Visual Studio to create sandbox solutions or use the client object model. No farm based solutions are allowed.

Visual Studio can be used in a variety of situations, some of which are mentioned below
  1. To design portable workflows.
  2. To create event handlers
  3.  Custom features
  4.  Custom site definitions
  5.  Custom web parts, Lists, Fields etc.
  6. Create scoped, feature based deployments using WSP
Summary :
Microsoft  deployment model is to work with SharePoint Designer directly on the production. But when you enter in a industrial process (with dev to test/staging to production ), Visual Studio is more suited.

Sharepoint Designer can only be used to customize native Out of the box webparts. You cannot create  custom webparts using SharePoint Designer.

Sharepoint Designer is intended as a "power user" tool, whereas Visual Studio is intended for developers.

There is no concept of deployment using Sharepoint Designer unless you import it in Visual Studio. for working with Visual Studio we need a skilled developer, but if you are just doing customization you can achieve a lot with SharePoint Designer.

Using Visual Studio you can create solutions that change files on your front-end servers and make modifications to your farm's configuration, whereas with Sharepoint Designer we are limited to making changes to the content database. Sharepoint Designer is powerful enough to do serious changes to a farm so we need to be careful and hence the administrator has the option of disabling it.

Visual Studio Resources for the developers:
  1. Visual Studio 2010 SharePoint Power Tools can be found here
  2. Click Here to get more info on the development in Visual Studio 2010 for sharepoint.
  3. Codeplex resource SharePoint Developer Tools for Visual Studio 2010 can be found here

No comments:

Post a Comment