Thursday, 10 September 2009

Updated blog list

Hello everybody,

I have recently updated the list of Sitecore bloggers both on my own Blog list(s) as well as on Yahoo Pipes. If you have any additions, please let me know.

New entries are highlighted with bold.

Sitecore Blogs

External Blogs

Sitecore official

In addition, - if you don't want to get all of these blogs into your feed reader, - subscribe to this feed which syndicates all of the above

http://pipes.yahoo.com/pipes/pipe.run?_id=ZsFOz4a62xG9Py3Idbq02Q&_render=rss

Anybody, anything missing? Feel free to comment

Wednesday, 05 August 2009

Sorting your items on your website

Alex de Groot wrote an excellent article the other day where he explains about one of the often forgot, but powerful features in Sitecore: Sorting Sitecore Items: http://sitecore.alexiasoft.nl/2009/08/04/sorting-sitecore...

His article even illustrated how to write a comparer and use it in Sitecore.

Essentially, Alex’s article explains how to assign a sorter:

You select a node in the content structure, and then select a sorting mechanism which will applied to existing child items as well as to new child items (provided that you haven’t been sorting manually, then this takes precedence).

Whether you publish, - or run live mode on your web site, any time you request a child list of a node, the order you see in your content structure will also be the order you get the list in. So, if your content in the content structure is sorted by item name, your item.Children will return this order as well.

But what happens if you want to create a web control which sorts the content in another order, for example by creation date?

Why not reuse the comparers you have in Sitecore for this purpose?

      Sitecore.Data.Items.Item contextItem = this.GetItem();
      ChildList children = new ChildList(contextItem);
      children.Sort(new Sitecore.Data.Comparers.CreatedComparer());

Pretty neat, right?

But why not take it one step further and create a web control where whoever inserts the web control may choose the comparer at that time: Instead of coding into your web control which sort mechanism to use, why not a take this value from a web control property?

And while at it, - why not built a rendering properties template that allows the editor to select the sort mechanism from a dropdown list:

image001.png

Create custom property

