Thursday, February 21, 2013

My favorite #likethemost features in Sitefinity 5.4 release

Some time ago, Sitefinity Team asked the community "What is your favorite improvement?" - so here is my answer. Needless to say, my favorite features in Sitefinity's latest release - 5.4 are the one that our team has requested. As the biggest Telerik internal consumer of Sitefinity, we work closely with the development team to resolve issues that we experience with the CMS and those improvements are always part of the next official release - so our clients can also benefit.

Output caching for RSS

Probably, the biggest producer of RSS feeds from all Telerik sites are We have more than 30 RSS feeds exposing various subsets of our blogs, which are used by thousands of visitors (and their RSS clients) daily. We expect this improvement to decrease the heat on our servers in terms of CPU load and database queries and in general to boost the performance of our feeds. And best of all - it's super easy to start using this option, just set one of the output cache profiles you have already created in your website:
output cache settings screen

Automatically invalidate browser cache of the theme CSS files when files were changed on the server

This is something that bothered us a lot and especially our customers. The bad news was that we have no way to work around this behavior when using css files from theme. We developed all kind of custom control for other cases - when adding resources in the master page, on the page templates or even in a single page. But when it comes to the automatically added css files from the theme - we were helpless, we had to use primitive approaches like renaming the css file or writing the css so it doesn't break if it is not invalidate right away. This present to our visitors as all kind of horrible effects - broken layout, wrong images on wrong places (because of css sprite issues), etc. Sitefinity 5.4 must put end to this and we are eager to test it. Take a look at the query string on the asset request:

Decreased and optimized the client scripts server by Sitefinity public widget

Now, we don't want to take all credits for this improvement of course the product teams are always keen on performance improvements. And our front end teams are always there to generate new ideas and suggestions. We believe that at this point of the evolution of the CMS this was the biggest bottleneck in the loading and rendering process of the pages. Especially, when a lot of the built in widgets are used on a single page. We can probably came out with a comparison between on of our public sites running on 5.3 and 5.4 once they are upgraded on production. 

Mapping external templates to a widget, created by the Module Builder

This is probably my favorite bug fix from all and I have personally requested it a while ago. It made the work with the module builder really nasty when you need something more specific (especially, in the early days when there were no child parent relationships and you had to implement it yourself). Now, it comes the best part - to remove all user controls names OpenAccessDataProvider,3FDAE414-79B2-11E2-9A1F-A30D6188709B.ascx :) 

And finally - some other goodies that we didn't requested but would love to see them in action

The precompiled widget templates

We upload our websites every two weeks on two web nodes. every improvement that boost the start up time is highly appreciated. We have an upload in the next couple of days and I can't wait to see the results. 

Sitefinity Lightning server module distributed as NuGet package

We are using Lightning internally from the first days and it is now enabled on some of the public sites we had to evaluate it for our internal needs. With the aggressive release schedule that Lightning team has, it was a struggle to always have the latest bits. We are happy to see it as a NuGet package.

The new automated testing tool part of the SDK

This will probably be in my focus are for the next quarter as we are looking for a new automated infrastructure to cover our Sitefinity 5 web assets. As you may know, this is not a trivial task since you can't just unit test your custom functionality when referring the Sitefinity assemblies. I'm going to explore all the capabilities of this tool and probably will get back with some posts on how to use it for testing your own web applications. By the way, there is an interesting webinar coming on this topic on 28 Feb that I'm going to attend. You can also subscribe on 

Congrats to the Sitefinity Team for the successful release and many thanks for the support!

Note: With the just announced Roadmap for Sitefinity 6, my  next #likethemost post should be even more exciting.

Tuesday, February 19, 2013

Building my Visual Studio workplace from scratch

I hate reinstalling my development machine, because it's tedious and boring task to make it "as it was before". I have several tools that need to install besides Visual Studio, some extensions in Visual Studio and tons of settings that I prefer than the default one. I would love to see "Upload my machine settings to account" and "Restore my settings from" options in the next Windows releases ... until then we will have to find our way through this challenge.

Visual Studio settings I always change

In the "Source control" settings, I always enable "Get latest version of item on check-out...", "Show deleted items on Source Control Explorer","Get everything when solution is opened" and disable "Attempt to automatically resolve conflicts when they are generated" - the last one can cause a lot of pain.

Additionally, I have to Configure the user tools as I don't really like the default compare and merge tools (even the new one in Visual Studio 2012). I use WinMerge for both operations so I have to add new user tools:
Extension .*; Operation Compare; Command C:\Program Files (x86)\WinMerge\WinMergeU.exe; Arguments /e /u /wl /wr /dl %6 /dr %7 %1 %2

