January 2010 Entries
Disclaimer: This post is about the idea, not about the implementation. The implementation is crippled, not thread safe, will work only in few scenarios and only if used properly. Do not copy and blindly use this code. The problem One of unique features of Windsor is that it manages the lifecycle of objects it creates for you. What this means (among other things) is that it will dispose all disposable objects it instantiates. However to do this, it has to keep a reference to these components. Also that means...
I’m sure many of you, even those who use ReSharper on a daily basis, almost never use one of its most powerful features – live templates. I just love how with single shortcut (ctrl + alt + insert) I can go to enter, I go to Type class name, enter and I have just saved roughly 30s as compared to bare Visual Studio, but most importantly, I didn’t loose my momentum and focus. Sure it’s a small thing, but that’s how you build...
Update: Due to a regression error discovered in Windsor Factory Support Facility, we decided to act fast and provide updated package of Windsor, without the issue. Get it here. Sorry for the inconvenience.
What better way of starting a new year can there be, than fresh set of releases from Castle Project?!
Core 1.2 (with more)
Castle Core 1.2 has now its own, separate package. Since the beta few things have changed
Email sender component is now integrated with Core, so if you were using it, you now should look for it in Castle.Core.dll. The version shipped with Core...
We’re building an application to gather and compare performance metrics of various laptop configurations in given set of benchmarks. As such we’re going to start with certain set of entities, first of which will be the User. We’ll start off by defining our User entity, configuring ActiveRecord, and some basic tests. Getting started First thing’s first – we need to get ourselves a fresh version of required libraries. At this point in time I’m using the trunk version. You can get the latest binaries here. Everything I show here will work with ActiveRecord 2.1 final version though. ...
Jimmy published very interesting post about generic registration of certain partially closed types in StructureMap container. Go read the entire post first, it’s really worth it.
You’re back? OK. Jimmy uses StructureMap container in his sample, and after I saw it I immediately thought about doing the same thing in Windsor. That’s what this post is all about – how to make the following test pass:
Test
[Test]
public void Should_connect_delete_handler()
{
var container = new WindsorContainer();
container.AddFacility<HandlerFacility>();
container.Register(AllTypes.FromAssemblyContaining<DeleteCustomerCommand>()
...
We’re getting really close to new release of major Castle Project elements (Monorail 2.0, ActiveRecord 2.1, Windsor 2.1…). Coincidently I started building a small application on top of the stack, and I thought it would be a good idea to make this a “learning in the open” experience, and share my progress on this blog. This will mostly (at least initially) be a rework of Ayende’s old series, but I will update it to the latest version of the projects and try to discuss some new features as we go along. I don’t have the application ready yet....
ASP.Net MVC in Action As some of you know, I’m not a web developer. I had a short affair with webforms, which ended… quickly leaving bad taste in my mouth. However it’s hard to ignore positive buzz around Microsoft’s “other” framework for building web applications – namely ASP.NET MVC. Especially it’s hard to ignore that the buzz comes from people I know, respect and hope they know what they’re talking about. I was quite happy to see that some of these people wrote a book about this framework so...