Runi on Images and other Media

Runi Thomson, one of the core engineers of Sitecore, has started a serie of blogentries on the new improved Media Library in Sitecore 5.3. The first post can be found here and the second one here… It’s good to see Runi blogging again after a few months of silence and even more hard work on his side. 🙂

Salesmen: Let’s explain it a last time!

This post should be sent to all the salesmen which should sell Sitecore instead of other CMS’s and keep asking you why Sitecore is so unique.

What’s the main reason to buy Sitecore for my customer?
Sitecore is one of the fastest developing CMS’s in the world. It’s based on Open Standards, so it should be easily extendible. It has a user friendly management panel / client, and it’s fully webbased. The interface looks like a Microsoft Windows Vista ‘terminal’ and in the latest versions, Sitecore has the same speed as Vista has.
Other advantages for the client are the possibility to easily configure the standard amount of functions delivert at a clean installation. Next to it, Sitecore delivers Open Source solutions for extending this, already huge, amount of features.

You are talking about a GUI, what’s different between Sitecore and other AJAX GUI’s?
The Sitecore GUI – it’s called Shell – is for 90% written by Sitecore. Sitecore has actually optimised everything for their main goal: delivering a full functional client to the world which is fast enough to work with over the internet. Other GUI’s are based on third party solutions which aren’t bad, but doesn’t have the advantage Sitecore has: controlling the full process.
Maybe, I go a little bit to fast for the non-techies… I’ll give you 5 differences between Sitecore’s ‘AJAX’ GUI and another AJAX based CMS client.
1. Sitecore Shell is more user friendly(find the differences between Sitecore and Windows). Other GUI’s look like Outlook or CRM 3.0 but not one of them has also intergrated the Office 2007 look!
2. Sitecore is faster then other solutions.
3. Sitecore Shell is divided in different applications which allow Admin and Editors to work in 1 and the same screen, but with other functionality, without getting overloaded of functionality.
4. Sitecore doesn’t require Active-X components, Flash-movie or Java. It’s even so that it does work in Firefox! Without customising anything…

Sitecore is developed in .NET isn’t it? What the main advantage of this?
You can say that Sitecore is a level on top of .NET. It has the same structure as .NET. It does use the same best practices and it actually has cloned most of the architecture. Maybe that’s a little abstract. Again for the non-techies: When you will find the fucntionality StringBuilder in .NET(an options to merge lettres, figures, words, sentences, etc, which each other), you’ll find the same functionality in Sitecore, but extended for Website development.
When an engineer has worked with Microsoft products in the past, he can easily switch to Sitecore. Even when you are used to Java, Sitecore is a good way to explore the .NET world.

What about the future?
Yeah the feature. I have been talking about the fact that Sitecore has actually cloned the architecture of Microsoft. It’s so that Workflow is getting more and more important in the ‘information-worker’-world. Microsoft is about to release a new product called ‘Windows Workflow Foundation’. It does give the possibility to use Workflow on the Operating System level. Or on any higher level, as required.
Sitecore has actually cloned the same structure, which means Sitecore can be easily intergrated with Windows Workflow Foundation.
Sitecore is based on XAML/Sheer. That’s a way to create a GUI with just XML. XML is a kind of file-based database with a userdefinable structure. Microsoft is about to release XAML/Windows Presentation Foundation. Sitecore does already work over a year with it.
I can continue using Microsoft terms and products: What about Collaboration and Intergration? Is it possible to intergrate my Sharepoint-based Intranet with Sitecore? Ofcourse! Sitecore has a module for it. Delivering your content while you travel? Ever heard of InfoPath? Sitecore has it. Altough Microsoft actually thinks more in the ‘Always connected’-way. Intergration with Word has never been a problem for any CMS… This means ofcourse that Sitecore does have a module for this.

Customer question: We are working with a Service Oriented Architecture in our network. Does Sitecore fit in this design?
Yes and no? No? It can be just a stand alone product on one server without any connections to other critical or less-critical systems.
Yes, because Sitecore has webservices and Sitecore is able to use Remoting(serializing data tranfers between servers). Sitecore also has a staging module. With these three options Sitecore can fit in any (large) environment as long as experienced (CMS-)architects are involved in the implementation and deployment. As Sitecore has all of these fucntionality built-in, it won’t affect the development-time, just the deployment time.

You are just talking about architectures, SOAs, intergration and collaboration, but my/our customer want’s results, as quickly as possible.
Sitecore is currently working on easier ways for engineers to set-up Sitecore. By grouping all functionality in, for example, the brand new ‘Developer Center’, the possibility is created to setup a big environment in less then 3 days. In the past a big environment, for example, an intranet, could take 6 to 8 days, depending on the design. Again, end-users won’t actually see this Developer Studio, so it won’t hurt their experience.

For Enterprise solutions, I guess it’s better to go for Tridion, Microsoft or Open Text?
When you talk about Enterprise Content Management, most of the time people won’t realize you are actually talking about a combination of Document Management with Content Management. Like all the other names spelled above, Sitecore has document solutions. By default the solutions are just for basic file storage. But again it’s easy to extend. Most of the time you’ll see advanced DMS’s used in different companies. More then 90% of the available functionality isn’t used even it will not be used in the feature. For these situations/companies, Sitecore can be the ECMS without much customisation on developer side.

Hope the above words clears up a little. When you, the salesmen, still got some questions about Sitecore or my entry, don’t wait to post a reply!

1. Made the post more readable, sorry for my bad english…
2. Please read the comment of Lars Nielsen. He gives some extra information about the storage of the Media Content. I use the term ‘file storage’, Lars is explaining that this doesn’t mean that files are actually stored on disk.

Didn’t notice….

Sitecore 5.3 BETA is released :). Thak you Peter for opening my eyes
I’ve justd decided to leave my laptop and have a drink downstairs, but this makes it quite hard to make that decision…. Hmmzz, have to wait another 100mb till it’s available on my machine, so maybe I can get a drink now… 😀 😀

Now I really promise you guys updates this week. More then one :D. Guess this is what they call in Redmond Evangelism ;).

Screw Editor CMS Experience Part 1: Tidy up your HTML afterwards

Before some people are going to scream… You guys are all right, this is a feature implemented by Sitecore, not developed! You can see it in the API-CHM:

It uses a dll called TidyDll.dll created from the 2002-06-02 source code of HTML Tidy; see for more details about HTML Tidy. Please read the HTML files distributed with this file which have more information about Tidy.cs and TidyDll.dll.

You can find HtmlTidy-class and a Tidy-class in the System.Web.Tidy-namespace. You can easily Tidy your input this way:

string dirtyString = “<a href=’http://dirty-url’><b>Say hi to the (Dirty) world</b></a>”;
string allowedTags = “|b|i|”;
string cleanString = Sitecore.Web.Tidy.HtmlTidy.TidyHtml(dirtyString, true, true, true, allowedTags);

The comments on the classes tells e that the editor also uses this class, altough I can’t imagine CuteEditor and FCKEditor(5.3) don’t have this functionality built-in.

I guess an editor won’t be happy with you, he has just spent one and a half hour on screwing your validated XHTML. If you really want to get him pissed, check if you are in preview-mode and only tidy the stuff when you are ina live-mode.

Sitecore @ MS Partner Conference

Hi all,

What most of you already knew is that Sitecore is Gold Sponsor at the Microsoft World Wide Partner Conference which is hold in Boston, starting tomorrow, fisnihing this
Sitecore has some big plans with their presentation on MSWWPC. That’s definitelly clear!
The problems: we don’t know what the plans are! Wil 5.3 be not-MS-like: Open Source? Ever heard of Microsoft Sitecore CMS? Sitecore takes over the Microsoft Developer Evangelist-department ;)?
Other, more likely options:
– Sitecore CRM? Altough Sitecore has implemented CRM 3.0 succesfully as user/customermanagementsystem for all their Internet aplications, it’s still that it would be a ncie add-on…
– Sitecore 6? Feature versions of Sitecore get a full restyle(more Vista-like) with a huge amoutn of framework changes(as planned for SC 5.4) It could become a minor release.
– Sitecore Portal Edition. Let’s say, Sharepoint 2007 Lite. Fully based on a XAML/Sheer way of developing and designing.
– A major investments combined with a takeover?

