For more than a year, I've been blogging on the excellent dasBlog engine and it has been good. I really like the fact that it runs on XML instead of a database. However, it is written in ASP.NET 1.1 and is quite cumbersome to extend and that's a problem for me, because I have a lot of ideas that I cannot implement.

For the past 6 months or so, I've been thinking about building my own blog engine, but it seemed too time consuming. Then I talked to Michal Talaga and he wanted to join forces. We quickly agreed that the engine also should run on XML but do so within a provider model, so it can easily be changed to run on SQL Server, MySQL or other types of storage.

But before anything is final, we talked about what features it should have. Here is a short list of what we came up with:

  • Written entirely in C# and ASP.NET 2.0
  • Multi user support using the ASP.NET membeship provider model
  • Data store provider model
  • Small in size and source files
  • Plug 'n play implementation (just copy to web server)
  • No third-party assemblies except for FreeTextBox
  • Using ASP.NET themes and skins
  • Easy to extend using plug-ins
  • Events everywhere for plug-ins to use

Besides the development and implementation features we want to include a lot of standard Web 2.0 blog features such as:

The target user for the blog engine is not the typical Blogger or WordPress user, but .NET developers. It will be an easy extendable system if you are a .NET developer. For the not so tech savvy user, it should just be a matter of copy the files to a web server and no more.

Whenever we are done in the near future, the blog engine will be made available for download and it will be open source.

As a follow-up on my post from yesterday about generating shorter GUIDs, I’ve created a small helper class in C#. The class encodes a GUID into a 22 character long string and decodes the string back to the original GUID again.

That way you can save 10 characters from the original GUID and it is ASCII encoded so it will work perfectly in a URL as a query string or in ViewState.

It takes a standard GUID like this:

c9a646d3-9c61-4cb7-bfcd-ee2522c8f633

And converts it into this smaller string:

00amyWGct0y_ze4lIsj2Mw

using System;

public static class GuidEncoder
{
 public static string Encode(string guidText)
 {
  Guid guid = new Guid(guidText);
  return Encode(guid);
 }

 public static string Encode(Guid guid)
 {
  string enc = Convert.ToBase64String(guid.ToByteArray());
  enc = enc.Replace("/", "_");
  enc = enc.Replace("+", "-");
  return enc.Substring(0, 22);
 }

 public static Guid Decode(string encoded)
 {
  encoded = encoded.Replace("_", "/");
  encoded = encoded.Replace("-", "+");
  byte[] buffer = Convert.FromBase64String(encoded + "==");
  return new Guid(buffer);
 }
}

It basically just converts a GUID into a base64 string and shortens it a bit.