To build the UI with the “sort” dropdown, first build a template inheriting from “Standard Rendering Parameters” (/system/layout/rendering parameters/standard rendering parameters.

Add a single field, “Comparer” (must match the property in your web control), with the data type “Droplink”. Also set the data source to the comparers node: /sitecore/system/settings/subitems sorting.

image003.png

Create web control

Next, build or extend your web control to accept a Comparer property. This property will accept a string with the GUID referring to the item where the comparer is defined. The code for this control looks like this:

namespace UsingComparers {

   public class SimpleMenu: Sitecore.Web.UI.WebControl {

     private Sitecore.Data.Comparers.Comparer _comparer =
      new Sitecore.Data.Comparers.DefaultComparer();
    private string _comparerIDString =
      "{781247D2-9785-400F-8935-C818EC757967}"; // Default comparer

     public string Comparer {
      get {
        return _comparerIDString;
      }
      set {
        _comparerIDString = value;
        Sitecore.Data.ID comparerID =
          Sitecore.Data.ID.Parse(_comparerIDString);

         Sitecore.Data.Items.Item ComparerItem =
          Sitecore.Context.Database.GetItem(comparerID);

         string comparerClassField = ComparerItem["Type"];

         _comparer =
          Sitecore.Reflection.ReflectionUtil.CreateObject(
            comparerClassField, new object[0])

            as Sitecore.Data.Comparers.Comparer;
      }
    }

     protected override void DoRender(HtmlTextWriter output) {
      Sitecore.Data.Items.Item contextItem = this.GetItem();

       ChildList children = new ChildList(contextItem);

       children.Sort(_comparer);

       foreach(Sitecore.Data.Items.Item child in children){
        output.Write(child.Name + "<br />");
      }
    }
  }
}

Register web control

Register your web control as a new web control rendering (/sitecore/layout/renderings), and select the “Parameters Template” field to the template defined above:

image005.png

Monday, 15 September 2008

Status on the upgrade tool

As some of you know, the Sitecore 6 database conversion tool has been in beta now for quite a while. The last intensive test report came up with very few issues, - mostly related to cosmetic issues.

I also know that several upgrade projects have been running simultaneously to the Beta, - and I wish to extend a thank you for the constructive and positive feedback.

 

Some issues have revealed themselves when our partners have been using the system. For example, while Sitecore has always been a product focusing on security, version 6 locks down even harder: Editors in the past with weak passwords would automatically not any longer have access to the system, and the admin must reset their passwords. This is great for security and ultimately for our customers, but what happens if the Administrator is the only user, and has a weak password too?

In this case, we are currently changing the password to the user name: Of course, whoever updates the system will get a post conversion notification to change the password(s).

 

Most of this stuff is really something we could release the product with now, but as part of our release strategy, we have decided not to release with known issues that would be inconvenient for our partners and customers.

 

Anyways, - now only 2½ months after the product release, it looks like we’re ready for the official release. These days, we’re passing the conversion tool to yet another test cycle, and if nothing pops up, - release day.

Monday, 28 July 2008

Upgrade tool, part two

Some of you might read my post last week about the Sitecore upgrade strategy. In this respect, the tool for upgrading your web site to version 6 was released in an Alpha version.

This is already being tested by several developers, and so far responses have been positive. Ivan Shamarok has even blogged about it: http://sitecoregadgets.blogspot.com/2008/07/migrate-from-....

 

I decided to give it a try with my own little hobby project, which I would consider a fairly standard best practice web site, - with (multiple) data inheritance models and extensive use of standard values/masters. I also use a single proxy item.

As a twist, however, the site is a combination of editing/extranet site where the core and the public site would use the same security database. Another layer of complexity is that the user is allowed to edit their personal profile information. This, - I knew, would have to be addressed specifically (re-coded to Sitecore 6) as user objects would no longer reside in Sitecore, but in the .NET security database. According to documentation, this should be the only possible breaking change that requires recoding.

Before the conversion, I decided not to transfer Archive and Recycle Bin as both were empty, rendering these steps useless.

 

The database conversion took me 45 minutes; - even with such disturbance only a baby daughter playing on your lap can give you. In the data structure test I did after the conversion, I didn’t find a single conflict or issue. I was especially impressed that roles and users were moved so easily from the older structure to the new structure.

In the evening, I decided to address the issue of recoding the user profile editor. I grabbed the new user object which holds a property bag of all profile information (it wraps the .NET profile bag and simplifies read/write operations). I reckon recoding this took me less than half an hour to code and test (no baby on lap though).

 

Here’s my evaluation of the tool:

  1. So far, - It seems to work without flaws. During my conversion, I didn’t found any issues. Off course, this is an Alpha, and I would love to hear about others experiences with the upgrade tool.
  2. The process of upgrading your solution is around 10 steps. These steps all, except for two, seems mandatory, - and here comes my only “complaint” (I know this is being considered by the team): Why not create a single “go”-button that executes all steps? Optionally an “advanced” mode that switches into the current step-by-step mode (for those who have made significant customizations to the system). Anyways, - it’s a matter of saving 10-15 minutes.
  3. The documentation is very comprehensive: It explains each step that you go through, - in detail, with screen-shots. In addition, it explains what you should be aware of, - given your solution is highly customized, - and what you should do to solve it.

Wednesday, 23 July 2008

Sitecore upgrade strategy

Yeah, - I know it. We’re getting hammered by partners and by bloggers for not supplying an upgrade script that immediately allows you to upgrade your databases from Sitecore 5 to Sitecore 6.

Allow me to explain why: With the latest release of Sitecore 6, we have spent thousands of hours testing the system in order to ensure maximum quality and optimal experiences for our customers. Naturally this should also apply to everything else we do; for example marketing material, documentation, training… And upgrade frameworks!

A dedicated team, lead by Kim Hornung has been working several months to define a strategy for future product upgrades. This internal framework consists of several elements that should make upgrade as painless as possible.

 

CMS 6 database conversion tool

The Sitecore 6 database conversion tool will make it possible to upgrade your Sitecore 5.3.1 database and data structure to Sitecore 6. It even takes into regards the major changes that come with the removal of masters and the introduction of branches. Here’s an overview of what the tool does:

  1. Upgrades database schemas: Upgrades your SQL database schemas to the new format (indexes, new tables etc).
  2. Converts your user security to .NET security.
  3. Migrates and overrides your data structure model, e.g. converts masters into branches.
  4. Moves your data from old structure to the new database structure and converts media links into new dynamic link types.
  5. Runs the update package: Deletes obsolete data (for example, removes obsolete field types) and adds new data.

The update package is very interesting in this respect: While this new tool was primarily designed for upgrading minor versions (e.g. 5.3.1.15 to 5.3.1.16 or even 5.2. to 5.3), we also utilizes some of the features to remove obsolete items, fields from the recently upgraded database. In this Sitecore 6 update it basically means that it will clean up your upgraded Sitecore and updates your system templates.

 

Update package tools

The update package tools consist of an update package generator and an update installation wizard.

Update package generator

Some of you have might have noticed that it’s possible to serialize your item structure to text (files) in the latest Sitecore 6 edition. The update package generator differentiates two serialized structures and compiles it into a package of items, fields and field values that has been added, modified or deleted. In addition, it does the same to the physical files structures. It even differentiates on field level and contents level (was the old value the same as the new value?).

Update installation wizard

As explained, the update package consist of new items and deleted items, new, modified and deleted files, and a list of expected values. The installation wizard checks the expected values with the current value and either presents options to the user, or resolves potential conflicts (it is even designed to build new versions, but I’m not sure we’ll release this functionality in version 1).

This means that within the entire process of defining the Sitecore upgrade strategy, our team has built a tool that will make future minor upgrades very simple (hopefully :-)).  

