Julius 的个人资料Julius Ganns . netzkern照片日志网络 工具 帮助

日志


1月19日

What Microsoft SharePoint Can Learn from Sitecore as Web Development Platform - Part 5

(Version 2.0 - October 10th, 2009)

In this series, I'm going to compare the functionality of SharePoint and Sitecore from a developer perspective in each area and both candidates can collect "points" from 0 (has nothing to contribute) to 10 (great integration and functionality).

This series will cover the following areas:
- Introduction (Part 1)
- Installation and General Architecture (Part 2)
- Configuration (Part 3)
- Customization and Designer Experience (Part 4)
- Integration with Developer Tools (Part 5)
- Feature Deployment (Part 6)
- API und Data Model (Part 7)
- Integration with other systems (Part 8)
- Conclusion (Part 9)

 

Integration with Developer Tools

In the last part of this series I examined features and tools both framework offer in terms of customization and web designer support. This part of the series is diving deeper into the world of web development with SharePoint and Sitecore.

One of the main reason for an organization to invest in enterprise-class Content Management Systems is to build extended functionality on top of those frameworks. At netzkern we have several customers that made significant investments into their IT infrastructure to enable enterprise application and business process integration, especially using open standards like XML (SOAP, REST, POX). Because of that, extensibility and integration are critical parts of Content Management Systems today and both SharePoint and Sitecore have various integration features and extension points. The question is, however: How easy is it to use those features and interfaces as developer to plug in my own code? Do I need to change the way I'm used to work? And how does the system support me?

As SharePoint comes as part of Microsoft's server family, the tool to develop SharePoint functionality is of course Visual Studio. So, how do we get started? Well, as developer with some experience in the Microsoft space, you might expect the following procedure: Install SharePoint, install Visual Studio, download the appropriate SDK (in this case called "Visual Studio 2008 Extensions for Windows SharePoint Services, Version 1.3", or just VSeWSS for short), take a short look at some API samples, create or open an appropriate sample file, write three lines of code, hit "F5" and see your first shiny "Hello World". And since we're talking about version 1.3 of VSeWSS, that's finally the way it works.

While getting started with VSeWSS is pretty straight forward by now, manually deploying custom SharePoint solutions is surprisingly complex. But before we talk about that, there is one important thing to mention regarding SharePoint development in general. That is, to install either MOSS2007 or WSS 3.0, you need a Windows Server operating system. Although it is possible to use special third party tools to install WSS 3.0 on Windows Vista (see Bamboo Solutions), this way is not supported by Microsoft and may cause problems during development or after deployment to a "real" SharePoint installation. As developer you usually choose one of the following solutions: Install Windows Server on your workstation, use a virtual machine (VMware, Virtual PC, etc.) with Windows Server or use a central Windows Server with Remote Desktop for development. Although you can use Visual Studio on your WinXP for local development, you need to deploy your code on a server machine for execution and remote debugging (which, by the way, is not that straightforward in most scenarios).
The most important feature that VSeWSS brings to the table is finally the ability to hit F5 in your Visual Studio and see the results of your work right away. This alone is a huge advancement when compared to the way SharePoint development used to be. There are a lot of things, VSeWSS takes care of in the background. Let's take look at what happens:
As I briefly described earlier, the way to add functionality to SharePoint is by developing so called Features. Features can be deployed manually by copying all necessary files into the "12 hive" folder and executing a few commands on the command line -or- by using a so called Solution Package (a "WSP"). A Solution Package is basically a .CAB-File (Microsoft's ZIP format) with a specialized internal file structure, additional configuration files and a .WSP extension. Back in the old days you had to create that .CAB file by yourself, but today VSeWSS creates it for you and even allows you to inspect and change its contents live in Visual Studio. If you wanted to create the .CAB file manually (which you don't need to anymore), the first thing to do would be to create a DDF configuration file for the MakeCAB.exe command which would be used to create the .CAB archive (and later be renamed to .WSP). Then you would have to create the Solution Manifest (named manifest.xml), which contains information about all contents of the .WSP and directives about how to deploy the contained Features to a SharePoint farm. A Solution Package can contain several Features in separate folders and each of those Features needs to have a Feature Definition file (named feature.xml) and optionally additional files (Elements files for lists and list items, resource files, etc.).
But that's not the only thing, VSeWSS manages for you. It also takes care of adding your compiled code all additional resource files to the Solution Package, extends the configuration files appropriately, deploys and installs the package in your SharePoint farm and activates the Feature so that you can get your results very fast. In case you would like to know more about what happens under the covers (and you should, if you want to be a real SharePoint developer), I recommend reading the following articles on MSDN (part 01, part 02) and to take a look at the WROX SharePoint Box, which I highly recommend.
While it has been quite painful and complex to deploy custom code using the Solution Framework, VSeWSS makes it significantly easier and developing SharePoint solutions is actually fun again. All steps can also be automated and integrated with various software configuration management and build tools.

Advantages

  1. SharePoint provides a Visual Studio extensions that helps the user significantly by providing Visual Studio templates and automating the complete packaging and deployment process. This makes it easy for developers to get started as long as everything goes well.
  2. SharePoint provides a full-features deployment system called the Solution Framework that developers can use to deploy their code within a SharePoint farm. We will cover that in more detail in the next part of the series.