That are the most likely options I can imagine. We know Sitecore is already working on more developer tools, that isn’t the news. It could alse be possible that notthing of above is true. In anyway it’s good for Sitecore… Publicity from all over the world! 🙂

By the way, Lars has promised on his blogthat he will post images and updates.

Altough I’m not happy that I’ve to stay in Holland, I wish Lars and the others much fun in Boston. Have a nice chat with other MS Partners and show Sitecore 5.3 to the world!

User restrictions: HTML?

Because of the hot weather, lots of ideas, opinions and experiences, aren’t able to leave my mind in a normal way. What’s normal? Figure it out how to do some stuff, create a dev-environment, start Visual Studio and SQL Server: Let’s get ready to rumble! 🙂 For some reason, I’m not able to do it at the moemnt. So I’ll just share it. Maybe you guys, readers of my blog, can pick it up.

Just released version 1 of a big Intranet, our test-team is no working on it and I’m waiting for their reports. It would be nice to see a fully filled website, with nonsense-news-bulletins from their hands…
Even before the test-tea has started testing, I had to show to 2 employees of our customer, how Sitecore is going to work for them. They were pretty excited. Easy, nice, cool, etc.
The first message they did post was soemthing like ‘Board Appointment start 15 minutes later’. They actually put this text inside an Introtext-field… The Introtext-field is an HTML-field. This because of I wanted to give them the functionality to make something bold, and use the italic button… What I didn’t want them todo was color and uppersize the text…

This actually opened my eyes. Later that day, I was talking to one of our designers. That guy, which acts to an engineer always a little strange, started the conversation to me about what kind of possibilities you should provide to the user.
For example:
– Title of an item, it used in menu’s and on it’s own page. Should it be possible for the user to make it bold? Does it affect the individual page or all menu’s?
– General content fields. Do you want to allow a user to use tables to show their data or should they use an image of a link to an Excel-sheet?
– What about copy and pasting content from Word, Powerpoint, Excel, etc?

Users can actuallt screw up the full site. The only option left is to use only text- and memo-fields. You are definitelly restricting users to much…. Or maybe? An option would be(this comes up whiel writing this posts):
– Extend the System Field-template with a field ‘Allowed Tags’
– Fill while creating zan HTML-field, what kind of tags are allowed.
– On save or maybe on retrieve, tidy the field…, creating a customised field in code is one of the best options, I guess?

Hmmzzz…. You even can look at multible configurations of the stuff above. On page X you want to do this, on page Y you want to do that…

Does anyone of you guys have the same problem? This is not only Sitecore related. This is something which comes up whenever you pprovide users access to a system… 🙂 Hope to see some reactions.

Community updates…

For everyone who didn’t know about it: The guys who ‘rule’ the Sitecore Yahoo-group, have decided to make it public, so you can use functionality like RSS-feeds.

Next to it, I’ve found another Sitecore-blog. It’s from a guy Peter J and his blog is called Usoniamdream. His first post is all about Porlets, so it could become interesting! 🙂 Altough he hasn’t post anything recently, he might will do after my post! Good luck ‘on writing’, Peter.

Update: Peter is actually one of the readers of my blog. He replied on this post and he tells there, he has updated his blog to ‘Blahgger‘ :

Have you actually filled in a valid e-mailadress?

As you sometimes just want to validate some data, and you want to make sure if the user has actually filled in just an emailadres, no other link for example. You can easily validate that using this regexp:
^(([-!#$%&’*+.\/0-9=?A-Z^_`a-z{|}~ ])+@([-!#$%&’*+/0-9=?A-Z^_`a-z{|}~ ]+\.)+[a-zA-Z]{2,6}){0,1}$
The regexp is now optional, you can also require that the user fills someting in(but he can’t leave the item then before filling something in, remember that!):
^(([-!#$%&’*+.\/0-9=?A-Z^_`a-z{|}~ ])+@([-!#$%&’*+/0-9=?A-Z^_`a-z{|}~ ]+\.)+[a-zA-Z]{2,6}){1}$

It’s simple, but usefull… By the way, the emailadres will actually validate emails in the way the RFC-standard is. Altough I won’t validatie adresses like alex@localhost.

If you want to make sure everthing works correctly with all adresses specified in the RFC-standard, use this pattern:

(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:
(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.
|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]
)*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=
[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(
?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \
x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\
[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])
*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[
\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*
))*|(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(
?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*
“(?:(?:\r\n)?[ \t])*)*\< (?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\”.
\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\
]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?
[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\
\t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F
]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]
\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()
<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@
,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?
:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\
n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?
:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[
^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()
<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\
r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x
1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[
\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^
()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(
?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r
\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(
?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:
(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\
[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:
(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \
x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”
(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*))*@(?:
(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?
[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(
?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x
00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[
([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\”.\[\]
\x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))
|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*)*\< ( ?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:
\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*
\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\
[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]
]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)
?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|
[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]
+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\
r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^(
)<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>
@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\
n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x
1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\
“\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\
n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])
)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1
F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\
]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s
*(?:(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(
?=[\[“()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*
“(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[
\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]
))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*))*
@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r
\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\\.)*\]
(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\
] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]])
)|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\”.
\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\
]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*)
*\< (?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?
:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\[\]\r\\]|\
\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\
\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.
\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\
r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t
\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\
x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([^\
[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?
:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[”
()<>@,;:\\”.\[\]]))|”(?:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?
:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x0
0-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|”(?
:[^\”\r\\]|\\.|(?:(?:\r\n)?[ \t]))*”(?:(?:\r\n)?[ \t])*))*@(?:(?
:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00-\x1F]+(?:(?:(?:\r\n)?[
\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\”.\[\] \x00
-\x1F]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[“()<>@,;:\\”.\[\]]))|\[([
^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*))*

Defensive code, maintenance and updates

Since we have a full supportdesk at the office. we aren’t responsible anymore for updates, etc. So this actually means we just have tpo focus ourself on just development. Sometimes the suportdesk passes a small problem or site update to us tru. In these causes we have to do the engineering, support will do the S final Sitecore updates/database updates/deployment.
For this reason we have some rules how you should defense your code. The update procedure:
– Update external sources like external databases
– Install Packages with changes in Sitecore
– Full publish Sitecore
– Place new DLLs
– Update configuration files

During this process, everything should work. No yellow errors may appear. So this means we actually always have to check if every item/configValue/field we retrieve, or expect that we should be able to retrieve, should we checked if it’s null or empty. Ofcourse this is always the best way. But when you are developing small pages, with no logic, just binding predefined field-values to label is really fast and easy.
Another thing we have to look at are the changes in templates and masters. You should definitelly track which changes are made and in which order. Sometimes is iusing different packages for templates, masters and items a good idea.

All described above should be done and known by every engineer, altough most engineers think they write defensive code. In reality you will see that writing defensive code isn’t so easy at all. Just try it. Update your development-environment with soem patches on the way described above and lookat the functionality. Is it broken after any of the steps? What did actually cause the problem?

Sitecore development 2.0

It’s been a while, but I’ve decide to write a nice post this hot sunday. It’s around the 30 degrees in Holland which doesn’t clear up your brains very efficient :P. There are clouds, the air carries has much H2o-molecules and from my head to my body, I stay sweating. Bleerrgggg ;). Had some sun this thursday, which causes me a red face and lots of jokes are made at the office(Thank you guys :)). The summer is about to start, but for me, at this moment, it may just end!
A small light at the end of the tunnel: 4 August till 11 August,you can find me in Sealand(the Dutch-one) just doing notthing, haging aroung with some friends, drinking beer, etc. Not really nerd-like, altough, it’s good for everyone to take some ‘rest’.

This post is not just about my personal problems with the incredible hot start of this summer. It’s also about Sitecore. Like you guys are used to. This post will be about a new way of development. Not a new way like changing from C# to VB.Net. No it’s more development based on experience. For the past one and a half year we have continiously been working on lots of Sitecore solutions. We’ve made design mistakes, we’ve been geniuses(genii), we’ve lost many expensive hours and we’ve created not workable datastructures. This doesn’t differ from any other project in the IT, right? We’ve decided to learn a bit from this.
With our team of (lead-)engineers, we are actually creating a kind of ‘best pratices’ on Development and CMS/Sitecore structures. We haven’t found it out for real. We don’t share them with each other, like you prefer we should share them, but this will come. No doubt.

Some of the improvements I’ve been talking about:
– Usage of own Context objects(with functions like ‘GetSiteSectionOfItem’, ‘AnchestorAtLevel’)
– Util function for default Content-actions (‘GetTitleOfItem’, which looks for the field Title else, it will display the ‘DisplayName’ or an impelementation like below)
– Default Sitecore XPath Query builders
– Taking all output of Sitecore data trough filters
For example: make an empty ‘ValidateLink’-method in a LinkUtil-class. Make sure, all links of the site, are validated by this method. When you have to change someting now, or in the feature, you just ahve to change it once.

/// <summary>
/// Get the title of a Sitecore item.
/// </summary>
/// <param name=”item”>The Sitecore item to get the title of.</param>
/// <param name=”checkDisplay”>Defines if the value in the Show title checkbox should influence the return value.</param>
/// <returns>A string containing title of the specified item or the name if no title was available. If the title should not be showed, an empty string is returned.</returns>
public static string Title(Sitecore.Data.Items.Item item, bool checkDisplay)
Sitecore.Data.Fields.CheckboxField ShowTitle = item.Fields[“Show title”];
return checkDisplay && ShowTitle != null && !ShowTitle.Checked ? String.Empty : Title(item);

/// <summary>
/// Gets the title of a Sitecore item.
/// </summary>
/// <param name=”item”>The Sitecore item to get the title of.</param>
/// <returns>A string containing title of the specified item or the name if no title was available.</returns>
public static string Title(Sitecore.Data.Items.Item item)
Sitecore.Data.Fields.Field Title = item.Fields[“Title”];
return Title != null ? Title.Value : item.Name;

The above code snap is written by one of my colleguess. He has lots of experience with MS CMS and related products(Sharepoint, CRM, etc), but Sitecore is/was new for him.

We’ve found out that /news.aspx?nid={11111111-1111-1111-1111-111111111111} is a very ugly way to show your news. A better structure would be:
http://site.ext/news/2006/06/06/item123.aspx which is linked at the ‘news-page’ which is available at http://site.ext/news.aspx. You can easily configure this by selecteding the right homeitem and defaultpath in your site.config. Another way is working with proxy-items. You can easily make a proxy item in your site-root which links to the shared(yes we use it for intra- en internet) news-content-folders. I’ll never see a GUID in any URL again(this mistake is made by me to!!!).

Some other stuff: Split your metadata(which is referred by Lookups) and your content tree. For example:
Metdata structure: /sitecore/content/[website]/meta/[category]/[lookupitem]
Website structure: /sitecore/content/[website]/home/……
Your basepath is: /sitecore/content/[website]/
Your startitem will be: /home
When you have to shwo the data of the meta-date for some reason, you can access it easily by using: http://site.ext/meta/[category]/[lookupitem].aspx. So you won’t loose your FriendlyUrls and you don’t have to explain users why they should select X from tree Y.

That’s for me a new way of development. Using our best practices, using shared knowledge. And ofcourse we’ve been upgrading from .NET 1.1 tot 2.0. But that wouldn’t effect us all before my Danish friends finally release 5.3…. 😉