Rolling Your Own Blog Engine

Hello World
Jeff Atwood asks the question in a recent post if writing your own blog software is a form of procrastination (no, blogging is).

I remember reading something where someone equated rolling your own blog engine is the modern day equivalent of the Hello World program.  I wish I could remember where I heard that so I can give proper credit. UPDATE: Kent Sharkey reminds me that I read it on his blog. It was a quote from Scott Wigart. Thanks for the memory refresh Kent!

Obviously, as an Open Source project founder building a blog engine, I have a biased opinion on this topic (I can own up to that).  My feeling is that for most cases (not all) rolling your own blog engine is a waste of time given that there are several good open source blog engines such as Dasblog, SUB, and Subtext.

It isn’t so much that writing a rudimentary blog engine is hard.  It isn’t.  To get a basic blog engine up and running is quite easy.  The challenge lies in going beyond that basic engine.

The common complaint with these existing solutions (and motivation for rolling your own) is that they contain more features than a person needs.  Agreed.  There’s no way a blog engine designed for mass consumption is going to only have the features needed by any given individual.

However, there are a lot of features these blog engines support that you wouldn’t realize you want or need till you get your own engine up and running.  And in implementing these common features, a developer can spend a lot of time playing catch-up by reinventing the kitchen sink.  Who has that kind of time?

Why reinvent the sink, when the sink is there for the taking?

For example, let’s look at fighting comment spam.

Implementing comments on a blog is quite easy. But then you go live with your blog and suddenly you’re overwhelmed with insurance offers.  Implementing comments is easy, implementing it well takes more time.

If you are going to roll your own blog engine, at least “steal” the Subtext Akismet API library in our Subversion repositoryDasblog did.  However, even with that library, you still ought to build a UI for reporting false positives and false negatives back to Akismet etc...  Again, not difficult, but it is time consuming and it has already been done before.

Some other features that modern blog engines provide that you might not have thought about (not all are supported by Subtext yet, but by at least one of the blogs I mentioned):

  • RFC3229 with Feeds
  • BlogML - So you can get your posts in there.
  • Email to Weblog
  • Gravatars
  • Multiple Blog Support (more useful than you think)
  • Timezone Handling (for servers in other timezone)
  • Windows Live Writer support
  • Metablog API
  • Trackbacks/Pingbacks
  • Search
  • Easy Installation and Upgrade
  • XHTML Compliance
  • Live Comment Preview

My point isn’t necessarily to dissuade developers from rolling their own blog engine.  It’s fun code to write, I admit.  My point is really this (actually two points):

1. If you plan to write your own blog engine, take a good hard look at the code for existing Open Source blog engines and ask yourself if your needs wouldn’t be better served by contributing to one of these projects.  They could use your help and it gets you a lot of features for free. Just don’t use the ones you don’t need.

Jerry Maguire 2. If you still want to write your own, at least take a look at the code contained in these projects and try to avail yourself of the gems contained therein.  It’ll help you keep your wheel reinventions to a minimum.

That’s all I’m trying to say.  Help us... help you.

[ad] Free Bug Tracking & Project Management Software Axosoft’s OnTime 2007 allows software development teams to collaborate on software projects by tracking everything from defects to enhancements to helpdesk incidents in one easy-to-use database driven by an intuitive Windows, Web or VS.NET Integrated UI. Get a Free Single-User License ($200 Value!)

What others have said

Requesting Gravatar... mgroves Oct 06, 2006 9:31 PM
# re: Rolling Your Own Blog Engine
Here's one of the reasons I wrote my own blog engine: learning. I learn much better by doing than by reading someone else's code.

Though I completely agree with your article: the blog was easy as pie to get going, but difficult to do well. I'm still hoeing that road, actually. I just recently discovered Akismet--what a fantastic discovery that I wish I had known about 6 months ago when I first implemented my (awful) CAPTCHA.
Requesting Gravatar... vikram Oct 06, 2006 10:01 PM
# re: Rolling Your Own Blog Engine
HI
I created my own website when I wanted to start blogging. Yes you rae right It takes some time to get the blog(or should I say a good blog) going, but I have been able to do that in some time. Also It gives me a little more satisfaction, make my blog feel more personal.
Any way you can read my blogs here