340d94f00395f4df496714adefc20a01.jpg

 

Why the waiting time?

We had the choice of postponing the release of Sitecore 6, - and wait until the database conversion tool was ready. Alternatively, - and this was the approach we chose; release Sitecore 6 and let the database conversion tool follow immediately after the release.

 

Quality assurance means everything

Before we release this tool, we want to test the quality and stability, preferably on live environments. So far, I have seen this tool upgrade the Sitecore 5.3.1 starter kit (notice, we have build a brand new starter kit for Sitecore 6 that utilizes newer functions, but that’s beside the point). During the demo, it took us around 30 minutes to do a full, clean, fully functional upgrade from Sitecore 5.3.1 to Sitecore 6. It cleaned up the old field types, converted security… well everything!

The team is currently testing this with other web sites (as far as I know, even our own public web site). Hopefully, these tests fall out positively.

 

Good news, - alpha being released soon

Very soon, possible even this week, the upgrade team group will release an Alpha version of the CMS 6 DB conversion tool. It contains all the elements needed to do a 5.3.1 -> 6 update, but needs the polish that makes it into a full flying conversion tool (interface looks like something I could have designed, and the upgrade flow leads to a lot of unnecessary steps).

But this is the tool that took our Starter kit 5.3.1 to Sitecore 6 in just 30 minutes (bear in mind, it was done by someone who knew what each step meant; you guys should expect additional time to read the documentation).

Also expect, if your solution is not using only XSLT controls, that some recompilation of your project may be required. You should also expect to spend time optimizing your code and use correct methods instead of deprecated methods. Finally, if you have extended the existing security model, this must be rebuilt as Sitecore 6 is based on the .NET security model.

 

Other interesting topics and blogs

Monday, 07 April 2008

Task Manager as Shared Source

I want to support the Shared Source initiative too, and have therefore decided to upload and share the Task Manager for Sitecore.

If you just want to use it in your Sitecore application, download it from the project room for the task manager application: http://trac.sitecore.net/TaskManager.

 

So, what can you use it for?

You can start the task manager directly from your task bar on your Sitecore desktop. It’ll show you all job processes of Sitecore (background processes), with their status. For example, try do a full publish, then close the publish dialog while it’s publishing (it’s a background process, meaning this will not cancel the publishing process). The task manager will show you the publishing status, - while you can continue working with other applications such as the content editor.

fdc5ac68c77a6cdb3ae3670fb4ca1912.jpg

It’s also possible to use it as a traditional performance monitor. Why is this cool? It’s cool, because you can start a task manager on an application outside your firewall, - without any other access than http requests.

b76406b5d383e1910268616813ddefd5.jpg

 

Help me here

I REALLY would like some to help me clean up in this installation. A few years ago, I built this application as a POC on the capabilities on Sheer UI, and have recently changed part of the architecture to support multiple users on the same process collection unit. But I have not cleaned up the source in any significant way.

Drop me a mail, ln at Sitecore.net, to join the Task Manager Project group.

Wednesday, 26 March 2008

New Zealand too!

Last week, Alistair from Australia did release a movie around his amazing Revolver module. Apparently, New Zealand doesn’t want to hold back on cool stuff either.

Have a look at James Fraser’s blog post about displaying multiple validation results in the Sitecore Content Manager.

I’m definitely going to put these two blogs on my watch list.

ANZ rules!

09:45 Posted in Sitecore | Permalink | Comments (0) | Email this | Tags: Sitecore, ANZ

Monday, 17 March 2008

Boing! I’m flabbergasted

