Sep 26 2008

Snippets 1.1 released

Category: Applications | My Software | .NetRory Primrose @ 07:29

I have updated my Snippets BlogEngine.Net extension to have better handling of html tags. Fragments are now only injected into the contents of html tags rather than their definitions. The contents of anchor tags are skipped if the fragment itself contains an anchor tag.

You can grab the latest version from here.

Tags: ,

Sep 25 2008

Moblog is online

Category: Applications | IT RelatedRory Primrose @ 17:48

I have no idea why, but today I just thought that I should look at a moblog. The option seems to suddenly be open to me now that I have a phone with a decent data plan. Because I know Grant has a moblog, I quickly searched his site and came across this post. I started to get my head around how each piece of the puzzle fits together and did some reading. Funnily enough, the process was hampered a little bit because I missed a critical tidbit of information.

image

I knew that Flickr was in the mix somewhere, but it didn't register that this was the part that took the email and turned it into a blog post. I kept reading about how I could get from a photo store into a blog. I had a look at moblogging platforms around, but you have to pay annual subscriptions to get it working under your own domain. After I finally read Grant's post in more detail and realised the important step that Flickr plays, I thought that BlogEngine.Net would be the perfect choice.

This was really easy to set up. I put a new copy of a BlogEngine.Net site on the server and created a new website using moblog as the host header. After configuring the site, I then hooked it up with my Flickr account. After a couple of tests, I quickly had photos coming from my phone, through to Flickr via email, then pushed out to my new moblog. It really couldn't be easier.

Thanks Grant for your help in pointing me in the right direction.

You can hit it at http://moblog.neovolve.com

Tags:

Sep 25 2008

Caching should not be the source of truth

Category: Software DesignRory Primrose @ 05:44

I just read the Two Reasons You're Not Using the Cache and How To Deal With Them article on Visual Studio Magazine. Overall, I like the intention of the article which is to promote caching, but I have some issues with some of the points made.

In the article, Peter addresses two of the common reasons that cause people to not use caching. These are data being stale and losing data. There is some good advice regarding stale data. People need to determine the volatility of their data to decide on cache expiration policies. There are also some notification services that can be used to flush the cache when data stores are updated.

The article then discusses issues about losing data. This is where I don't like the guidance provided. What I can't agree with in the article is the concept of having the cache as the source of truth of the application data. The article promotes the idea of keeping application data in the cache (usually in memory) when it is created or updated and only providing that information to the back-end data store when the item is removed from the cache.

The first thing that comes to mind is that if there is a power failure, you lose your data. He mentions two things about this. Firstly, he doesn't have a solution for this (there isn't one for this design as a power failure is a power failure). Secondly, if you have a power failure, you have bigger problems.

Well, the later might be true, but that doesn't mean you should use a design that destroys data just because you do have bigger problems like a power failure. In today's world, data has an incredibly high value and needs to be treated with more respect than that. As he discusses, web farms are also difficult in scenarios where the cache is the source of truth.

In my opinion, caching is there to assist performance. That is its only job. It shouldn't be used to hold on to data that doesn't exist in a back-end data store. Caching should be a view of data stored, not represent the data store itself (even temporarily). Appropriate expiration policies need to be applied to cache data according to business requirements and data volatility. Within the confines of those policies, if the cache has data, it should serve it. If it doesn't it can be populated with data from the back-end store until it is flushed according to the expiration policies for that data.

If this simple design of cache usage is implemented, there is no risk of losing data. It gives performance as a bonus as it is able.

Tags:

Sep 19 2008

CatTagLinker 1.0 released - another BlogEngine.Net extension

Category: Applications | .NetRory Primrose @ 08:23

Yesterday, I published my Snippets extension for BlogEngine.Net. Today, I have put together another extension called CatTagLinker (suggestions on a better name are welcome :)).

With this extension, posts are automatically associated with categories and tags and pages are automatically associated with categories. The extension looks at the contents of the item and finds matches on categories and tags that are not already associated with the item. The extension also hooks into the Snippets extension and runs the check again based on the formatting that the Snippets extension applies to item contents.

The extensions can be found here and the source for CatTagLinker can be found here. This extension uses an updated version of the Snippets extension which is found in the same location.

Tags:

Sep 18 2008

Snippets 1.0 released - My first BlogEngine.Net extension

Category: ApplicationsRory Primrose @ 08:38

As part of my migration plan from Community Server to BlogEngine.Net, I wanted to have a similar functionality to Community Server snippets for blog posts. This has been a good opportunity to address some of the limitations about the Community Server version that I didn't like.

My version of snippets includes the following additional features:

  • ability to inject an html fragment rather than being restricted to a link and a description
  • ability to identify text without having to surround the text with [] characters
  • Support snippets in posts, pages and comments

This functionality gives me more flexibility. I prefer fragments as I want to inject specific html rather than a formatted value determined by the system (for example, I want target="_blank" in my snippet links). I also wanted to be able to write posts in a more fluent way (no [] required) and I get the additional benefit of snippet support for comments.

There is only one disadvantage with this design. For commenter's, there is no indication regarding the snippets that are available. However, given that brackets are not required, common usage of acronyms will still add value for comments.

The extension can be downloaded from here and source code can be viewed here. Please provide any feedback to the CodePlex site.

Tags:

Sep 10 2008

I finally got the black belt

Category: PersonalRory Primrose @ 17:40

It has taken a lot longer than expected, but I finally got my black belt this weekend.

Black belt

It has been a long road, but I am glad I have finally hit this mark. Unfortunately I now need to stop doing Taekwondo because of how my joints are going. It's been a fun ride and I will miss it.

Tags: