codeflood logo

WeBlog 4.0.1 Released

WeBlog 4.0 and 4.0.1 have been released. Version 4.0.1 is a bugfix release, so it's recommended to use that over the 4.0 release. You'll find the Sitecore packages for various Sitecore versions on the release page at https://github.com/WeTeam/WeBlog/releases/tag/release%2F4.0.1.

No more support for Sitecore < 8.0

It's an unfortunate story, but with every release of WeBlog there are more versions of Sitecore to support. Since WeBlog 3.1 was released in early 2017 Sitecore 9 popped onto the scene, and there are now 4 minor versions of that, each requiring it's own WeBlog package. To contain the scope of the project and limit the amount of time taken to get a release out, we must limit the number of Sitecore versions which are supported. So we've had to remove the Sitecore 7.x support from the module.

Last version to support Sitecore 8.x

We have a strong desire to make WeBlog releases more frequently, and more Sitecore versions require more effort to get each release out the door. Not to mention the fracturing of the project and code to support more differences in features and APIs across such a wide variety of Sitecore versions. So for all the reasons listed just above, we've made the decision to make WeBlog 4.0.x the last version of the module to support Sitecore 8.x. The next release will only support Sitecore 9.0 and later.

Added Sitecore 9.x support

One of the most notable features of WeBlog 4.0 is support for Sitecore 9.x. There is a WeBlog Sitecore package for each minor version of the Sitecore 9.x series. In addition to consuming changes in the API and building against the correct Sitecore assembly versions, a few additional features were added through necessity.

Solr Support

Lucene support for Content Search was deprecated in Sitecore 9.2 and removed completely from the product in Sitecore 9.3. This forced the need to provide Content Search configuration for WeBlog on Solr. The Solr support has been limited to the Sitecore 9.x WeBlog packages.

Scriban workflow email action

WeBlog has long used the Extended Workflow Email Action which was originally available on the SDN, though with some modifications. This workflow action used NVelocity to process the email fields. But just like Lucene support, NVelocity has also been deprecated in Sitecore and completely removed in 9.3. This meant the WeBlog source initially couldn't build against Sitecore 9.3 due to the missing assembly.

We needed a create a new email action and bring in our own templating lanaguge to replace NVelocity. Luckily, SXA has already done the hard work for us. We chose to use the Scriban templating language as SXA does. The Scriban Email Workflow Action is available in the Sitecore 9.x WeBlog packages and you can find more detail about it at the previous link.

If you've not seen Scriban before, it's a similar language to Liquid, but a bit nicer. Here's a sample:

 just got a new comment from 

The link above details all the variables which are available in the Scriban context. We've also made the context population extensible by running it as a pipeline, so you can easily add additional variables to the context if required.

Address scalability issues

The initial work on this version of WeBlog was to address some issues that were discovered in regards to running WeBlog at scale, with 1000s of blog posts. This came about from myself having a casual chat with someone from the community who had used the module on a recent project. I already wrote a blog post about this and why you should Keep items out of your model. But in a nutshell; even though WeBlog uses Content Search, we were using custom items as our model and the return type from several methods. This meant we always had to load the items that were contained in lists returned from the methods which invoked Content Search. For low numbers of posts, you'll not really notice any issue. But if you have 8000 posts, that's 8000 items that must be loaded. And we do need to access all posts to build things like the archive component which shows a menu of posts by date.

To overcome the issue we've had to make lots of breaking changes in the WeBlog API to make use of POCO model classes, and remove the custom item types from return values. The API isn't yet completely clean, but it's in a lot better state now. And I'm glad to say the performance increased quite a bit as a result.

Conclusion

We're hoping to release WeBlog updates more frequently, in stride with Sitecore releases so we can support the latest versions of Sitecore more quickly. So although Sitecore 8.x support will end, support for the next version of Sitecore should arrive a lot quicker in the future.

Comments

Leave a comment

All fields are required.