http://www.vikramlakhotia.com
Requesting Gravatar... jayson knight Oct 07, 2006 12:04 AM
# re: Rolling Your Own Blog Engine
I'll chime in with the "Me too's"...my first blog I started 3 years ago was a homegrown solution, which was also back when RSS was little known about among other things we take for granted today.

Once I realized how much time it would take to keep up with all the nuts and bolts that are now included in most blog packages I ditched it and went with a shrinkwrapped solution...there is no way I could have kept up on my own.
Requesting Gravatar... Rob Conery Oct 07, 2006 11:49 AM
# re: Rolling Your Own Blog Engine
As time goes by and I meet more and more developers and clients, I am dumbfounded at how many times i hear "it should really be simple...". "Simple" should be a four-letter word if you ask me.

I've heard this with the CSK too, from people who couldn't grok all the providers we use. As with anything: the genius is in the details :).

So (here comed the shameless plug) if you just use SubSonic, you can get to the details straight away! :):).
Requesting Gravatar... Kent Sharkey Oct 07, 2006 12:42 PM
# re: Rolling Your Own Blog Engine
I remember reading something where someone equated rolling your own blog engine is the modern day equivalent of the Hello World program. I wish I could remember where I heard that so I can give proper credit.

At the risk of having a too large ego, perhaps Scott Swigart, via me?
Requesting Gravatar... Haacked Oct 07, 2006 2:20 PM
# re: Rolling Your Own Blog Engine
Thats's it! Thanks!
Requesting Gravatar... Henrik Oct 08, 2006 1:35 PM
# re: Rolling Your Own Blog Engine
Is there a possibility to port it to MySQL? Do you have a data-access layer that uses IDbConnection-s, or are you using SqlConnection as a part of the business logic?
Requesting Gravatar... Carl Camera Oct 09, 2006 6:34 AM
# re: Rolling Your Own Blog Engine
I think writing your own blog engine is a great idea. And the best part is that you don't have to bother with someone else's list of required features. You code it to your needs and leave the rest out. Then add more features as you need them.

And Phil, which of those three open source blog engines that you mention supports XHTML compliance? :-)
Requesting Gravatar... Haacked Oct 09, 2006 9:22 AM
# re: Rolling Your Own Blog Engine
Carl, Subtext supports XHTML 1.1 Transitional compliance, though of course it is skin dependent.
Requesting Gravatar... Carl Camera Oct 09, 2006 12:04 PM
# re: Rolling Your Own Blog Engine
Phil, 1.0 Transitional. I'm encouraged to see XHTML compliance at least listed as something on Subtext's radar. Now if we could just convince Windows Live Writer that XHTML compliance is important for blog posts. Not holding my breath.
Requesting Gravatar... Haacked Oct 09, 2006 12:12 PM
# re: Rolling Your Own Blog Engine
Whoops! Yah. I meant 1.0 Transitional. My mind is a mesh of version numbers.

Well my blog validates as 1.1 transitional for the most part. But as you point out, I often have to edit stuff that WLW posts. I submitted a feature request to have an XHTML compliance mode for WLW.

If you'd like to help Subtext be more compliant, we'd welcome any help. The hard part is that I can't own every skin, so I'm not sure which are compliant and which are not. I just know we do everything in our power to not mess up any work you do to be compliant.
Requesting Gravatar... digitallights.com Oct 10, 2006 3:53 PM
# Subtext integrated.
Subtext integrated.
Requesting Gravatar... Wiennat Oct 10, 2006 9:56 PM
# re: Rolling Your Own Blog Engine
Learning. The reason for me to use my own blogging software. I've learn many things for doing this. I studied the open source blogging software and create my own.

Henrik: SubText and Community Servers use SQL Server as data store but you can port to MySQL if you want, thank to Provider model. However, you have to develop the provider yourself since there's nobody developed it yet. If you want the alternative, consider useing SUB and DasBlog. SUB has an Access provider and DasBlog use flat file for storage.



