One of the fun things about defining objects and their APIs in C# is thinking about which bits you want your consumers to see, and which bits need to be there just for you, and consumers should avoid using. Most developers are aware of keywords like
public
/
private
and
internal
for achieving this, but Explicit Interfaces are another approach to this...
An issue that crops up fairly often in web agency work is that you have to work on code for older versions of Sitecore. Most of the time this is fine, but sometimes in between the Sitecore version getting released and you doing this work, stuff changes in Windows that makes this setup harder than it should be... This has been a challenge recently as some of my fellow developers now have Windows 11 on their laptops, and they're having to work on Sitecore 10.2 projects. And out of the box, SIF or SIA won't install in that scenario these days. Having had to help a couple of people with these issues recently, I figured it might be worth automating the fixes with some Powershell, so it's easier in the future. And maybe that automation might help you?
I was tinkering with some some code that could post to BlueSky recently, and it took me a couple of goes to make the process of submitting a message with an image work. So in case it's of any use to anyone else, here's one way it can work:
Having been in development for a long time I've come across a lot of headscratching odd behaviour in code. Those issus have lead to a fair few conversations where people have looked at the odd behaviour and asked "is it a compiler/runtime bug?". And in all these years it never has been that sort of bug. But for the first time I have recently found a situation where some odd behaviour is C#'s fault...
So here's some info about the issue I saw this time, and what Microsoft are fixing as a result:
The other day I was working on some slides for a user group presentation when I hit an issue. PowerPoint's "random slide design" tool had thrown up a style I liked and wanted to reuse. But there were things it added to the slide I could not select. And hence I couldn't see a way to copy them so different slide types could share the same look. It took me a while to work out how to sort this, so it needs writing down so I can remember for next time...
In a previous post I looked at how you can customise schema for Products in the Product Content Management feature of Content Hub. But getting data in is only half the story - how can we go about getting it back out for use elsewhere in our tech ecosystem? Well the answer is a fun combination of GraphQL and how Content Hub can serve images. Read on for my notes on one approach on configuring all of this:
There was a lot going on at SUGCON EU in Antwerp last week. A lot of great community content, the usual fun bar/corridor conversations with other attendees, and plenty of (way too much?) food. But I want to single out some of the announcements Sitecore made in their keynotes and sessions, because there's some really important stuff there for our future work on the platform.
Content Hub is a product I don't get to use too often, so I find myself digging about a bit to remember the details of some customisation and setup. So having had to do some investigations into how to customise the Product Content Management features recently I figured both myself and search engines might benefit from some notes on the subject for the future. And maybe you will too...
I've written a few things about diagnosing memory issues in Sitecore over the years, but one topic I've not covered in detail is anything around "how to spot when it's not piles of your own objects that's causing the issue". Problems like leaking handles can have an obvious link back to the custom code that you can spot fairly easily in diagnostic data. But not all memory issues do. I was discussing a possible example of this with a colleague recently, and it seemed like another thing to write down...
When I was writing about dealing with memory analysis for Sitecore recently I focused on a site running under Auzre PaaS. But what if you're working in Docker locally? A good question it turns out...