Circles of Interest

I saw this on another blog and thought it was a neat way of showing the technologies that I am interested in or indifferent to. Positive / Core Things I care about or am interested in learning: ASP.NET MVC HTML5 / CSS3 jQuery / JavaScript DDDD / ESB / EDA / SOA / CQRS Dependency Injection Architecture Lucene Document Databases Cloud Computing Read On →

Homongous! MongoDB, NoSQL and CQRS

I’ve got what I consider to be a pretty good development stack - all the usual suspects: MVC for the front-end; data stored in SQL Server or MySQL and accessed via NHibernate with mappings using FluentNHibernate conventions; the domain model mapped to a view model using AutoMapper and a sprinkling of NInject dependency injection to tie it all together without direct dependencies. And of course it works, it’s proven - lots of people use this approach. Read On →

Blog Reboot

I decided to switch to a different blogging platform and move the (pitifully) small amount of content that I’d posted over. So, this blog is now running on WordPress instead of BlogEngine.NET. At the same time, I’ve decided to try and improve my own personal ‘brand’ and promote my skills a bit more hence the tongue-FIRMLY-in-cheek ‘Captain Codeman’ moniker. I don’t have any illusions about being a super-hero or even a super-developer although I’d hope my colleagues think I’m at least on the better-side of average. Read On →

Absolute URLs using MVC (without extension methods)

Do you need to generate absolute URLs within your MVC application? Often this will be in the form of URLs used outside of the web-browser such as those used within Atom Publishing Protocol collections or maybe links that are going to be sent out in emails. Basically, anything where the regular relative URL won’t do. A quick search of Google will turn up a number of blog posts or forum answers showing how to do this by creating extension methods for the Url helper class but really, everything that is needed is already baked into the MVC framework already … and I’ve only just realized it after using it since the CTP releases! Read On →

When to use RenderAction vs RenderPartial with ASP.NET MVC

At first glance, RenderAction and RenderPartial both do a very similar thing – they load ‘some other content’ into the view being rendered at the place they are called. Personally, I think they should be used for different scenarios so these are my thoughts on where each one should be used and why. First though, a quick recap on what they do: RenderPartial renders a control with some model passed to it. Read On →

RenderSubAction alternative to RenderAction for Sub-Controllers in MVC

The ASP.NET MVC Futures assembly contains several RenderAction extension methods for HtmlHelper to allow another action to be rendered at some point within a view. Typically, this allows each controller to handle different responsibilities rather than things being combined into the parent. So, for example, a PersonController is responsible for retrieving and assembling the model to represent a Person and pass it to the View for rendering but it should not handle Contacts – the display and CRUD operations on contacts should be handled by a ContactController and RenderAction is a convenient way to insert a list of contacts for a person into the persion display view. Read On →

NHibernate.Search using Lucene.NET Full Text Index (3)

In Part 1 we looked at how to create a full-text index of NHibernate persisted domain objects using the Lucene.NET project. Part 2 then looked at how to query the index complete with query-parsing and hit-highlighting of the results. Now that we have a full-text index there are other things that we can use it for. The easiest and most useful is probably adding a ‘similar items’ feature where the system can automatically display related items based on the text that they share in common. Read On →

NHibernate.Search using Lucene.NET Full Text Index (2)

In NHibernate.Search using Lucene.NET Full Text Index (Part 1) we looked at setting up the NHibernate.Search extension to add full-text searching of NHibernate-persisted objects. Next, we’ll look at how we can perform Google-like searches using the Lucene.NET index and some tips on displaying the results including highlighting the search-terms. Our Book class has the Title, Summary, Authors and Publisher field indexed so we’ll allow searching in any of these fields. However, if a search-term exists in the title it is probably more relevant than if it just exists in the summary so we want to give more priority to certain fields than to others. Read On →

Use Aliases to develop against SQL Server on different machines

This is a little tip that I’ve found useful when working on projects on different machines. If you have a desktop machine and separate database server then you generally wouldn’t need to have SQL server running locally - either the full version OR the SQL Express edition. So, within your app the connection string would reference the name of the server, e.g.:    The problem is of course when you checkout this code on another machine such as a laptop when working on-the-road (or just down in the basement while watching an episode of ‘Lost’ ) Read On →

NHibernate.Search using Lucene.NET Full Text Index (1)

Ayende added the NHibernate.Search last year but I’ve never seen a great deal of documentation or examples around it so hopefully this post will help others to get started with it. Basically, this addition to NHibernate brings two of the best open source libraries together - NHibernate as the Object Relational Mapper that persists your objects to a database and Lucene.NET which provides full-text indexing and query support. So how do you use it? Read On →