codeflood logo

Posts from 2008

2008, the year that was

So. 2008. What a year! We've seen a lot of activity from Sitecore this year. We had the Beta program for the new Sitecore codenamed Crestone which was later released as Sitecore 6. This version of Sitecore is the most polished to date (as you would expect). The Sitecore product just keeps getting better and I keep having fun using it.

Sitecore Desktop in Firefox and production javascript debugging

Back in the pre Sitecore 5.3 days I would sometimes prefer to use Firefox when logging into the Sitecore desktop. Firefox was much faster than IE for this interface, and especially if I was looking at a slow implementation Firefox would help ease some frustration. The desktop didn't look exactly as it should in Firefox, which is probably why Sitecore revoked support for the Sitecore desktop for...

My Sitecore Wishlist

A few weeks ago Alex de Groot asked the Sitecore community, through a post on his blog, what we want to see in Sitecore. How would we improve it? What features are we missing? So rather than comment on his post, I am posting my response here. Hopefully it will invoke some thought and others will post their Sitecore wishlists for all too see and talk about. Below, in no particular order, is my...

Common uses for Revolver

When developing Sitecore solutions I use Revolver a lot. I find it easier and quicker at times to do things in the command prompt than clicking through the beautiful UI. So here's a bit of a list of common scenarios I use Revolver for. Most of the scripts below utilise the find command. By far I think the ability to execute the same command against a set of items is the biggest benefit. You can...

HAML Rendering for Sitecore

I first heard about Haml (XHTML Abstraction Markup Language) early this year on Alexey's blog. At first I thought "What's the point?". After all, HTML is easy to understand and is itself a markup language. Why do I need a markup language for a markup language? But when you start writing in this higher level language everything starts to zen. I have started to become a fan of significant...

A generic error occurred in gdi+

I had the above error the other day when using a new install of Sitecore. At first the error doesn't seem to reveal much, and it quite ... generic :) . This was happening when I was trying to create a new rendering through the developer centre in the Sitecore desktop. The full error was: And the error is logged in the log file as well. Exception:...

ChangeTemplate with Revolver

One of the goals of Revolver is to provide a platform for custom tool development and execution. Often we need to execute some code against an arbitrary set of items from the content tree. For example, yesterday I had to change the template of most of the items in the content tree of the site I was working on. And I wasn't about to click through 200 items changing templates using the content...

Automated Testing and Sitecore - Part 8

Well. When I started writing this multi-part series on automated testing and Sitecore I never intended for it to flow over into 8 parts. But I think what I've covered in this series are the fundamental pieces any developer requires to be able to affectively automate their tests for Sitecore code. So, now that we're at the end of the series, I'll leave you with some tips. Don't get hung up on...

Automated Testing and Sitecore - Part 7

In the previous part of this series we covered testing the static output and behaviors of Sitecore presentation components such as rendering, layout and sublayout. But what about testing the dynamic behaviors of a component, such as "what happens when I push the button?", or "did my javascript make the ajax call to grab the content from the CMS?". In this part of the series...

Automated Testing and Sitecore - Part 6

In this installment we'll cover testing the static behaviors and presentation of our other Sitecore presentation components; layouts, sublayouts and renderings. These components are more difficult to test as they need to be hosted inside a Sitecore page to allow testing them. Because these components will be hosted in a page, we will be making web requests to the server to get the page output,...

Make Sitecore host WCF

For a long time I've been a huge fan of .net remoting. Once you got your head around the architecture, it is a really nice technology to use when you need to make calls across applications. In the past I have done this straight out of Sitecore with no problems. The general scenario involves 2 Sitecore servers setup in a master / slave configuration where the master server is the content authoring...

Automated Testing and Sitecore - Part 5

In the last part of this series we started to write tests around code which uses the Sitecore API. These tests were run inside the NUnit custom test runner we wrote back in part 3 of this series. In this post, we'll start testing our presentation components, starting with the easiest to test, which is a Sitecore WebControl. This is any class which inherits from Sitecore.Web.UI.WebControl. The...

And Another One for Shared Source

Last night I uploaded the Quicklaunch toolbar which I created a few months ago into the Shared Source section of SDN. So hopefully more people will now be able to find it. You can check it out by following http://trac.sitecore.net/QuickLaunchToolbar/wiki. It is also listed on the SDN at http://sdn5.sitecore.net/Resources/Shared%20Source/Shell%20Extensions/Quick%20Launch%20Toolbar.aspx. You'll find...

Automated Testing and Sitecore - Part 4

So far in this series we have covered some of the theories and techniques required to automate testing of Sitecore components, creating a custom NUnit test runner which runs inside the Sitecore website and exposes the Sitecore context to the running tests and how to programmatically setup our test environment for repeatable testing against know content structures. In this post we are going to...

Automated Testing and Sitecore - Part 3

In my first post of this series I talked about the high level concepts of how I do my automated testing in Sitecore. All of the techniques I wrote about require a known content structure to test against as the content tree makes up one part of the input into our test. This post is going to focus on programatically setting up our test environment so we can perform our tests in a repeatable...

Into Shared Source

It is with great pride I today became part of the elite known as the Sitecore shared source contributors. How does one become part of such a privileged group? You just have to contribute something to the Sitecore shared source repository :) . I have placed one of my Sitecore tweaks, the Editor Line Numbers which I released on this blog a few months ago, into Sitecore shared source. I did this...

Automated Testing and Sitecore - Part 2

In the first post of this series I mention I make use of a custom NUnit test runner which runs in the Sitecore context. In this post I'll take you through creating such a test runner. The test runner is just a web form deployed to the webroot of your Sitecore site. Because it runs inside your Sitecore application it runs within a Sitecore context. The test runner allows running a selection of test...

Show some standard fields always

I had a question posed to me today from Krystle Magadia from New Zealand about how to show some of the standard fields without having to switch on standard fields under the view tab in the content editor. The scenario given was that the archive and reminder fields (under the tasks field section) should always be displayed. Normally we interact with these fields using the commands and wizards on...

Automated Testing and Sitecore - Part 1

Well, my last post seems to have generated some interest. Automated testing with Sitecore is a hot topic. It is much more difficult and complex than those 2 second demos you see for general unit testing in your code. The purpose of this post is to describe how I currently perform my automated testing against Sitecore. I say currently because I am constantly updating how I do this as I discover...

Damn you VSUnit!

I ran into quite an unusual quirk with VSUnit today. (I've taken to calling Visual Studio Unit Testing VSUnit for brevity.) I've been doing some Sitecore dev using Test Driven Development (TDD) which I have had great success with in the past when working in a purely NUnit space. But with VSUnit I like the ability to run my tests straight inside the IDE (please don't point me at TestDriven.net :)...

Page: 1 2