jQuery and jCarousel in SharePoint

I recently had to integrate jCarousel into a SharePoint web part. Since jCarousel is a plugin for jQuery, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging instructions found from a few different blog posts:

After figuring out how to package jCarousel and jQuery using SharePoint delegate controls, I was ready for business with the implementation of the web part.

The web part itself was nothing fancy. I used a Repeater control to generate the list item (LI) elements with the content I needed in the carousel. I wrapped the Repeater in an unordered list (UL) which was wrapped in a DIV tag that had the runat attribute set to server. So basically, I just followed the mark up instructions provided in the jCarousel documentation.

The wrapping DIV tag was used in my webpart code to initialize jCarousel. The code snippet below shows how I implemented it:

protected override void OnLoad(EventArgs e)
  if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), this.ClientID))
    Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, @"
      <script type=""text/javascript"">
        jQuery(document).ready(function() {
          jQuery('#" + carouselDiv.ClientID + @"').jcarousel({
            // Configuration goes here
            vertical: true,
            scroll: 2,
            visible: 4

Come and Get It! SP2 for MOSS 2007 and WSS 3.0 Is Here

Service Pack 2 for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 have been officially annouced and are available for download from the Microsoft Download Center. I ran across the annoucement on the Microsoft SharePoint Team Blog where you can find links to the knowledgebase articles, downloads, and other resources including installation instructions. Below are quick links for the downloads:

SP2 for WSS 3.0: http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&displaylang=en

SP2 for MOSS 2007: http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90-5FC6-4347-89B0-A80DEB27A082&displaylang=en

SharePoint Test Driven Development

[Via Joel Oleson]

I love finding a good and useful blog post and this morning I did just that. The post from Joel Oleson regading SharePoint test driven development is great. It has a quick exerpt from his twitter conversation with other SharePoint pros regarding this topic, a summary of what he learned, and list of useful resources with descriptions. If you follow or practice test driven development (TDD) and are involved with SharePoint development, then this post will be a good resource for you too.

Microsoft Office SharePoint Designer 2007 or Not

SharePoint Designer (SPD) is a nifty tool to use to customize SharePoint sites. It is very powerful and allows us to quickly make style, organizational, functional, and content changes quickly and easily. Today, I ran across a post from Joel Oleseon where he shared his professional opinion in response to another post about the tool from Mark Rackley which was motivated in response to Microsoft’s announcement to make the tool available for free. There really is nothing new about the debate as it deals with the advantages and disadvantages of empowering an end user with all of the power the tool has to offer. It has just resurfaced since the tool will be freely available.

So… if the debate is not new, what’s all the fuss about?

Regardless of the stance that you take about allowing SPD to be used in a production SharePoint deployment or not, the real cause of concern is how SPD can impact production environment when used by untrained/uninformed users with appropriate rights. This reminds me of the quote – with great power comes great responsibility… or something like that. I don’t see the need for huge concern. That is assuming people with those rights have already been trained and informed. For the most part, people with contributor or higher permission role assignments can already do plenty of damage to a production environment with only the web browser at hand. Hence, the need and argument for appropriate training, content approval (and publishing) planning and enforcement, and governance plans (especially in Extranet/Internet facing deployments).

Okay… so what should we do?

There shouldn’t be too much to do (assuming training, content approval, governance, etc. has already been addressed). Professionally, I will be making sure to emphasize the role of SPD in SharePoint projects. I will also make sure to encourage the inclusion or addition of SPD training for existing and new SharePoint users (especially “power” users), administrators, and developers.

The PeopleEditor Class and the Visibility Attribute

When doing custom development for MOSS 2007 or WSS 3.0, the PeopleEditor class can come in handy. However, it seems that it begins misbehaving when the the Visibility attribute is changed from its default value of true. Recently, I had the need to make it disappear and reappear depending on certain conditions in a custom form that was developed and I ran into this problem. The work around simply involves using a display style attribute. To make control invisible, set the display style attribute value to none. To make the control visible again, set the display style attribute value back to block.

Here is a sample C# method that I used to make this happen:

private void SetPeopleEditorVisibility(ref PeopleEditor pe, bool visible)
  if (pe.Style.Keys.Count > 0 && pe.Style["display"] != null)
  if (visible)
    pe.Style.Add("display", "block");
    pe.Style.Add("display", "none");

Come See Me at the Orange County SharePoint User Group

Tomorrow, September 17th, I will be speaking at the Orange County SharePoint User Group along with Bob Mixon.

Improving SharePoint Search Relevancy through Scopes
6:30pm – 8:00pm – QuickStart, Irvine, CA

Organizations struggle with delivering information within the scope and context of business users needs.  Understanding scope and contextual search needs can be a daunting task.  However, results can be dramatically improved through careful planning, architecture, design, and development techniques.
In this session, you will learn the techniques and best practices required to deliver a SharePoint solution that supports scoping of information.  We will cover appropriate architecture, design, and configuration techniques then dive into development.  Development topics will include an introduction to search syntax options and the key query classes offered in MOSS, and search object model with a demonstration of executing queries with scope information.
So if you are in the area, stop by and say hello!

WSS 3.0 and MOSS 2007 Certification

I often get asked how to get “SharePoint certified”. This is actually an easy question to answer since there are four available SharePoint related MCTS certifications from Microsoft. The certifications are:

Usually, the next question I get is… Which one should I take? This question is a bit harder to answer since the answer depends on the individual goal of certification. Nevertheless, I will try to break it down.

Every person who wants to get “SharePoint certified”  should start with exam 70-631 (WSS 3.0 Configuration). This certification shows that you understand how to install and configure a SharePoint farm, use Central Administration, and use and customize out-of-the-box features such as site templates, lists, libraries, and web parts. From a professional perspective, this exam is the corner stone for all things SharePoint since it ensures that the individual with this certification has the essential knowledge to create out-of-the-box solutions using WSS 3.0. To begin preparing for this exam, I suggest strong familiarity with the WSS 3.0 TechNet library.

The next certification to go for depends on your professional goals. If you are a developer and want to build custom solutions, then take the 70-541 exam (WSS 3.0 Development). If you are not a developer and plan on building out-of-the-box solutions with MOSS 2007, then take the 70-630 exam (MOSS 2007 Configuration). My reasons follow below.

Exam 70-541 (WSS 3.0 Development) certifies general knowledge of custom development and advanced customization of WSS features. This includes knowledge of the programming against the WSS object model and using the collaborative application markup language (aka CAML) to create custom applications, templates, features, definitions, and more. It also demonstrates the ability to package and deploy custom solutions using the WSS solution deployment mechanism. To begin preparing for this exam, I suggest strong familiarity with the WSS 3.0 MSDN library. If you are not a developer, then skip this exam.

Exam 70-630 (MOSS 2007 Configuration) certifies the ability to deploy, maintain, monitor, and administrate operations of MOSS 2007. This includes deploying and managing a Shared Service Provided (SSP), search, business intelligence, business forms, user profiles, my sites, business data catalog, and more. Basically, it’s the same as exam 70-631 but with a focus on the premium out-of-the-box features of MOSS 2007 not included in WSS 3.0. If you want to prepare for this exam, then get familiar with the MOSS 2007 TechNet library.

The last exam is 70-542 (MOSS 2007 Development) is another developer focused exam similar to the 70-541 exam. However, the focus shifts from the WSS object model and features to the MOSS object model and features. This exam assumes that you are comfortable with CAML, the .NET framework, and developing applications with WSS. If you want to prepare for this exam, then get familiar with the MOSS 2007 MSDN library.

Sometimes people also end up asking me if using TechNet and MSDN are enough to prepare for the exams. This totally depends on your experience and your level of familiarity with SharePoint and only you can decide if TechNet and MSDN are enough for you. Rest assured there are lots of good learning resources out there to help you prepare for the exams such as books, classes, and more. If you need helping preparing for an exam and finding classes or other learning resources, then go check out the Microsoft Learning.