Requesting Gravatar... Scott Oct 11, 2006 8:18 PM
# re: Rolling Your Own Blog Engine
Well my feedback would have to be that after looking for a .net blog engine to use on my site, neither of the front runners do what I really want the blog engine to do. I found a load of PHP ones that do. What I really want is one install, that accepts many users, who can post in many categories with a signature for each user at the bottom of their posts. Then somebody would be able to subscribe to a feed by either category or by author. Dasblog comes closest but with sql server sitting their unused, it's kind of frustrating. subTexts road map specifically excludes the functionality I want. So what do I do?
Roll my own?

Keep up the good work Mr Haack. I enjoy your blog immensely.
Requesting Gravatar... Haacked Oct 11, 2006 9:17 PM
# re: Rolling Your Own Blog Engine
Scott, we're actually working on implementing the Membership provider to allow multiple users per blog. If the roadmap excludes this, I need to update it.
Requesting Gravatar... Scott Oct 12, 2006 1:40 PM
# re: Rolling Your Own Blog Engine
That's very pleasing to hear! If only I had VS 2005 I might be able to find some time to contribute the code to this. I'm not sure if it was the roadmap or your documentation on the way to force .text style multi-user blogs that said that you wanted this to remain a single user blog engine. If I've mis-interpreted then my bad. What version have you penciled in membership provider for? I just read the road map again and unless I'm missing something, I can't see it.
Requesting Gravatar... Haacked Oct 12, 2006 4:34 PM
# re: Rolling Your Own Blog Engine
Oh, that was way back when. When I wrote that, I received tons of feedback and decided to stick with the multi-blog support. So we do support multiple blogs now, we just don't support multiple users per blog.

Hopefully membership will be a part of 2.0. No release date yet.
Requesting Gravatar... Al Nyveldt Apr 01, 2007 3:08 PM
# Upgrade to DasBlog
Upgrade to DasBlog
Requesting Gravatar... Taz Jun 08, 2007 12:11 PM
# re: Rolling Your Own Blog Engine
Agree with this post.

I used several blog engines in the past, some more CMS than others and finally settled on textpattern as my choice as it was free and relatively simple to setup (as well as being geared towards a designer rather than a coder).

However like all things, I found myself wondering if I could have done something better or asking why such and such feature was present/not present.

Having had a go at it I recommend writing a simple blog to anyone who wants to get into Web Development as it teaches you some fundamental concepts and you get to experience the highs and lows of dealing with the wider web related issues.

However I am at a stage now where I am looking to update my website and after much searching I have decided why reinvent the wheel when there are already some fantastic open source solutions out there.

I have gone for BlogEngine.NET due to its simplicity and also due to the fact that being a smaller code base than dasBlog and Subtext, I can more easily understand it in a short space of time and further extend the code to my liking.

Multi-Blogging is something I am interested in however I haven't found many solutions that offer such a thing, usually leaning more towards a mult-user blog engine but I think things are changing now and with people like us who are willing to invest into existing open source solutions I am sure over time we will start seeing some great additions to these already feature rich blogging engines.

Adios,

Fz
Requesting Gravatar... Crash Test Dummy Nov 22, 2007 9:57 AM
#
Upgrade to DasBlog
Requesting Gravatar... Shashi May 03, 2008 10:59 PM
# re: Rolling Your Own Blog Engine
Ya writing a blog engine is like re inventing the wheel and sometimes you endup discovering still the wooden wheel!
Requesting Gravatar... Rohan Shenoy May 11, 2008 11:48 AM
# re: Rolling Your Own Blog Engine
I created my own blog engine for following reasons:
Learning: I have learnt a lot about safety procedures while using PHP-MySQL. Prior to that, I never thought of 'validating user input'. Had, it not been my own blog engine, I would have never learnt securing PHP-MySQL applications. I am glad that I counted among the 'better' web programmers.

No frills = More security: The lesser the no. of frills, the less I have to worry about security holes and complicated vulnerabilities. After why should I keep a functionality when I don't need it.

Not harassed by spam bots: I have a wordpress blog too. But I am overwhelmed by the amount of viagra and loan spam I
receive.

What do you have to say?

(will show your gravatar)
Please add 6 and 1 and type the answer here: