My First Impressions of Kentico 9 - part 2
Introduction
Today I would like to share my thoughts and observations on the latest version of Kentico. Especially since I recently finished upgrading my site here at Mcbeev.com. That’s right my blog is now on the latest and greatest version as you read this.
Kentico 9.0 has been released officially for about a month and a half. However, I have actually had my hands on it for much longer. Thanks to being a Kentico MVP, I was actually lucky enough to be included in some of the preview builds of 9.0 for a few months prior to release. During the beta period I was tasked with giving as much feedback as possible to the Kentico product team and I tried my best to do so. As usual I basically let them know that they knocked it out of the park with this release.
Be sure to start our reading part 1 of My First Impressions of Kentico 9.
The Easy to Miss Changes in Kentico 9 Continued
- MVC Demo Site
- As I mentioned, one of the big changes in K9 is the enhanced MVC support. To show off this support Kentico has released a new demo site written in MVC. You can find the Kentico MVC Demo site is available at GitHub.
- The MVC Demo site shows off some of the new features like MVC friendly page types, which are called Content Only Page Types. These page types are meant for holding content only and not really tying page types to page templates because that is not needed for MVC development approaches in Kentico.
- Lastly the MVC Demo Site shows that you can really fully separate the admin interface from the actual website. It also demonstrates how to handle the visual studio solution and overall locations of views, shared views, helpers, and custom code that you might have.
- Modules Improvements
- In Kentico 9 you can easily deploy private custom modules as NuGet packages. However, you can now also run custom SQL scripts before and after a module deployment. This is a huge step that was missing in Kentico 8. I have created more than just a few custom modules in my day, and not having this ability was frustrating. I’m pretty excited that it is now in the box.
- In fact I spoke on this topic quite a bit at the recent Kentico Connection conference in Brno. You can see more details on my slide deck below starting on slide 7.
- Content Staging Improvements
- The ability to group staging tasks into a change set is huge! I’m not going to recap it here because there is a great new blog post on Staging Improvements directly from Kentico.
- Scheduled Task timing fixed
- Ever wonder why your Scheduled tasks in Kentico never really run at the exact time that you thought it would? Yeah this is a real world issue that is a pain. In Kentico 9 this has been fixed. The system now calculates the next run time based on the time for which the previous run was originally scheduled. About time! (See what I did there?).
- New API Patterns
- The C# code updates in Kentico 9 have not been talked about that much so far in the official update articles. One place that developers will notice that is different than before is that Kentico is starting to introduce more interfaces in their API. I noticed this in the online marketing area of managing email marketing subscriptions.
- This new style of coding by Kentico originates from the MVC effort that Kentico has put into v9.
- The new interfaces look like:
- private readonly ISubscriptionService mSubscriptionService = Service
.Entry();
- private readonly ISubscriptionService mSubscriptionService = Service
- Performance
- There is no scientific proof to this one. However, as I have been working with Kentico 9 for the past few months I feel that overall it seems a bit snappier. This includes navigating through the UI and first request startup performance too.
The Upgrade Process
As a whole the upgrade process from Kentico 8 to 9 has not changed that much. You still need to have a very linear process that includes updating from Kentico 8.0 to 8.1 to 8.2 to 9.0 all in the right order. That hasn’t changed since the very early days of Kentico, and I don’t expect it to.
Pro Tip: Don’t forget to run the Site between each upgrade to make sure the run once package correctly updates your database objects like web parts, widgets, reports, and other system objects.
Now if you were a Kentico developer tasked with upgrading a Kentico site from version 7 to 8, you know it was not the easiest process in the world. The high level of effort on that upgrade makes sense due to the sheer amount of changes and new functionality that came with version 8. As I have now ran a few upgrades on test sites and Mcbeev.com, I can confidently state that the upgrade procedure from version 8 to version 9 is much easier and much smoother than the last upgrade. Out of all the custom code that my blog has behinds the scenes (also known as “hacks and experiments”), I really only had to change a small handful of lines of code. The upgrade wizard replaced the code it needed to and the upgrade SQL script ran without error. So nice job Kentico.
There are a few things that I have noticed in version that are worth calling out:
- Page Type specific views no more
- The automatically created views of Page Types no longer exist. Kentico MVP, Jeroen Furst, has a post on the fact that Kentico System Views have changed. I fully recommend reading it. My opinion on the subject is that recreating the views might work in some instances, but for my blog I simply wrote the join between the two or three tables I needed.
- On a side note, I am somewhat disappointed in the Kentico official response that you should use DataQuery or DocumentQuery in the API instead of these Page Type specific Views. That’s kind of a cop out. When dealing with a complex query that you already had created in a custom query repeater I highly doubt refactoring in code is the best thing to do in terms of total development effort.
- Macros
- This one actually threw me a bit. After the upgrade I noticed new macro errors in the Event Log for some very old tried and true macro parameters. Mainly the |(toint) macro parameter was erroring out all over the place. It turns out that according to the documentation, this was long ago abandoned parameter. However, it did not error in v8, but it does now in v9. The fix was to simply eliminate its use and stick with the |(default) macro parameter.
- Macro Signatures
- Make sure you resign all of your macros after the site is up and running for the first time. Use the Macro Issue Report functionality in the System application to check that there are no invalid signatures before and after you resign them all.
- Make sure your Content Staging queue is clear
- This is for larger sites with many people working on them. But this is a new wrinkle to the upgrade procedure. Basically because the Content Staging application went through a little bit of an upgrade, staging tasks that were generated in v8 won’t work correctly in v9. Therefore you need to either stage all of your tasks, or delete them all before using the Content Staging functionality in v9.
The End Result
One of the most frequent questions that I receive is: "Do I recommend upgrading?" And if you made it this far in the post, I think you could probably guess my answer. Yes! I recommend upgrading for anyone that uses Kentico. The process is fairly easy and overall the new features are worth it, especially if you are running the MVC route for your Kentico sites. So what are you waiting for go download Kentico 9 right now.