Drawbacks

  1. Deploying custom SharePoint solutions is still very complex under the covers. All artifacts need to be described using various XML files and packaged using specialized tools, as well as deployed, installed and activated in the target environment, which would mean to use a combination of console tools and the SharePoint Administration in addition to creating the .WSP file and all its contents manually. Fortunately, that complexity is largely hidden from the developer, but if something goes wrong, finding the source of the problem requires some time.
  2. SharePoint cannot be developed completely on a usual WinXP or Vista workstation because it is at least necessary to use Windows Server with an installed SharePoint as runtime environment (or to use unsupported third party software). To have a reasonable development lifecycle, using Windows Server as development platform (be it native, in a virtual environment or on a central server) is strongly recommended.

As you know, Sitecore is based on .NET, and so the tool to develop extended Sitecore functionality is of course Visual Studio as well. So, let's see how to get started here... Again, as developer your expectation might be the following: Install Sitecore and VS2008, download the SDK, take a short look at some API sample, create or open an appropriate sample file, write three lines of code, hit "F5" and see your first shiny "Hello World". And guess what? That's exactly the way it works - and it strong contrast to SharePoint, that's all there is to it.

From the perspective of .NET, Sitecore is just a well integrated ASP.NET web application with advanced functionality and you can even run it using the WebDev.exe development server that is coming with Visual Studio, regardless whether you're running WinXP, Vista, Windows 7 or Windows Server (2003 and 2008 are supported). You can also use the local IIS coming with those operating systems (yes, even IIS 5.1 in WinXP), it is totally up to you.
This means you get all the things you're familiar with: Debugging .NET code (and even XSLT code) without any additional tasks, deploying additional assemblies to the /bin folder, using source code management tools and experience no limitations while doing your job. The integration of Sitecore and ASP.NET is really seamless. Another great thing is that you're not limited to Visual Studio, but you can even use Microsoft Expression Web to run Sitecore and choose every external editor (e.g. for editing your XSLT files) to change Sitecore solution and resource files.

In contrast to SharePoint, Sitecore provides you with a couple of additional developer tools within the system that can dramatically improve the quality of your results and your personal productivity. By using the integrated debugger tool to debug your web pages, you get a lot of useful information about your code, your renderings and your design, right where you need it. You can also use the Sitecore Developer Center to edit your XSLT code, your layouts and even your .NET code, so you don't need to use Visual Studio for very simple task like a short bugfix or minor update. Sitecore's Package mechanism makes it ease for you to deploy the code you created in your local or central development environment to integration, test and production environments (more about that in the next part of the series) and you can use the integrated log4net to trace the flow of your application without configuring and maintaining a separate logging framework or the Windows EventLog. While creating a reusable content type usually involves a lot of XML hacking, deploying, installing, activating and configuring within SharePoint, using the Template Manager in Sitecore to create your own information structures is a breeze.

Advantages

  1. Sitecore behaves like an usual .NET application during development and deployment. Developing for Sitecore is exactly like developing with any other .NET library, as it is fully integrated with Visual Studio and the WebDev server. You can even use the free editions of Visual Studio or Expression Web - or any other tool you prefer as long as it runs on the Windows platform.
  2. Sitecore offers additional developer tools as part of the distribution and in form of additional tools through the Sitecore Developer Network.
  3. Visual Studio is your one-stop place for developing Sitecore features, there is no need to switch to any other application, except you want to.

Drawbacks

  1. For the time being it is not possible to rollback Sitecore package installations. This would be a very, very nice feature for the future, although I'm aware of the complexity of that request.

So let's draw our conclusion here. Developing Sitecore and SharePoint is not that different anymore thanks to VSeWSS, although there are still some minor drawbacks in Microsoft's web content and collaboration platform. Of course, no framework is ever complete nor perfect, but Sitecore has managed to create a great developer experience and a pretty great framework.

Sitecore: +10 points = 34 points total
SharePoint: +8 points = 25 points total

See you soon for part six...



评论

请稍候...
很抱歉,您输入的评论太长。请缩短您的评论。
您没有输入任何内容,请重试。
很抱歉,我们当前无法添加您的评论。请稍后重试。
若要添加评论,需要您的家长授予您相应权限。请求权限
您的家长禁用了评论功能。
很抱歉,我们当前无法删除您的评论。请稍后重试。
您已超过了一天之内允许提供的评论数上限。请在 24 小时后重试。
因为我们的系统表明您可能在向其他用户提供垃圾评论,您的帐户已禁用了评论功能。如果您认为我们错误地禁用了您的帐户,请联系 Windows Live 支持部门
完成下面的安全检查,您提供评论的过程才能完成。
您在安全检查中键入的字符必须与图片或音频中的字符一致。
GannsJuliu​s 在此页禁用了评论功能。

引用通告

此日志的引用通告 URL 是:
http://jgnk.spaces.live.com/blog/cns!457F4BDBA1A371A5!309.trak
引用此项的网络日志