Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/page/3

A blog about technology that catches my attention (Page 3)

It's a bit like a swap-file for my brain...

10 years, 323 posts and counting

Using the htmx framework with Sitecore MVC

It's been five minutes. New JavaScript framework anybody?

I'm not much of a front-end person. While I can do JavaScript and CSS if I need to, I tend to have to spend quite a bit of time in Google remembering all the key facts. But every so often I find myself needing to do some client-side code, so anything that can make that job easier seems like an interesting idea. Recently I came across the htmx framework - which offers a way to do common AJAX-like dynamic front-end tasks with little ceremony, and pretty much zero JavaScript. So I figured I should have a hack about and see if it's of any use with the sort of "traditional" Sitecore I'm confident with...

What do you mean there are no AppDomains in modern .Net?

Moving some code to the newer frameworks needs a bit of a rethink

I was looking at writing a tool in .Net 7 the other day which would benefit from having an option to load and unload plugin extensions. Reloadable plugins could be a bit tricky in .Net 4, but doable. But that's changed dramatically in more recent framework versions, in some ways that are better and interesting.

C# .Net ~5 min. read

Sitecore, time zones and containers

Wherever it pops up, time-based stuff is tricky

To customise a very old joke, there are only two difficult issues in IT: Naming things, Time calculations, and off-by-one errors. And adding containers into the mix raises even more fun. I recently hit an issue where containerised Sitecore needed to use a different time zone to the physical servers it was hosted on. So what can be done to configure this? Here's two things that can help:

Does Bing dislike Cloudflare?

Can't say for certain, but it certainly correlates...

I started migrating my writings off WordPress and over to this GitHub Pages site towards the end of 2021. And since I've done that I've not been able to get any search coverage of this site in Bing. But suddenly it seems to be starting to work. And it's looking like it might be related to CloudFlare...

Some fun migrating a T4 Template to a Source Generator

Some pros, some cons, and a change of approach

My recent post about messing up with inheritance came out of some work to migrate some (fairly old) T4 Template code generation to .Net's newer Source Generators feature. Excluding my own mistakes, this process wasn't as easy as I'd hoped. So it seemed like a good topic to jot some notes down about, in case others are facing similar challenges...

.Net C# ~6 min. read

Adding build metadata to your .Net code

Ever wanted build-time data available at runtime?

The other day I had a scenario where I wanted to be able to display the date an app was built in its UI. While you can always fall back to a "just make that a string in your code" approach, after a bit of digging I discovered a better way. It turns out recent .Net code has some clever patterns to help with this...

.Net C# ~1 min. read

Getting tweets (and toots) as images for my blog

Because those other social platforms might not be around forever

Since the whole "Twitter's in something of a downward spiral" thing kicked off, I'd been musing over the idea that having embedded tweets in my blog might not be such a good thing long term. What happens if the mad billionaire at the helm suddenly decides that embedding tweets should be a paid feature, or the site has a long outage? The best alternative I had was to turn the tweets into images - so obviously I investigated how I could automate this. Turns out it was a fun feature to add to my blog editor...

General C# ~6 min. read

A fix for Sitecore's developer SolrCloud containers failing to find ZooKeeper

This fix may help you resolve startup issues with the internal ZooKeeper instance

A while back I wrote up some notes on a problem some people were seeing with Sitecore's SolrCloud developer container that I'd been unable to fix. It was the worst sort of technical problem, happening irregularly on some computers, but never rearing its head on others. So it's taken me a while to get around to coming up with a fix for this. But if you've suffered from the problems described in my previous post, this is an option for you:

A glimpse of the future for Sitecore Connect

An attempt at seeing into our composable future

One of the interesting announcements from last year's Symposium was Sitecore's approach to how we might join up our composable applications. They announced that they were working on "Sitecore Connect" at this event, but didn't really get into detail of what it would be outside of "we're re-badging Workato". So what is that, and what does it suggest we might get out of Connect in the future? Read on, for an attempt at working that out...

How to waste a day on an inheritance bug

Proving to myself how much I have forgotten over the years

I've been migrating a big chunk of .Net 4 code to .Net 7 recently. One of the few large changes I had to make was to replace some boilerplate generation that used T4 Templates with a Source Generator. (As T4 isn't entirely supported in latest .Net) But these work very differently, so that change involved a good chunk of work. But I messed this up in a way that caused a subtle bug. And while I may well get to writing about Source Generators later, that silly bug is also worth writing up. Even if it's just to remind me not to make the same mistake in the future...

.Net C# ~3 min. read