I’ve always considered myself as a bit of a nerd. I guess this is something that comes with the territory when you can’t help code something like full-blown Task manager for Sitecore or can go into infinite happiness loop over long lost, newfound generics.

Well, I must now redefine myself:  I’m not a tech-freak. Not at all! What I’ve done in the past seems to pale in comparison to what Alistair from Australia decided to do.

 

I wrote a full-blown task manager for Sitecore in XAML/Ajax. Alistair has decided to set up the bar by writing a full working command prompt system, - ALSO using XAML/Ajax. But not just that, his commands are working directly on the Sitecore data structure allowing you to search, filter and manipulate items exactly the same way you would do it in your Windows command prompt.

ff2a832fd4f79220866a629f6a72f974.jpg

 

What’s this? Is it DOS? Is it PowerShell? No, it’s Revolver

Tuesday, 04 March 2008

Shared Source - revisited

As some of you might know, - my job in Sitecore has been slightly redefined. I’m now VP, Technical Marketing. Basically I will still be working hard on whatever I’ve done recently, but will slowly move into the more strategic and technical marketing direction.

This doesn’t mean you will start seeing less technical blog posts here. I will have to keep up my tech skills, - and perhaps it will be so even more. But it means that Sitecore will strengthen our profile in regards developers.

 

So, what have we been doing so far?

Xpress: First, - around 3 weeks ago, we launched Sitecore Xpress Personal Developer Edition. This product, - as most of you know is free for developers to use for their personal web site, - or if they want to build a personal web site for somebody else. You can find more information about the product here: http://xpress.sitecore.net. Go ahead, - download it and get a free full working Sitecore!

 

Shared Source revisited: Next, - yesterday, we launched the next step in building a strong developers community. The previously (free) shared source modules that were maintained by Sitecore only, has been converted into real shared source projects. This meant that everybody who wants to can contribute to existing modules, share code, build new projects, branch existing modules into a new direction etc. They can also build work groups, track changes or use any of the other tools Sitecore provide to get the community going. Jimmie Overby is our shared source coordinator, - and I’m sure you can get much more information from his blog http://sharesitecore.wordpress.com or from our “how to contribute” on Sitecore Developer Network: http://sdn.sitecore.net/Resources/Shared%20Source/Contrib....

This is great news, - and extra great because we also see other partners, and their commercial modules moving into same direction with sharing the source. http://mcore.wordpress.com/2008/02/26/6/.

 

Now, what other initiatives do we have?

MVP program: We still have the Most Valuable Professional program running (MVP). This program is built to recognize developers who adds a bit extra effort in either blogging, - or doing other cool technical achievements in regards to Sitecore. It’s a yearly award… I’ll make sure to publicize some information about the program soon on our developer network.

 

Crestone Beta: Finally we’re giving developers and Sitecore partners a chance to join the closed Sitecore Crestone Beta program. As only a limited number of beta testers will be allowed to participate, and they will need to be various profiles, not everybody will be selected for the program. But, - if you think this is something for you, - go to the Beta Program invitation page on our developer network, and fill out the application form: http://sdn.sitecore.net/crestone.aspx.

 

So, what’s in future?

Modules strategies: Along with the shared source modules, - we need to build a strong strategy for how developers can share modules, - or how partners can contribute to the Sitecore portfolio of products. Over the next 2-3 months I will spend some time focusing on this.

 

Developer Network, version 2: We also need to have a look at our developer network. It badly lacks features and cool search capabilities. Sounds simple? It’s not… We need to coordinate with the documentation team, - re-organizing the more than 5000 articles and pieces on SDN, - re-categorize them etc. Building the site is the easy part, - not so for the content. I think this will be something we’ll be working with over the next year. But it’s an ongoing process.

Tuesday, 05 February 2008

Blog post update

Hey everyone,

I've just updated the Blog post dictionary about Sitecore, external bloggers and internal. You'll see 6 addtions, - a few changes on RSS vs. ATOM (now all RSS), one removal.

I've also updated the Sitecore RSS pipeline on pipes.yahoo.com, meaning it now contains 32 RSS sources; all of those on my page. You can find the pipe here: http://pipes.yahoo.com/sitecore and if you like to subscribe to this pipe (instead of adding each of these on my page individually), use http://pipes.yahoo.com/pipes/pipe.run?_id=ZsFOz4a62xG9Py3....

08:10 Posted in Sitecore | Permalink | Comments (0) | Email this | Tags: Sitecore, RSS, Pipes

All the posts