.NET, ASP.NET, C#, MVC
A few weeks ago I decided to start blogging. Since my website existed for some years I chose to write my own blog engine and integrate it into the existing layout. With Oxite an open source engine built on ASP.NET MVC already exists, but it has many features I do not need, thus I started to implement a more lightweight variant.
The following features are already implemented:
- Embedding of images
- File attachments
- Search function
- Receiving and sending pingbacks
- TinyMCE, Lightbox and SyntaxHighlighter integration
- Dependency Injection using Unity
- .NET Framework 3.5
- ASP.NET MVC
- MSSQL 2005/2008 (Express)
Setting up the blog engine is quite easy. The directory 'Setup' contains a readme explaining the necessary steps.
If you have installed SQLExpress 2005 /2008, you can run the blog by hitting F5 in Visual Studio (first set 'Website' as startup project); the database already contains some test data. If you want to use an other database you can use the provided SQL scripts (also in 'Setup' directory), and adjust the connection string in Web.config.
The Core project contains the business logic. For data access the Entity Framework is utilized, encapsulated by using the Repository Pattern. The service classes use the repositories for CRUD-operations and expose the relevant methods the UI/Website needs.
The Website project contains the ASP.NET MVC based UI.
All components are instantiated by Unity. Since the application runs in a web context, the lifetime of most instances has to be limited to the duration of a web request. Here you can find some information about a custom LifetimeManager which limits the lifetime of an object to a single web request using a HTTPModule.
I did not write any documentation apart from XML-comments in the source code. So just have a look at the source. You may modify and extend it as you like.
07.02.2011: I have upgraded the blog engine to ASP.NET MVC 3.