Extension .*; Operation Merge; Command C:\Program Files (x86)\WinMerge\WinMergeU.exe;
Arguments /e /u /wl /dl %6 /dr %7 %1 %2 %4

Something else I usually do is to enable the Line numbers for all languages - not sure why by default they are on for a subset only.

Visual Studio extensions

SlowCheetah - XML Transform is an extension for building configuration transformations for your app.configs or whatever xml files you use.

Spell Checker - another extension that has saved me a lot of times. 

XAML Regions is something I already wrote about how useful could be.

And a bunch of Telerik products' extensions - JustCode, JustMock, OpenAccess, Sitefinity Thunder, etc.

I also add one external tool that executes undo operation to all pending changes that has no changes (the files has only been checked out, but no modified).
Title: Unfo fake changes;
Command %windir%\System32\cmd.exe;
Arguments /C echo y | "%ProgramFiles(x86)%\Microsoft Team Foundation Server 2010 Power Tools\TFPT.EXE" uu /recursive /noget;
Initial directory $(SolutionDir)
All credits for this tool goes to this guy

Storing your Visual Studio settings in the cloud

Recently, I found one awesome feature of JustCode - store your Visual Studio settings in the cloud (this should probably be incorporated on the logo, so everyone can see it). This saved me probably 30% of the work last time I had to pre install my PC. Just make sure to mark all settings for storing - by default some settings that are subject to intellectual property are not selected. And of course it can store your JustCode settings which is quite beneficial as well. What's even better - I can sync my settings on my work PC and on my PC so I can have unified experience no matter where I am. 

One tip that I always forget to follow - after you set up your new environment, create a new workplace in TFS, otherwise your TFS status will be scrambled - Visual Studio will think you have the latest version of the file, while the file is not on your file system at all.

With this post I hope that someone's else reinstallation will be easier and faster. Or at least will give you a tip on how to improve your current set up.

Tuesday, February 12, 2013

HOWTO: Generate C# request object for GitHub hooks

This week I needed to create a web service for synchronizing changes from GitHub repository into our internal environment. This is easily achievable using two great tools, I just came across.

First, GitHub has created - which is really awesome development tool. You can create your own bins, which exposes an endpoint for you that tracks all the requests made to it. As GitHub suggested, I added new hook (go to -> settings -> service hooks -> webhook urls) with this bin I created in This way, I received the json object that GitHub sends to the endpoint.

After I got the json object, I used another awesome tool that I'm going to keep in my bookmarks: It converts your json object to c# class definition. Much more convenient than writing all the classes from scratch.

Finally, I had to replace some variables that json2csharp identified to be of typed object (basically, because they are empty) with variables of type string. And delete some classes that were duplicates. Here is what I ended up with:

Feel free to use it out of the box or you can use my approach in case GitHub update their API in the future. I hope this will help someone else, too.

Monday, February 4, 2013

Copy and Paste made easier in Sitefinity by eVeliko

eVeliko is a Bulgarian startup company founded by a friend of mine about an year ago. Their first product Copy.Paste.Done is an extension to Sitefinity that enables copying and pasting widgets across different the whole website and even across different websites. We already tried this product internally for some of the Telerik's websites and we are really amazed. Take a look before we continue ...

As a person responsible for the websites, the feature that I like most is the extremely easy installation and deinstallation. Just one assembly added to the bin of your website and you are done. The user interface is exactly what you expect and nothing that stays on your way when you don't need it. I'm sure that non technical people will also embrace this functionality as they will not bother anymore with settings they don't know what to do with.

All front end developers which usually are the people setting the content on our websites, are also very fond of this extension. The deal is that we have to maintain quite a few Sitefinity websites and every site has hundreds or thousands of pages. We often get requests like "I want that functionality on those pages" - then we have to open two browsers side by side and copy all the properties of every widget one by one. Very tedious, cumbersome and most important error prone task. That's why we expect great performance boost, once we start using it in production.

If you have similar problem - I highly recommend at least trying eVeliko's offering. Moreover, If you really like it and it will pay its price for a day - just check out the price. Last but not least, As among the first customers of eVeliko - you will get an enterprise quality support for all kind of questions, problems, feature requests, etc. And be sure to check regularly these guys - as a "friend of eVeliko" I know that they are cooking some pretty nice stuff with a lot of energy and passion, coming soon...