General
Anything that doensn't fit into a specific category
I’ve just spent the weekend at the Google offices in London, taking part in HackCamp, which was a replacement event for BarCamp which was cancelled due to problems with the venue.
I went not knowing what I’d be doing or what I’d be doing it with, and after a presentation by @themattharris on Twitter annotations at the start of the day, @JHollingworth and I decided that with an absence of good ideas it would be fun to abuse a new feature (annotations) by doing something pointless and absolutely useless to anybody, even ourselves.
Hence the idea of TwitterFS was born.
The setup
...
posted @ Sunday, June 13, 2010 4:11 PM |
Taking a brief interlude from my RavenDB series, I was doing some work on an internal project tonight with the build scripts and test-runner and I finally got bored of having to deal with un-managed SQLite dependencies with a project which other than that was platform agnostic. The problem with having un-managed dependencies in a managed project is that Visual Studio quite frankly sucks at it, you can set up certain projects (in this case the tests) to be x86 only, and remove their Any CPU configuration – but as soon as you add a new project to the...
posted @ Monday, June 07, 2010 10:44 PM |
Previous entries in the series RavenDB – What’s the difference? RavenDB & CouchDB – Simple Queries One of the recurring features present in the popular document databases is the use of map-reduce functions as the primary way to create views on the stored data. Map Reduce At this point, I could go into a long description of what map/reduce actually is but that kind of thing is available via the use of a convenient google search. The short of it is that you map some data...
posted @ Sunday, June 06, 2010 9:15 PM |
Previous entries in the series
RavenDB – What’s the difference
Once you have a number of documents in the database, you soon want to do more complex operations than simply retrieving a list of them.
Consider therefore the following and rather over-used example document:
1: {
2: title: "Another blog entry",
3: content: 'blah blah blah',
4: category: 'code',
5: author: 'robashton'
6: }
Our example...
posted @ Wednesday, June 02, 2010 8:00 AM |
What we we comparing against? One of the most oft-asked questions on Twitter, the RavenDB mailing list and other such methods of communication, is what are the differences between RavenDB and <insert currently preferred NoSql solution>. The two main contenders are probably CouchDB and MongoDB – MongoDB in particular has been gathering a lot of momentum in the .NET space recently thanks to efforts such as NoRM and such. Personally, I think that comparisons against MongoDB should stop after one question, “Is your application read or write heavy?”, comparing overall performance and functionality is completely redundant because...
posted @ Monday, May 31, 2010 5:04 PM |
The problem When a query is executed against an index in RavenDB, one of the key aspects of that query is checking the task queue to see if any tasks are currently pending against that index. It is this call that dictates whether IsStale is set as a flag on the return result from that query. When a call to WaitForNonStaleResults is made in the .NET client, the client simply makes multiple requests against the query until IsStale is found to be false, or until the WaitForNonStaleResults call times out. Thus, the client can wait until there are...
posted @ Tuesday, May 18, 2010 10:00 PM |
One of the issues I touched on in with the basic interaction with RavenDB was the awkwardness of with having to call SaveChanges in order to get the ids of entities that had been saved across the unit of work. This is not a problem new to the document db space, nor is it a problem new to any system where the domain has been mapped to any id based data store (ORMs/RDBMS/etc). I was going to cook a home brew solution specifically for my use within my projects and blog about it in order that other people could...
posted @ Sunday, May 16, 2010 9:00 AM |
Note: The interfaces have been updated since this entry was written, and there is now Linq query support built into the .NET client, I’ve updated these posts to use the LuceneQuery syntax but that’s probably not the preferred way of doing things As I mentioned in a brief entry a couple of days ago, I've been playing with RavenDB for about a week now, and mapping across an old project of mine which never got off the ground due to work and time constraints. I spent a lot of time trying to get that project to play ball...
posted @ Sunday, May 09, 2010 10:05 PM |
This week I decided to pick up Ayende's latest project - RavenDB and have a go at building an application against it.
I haven't really had chance to play with any of the latest batch of document databases, and I figured I'd find this 'newer' project more interesting than any of the well established crowd.
I'm going to do a few blog posts on the subject as I go through, but as all series need an introduction I thought I'd share some of my initial thoughts on my first steps onto this project.
RavenDB is very new, and there...
posted @ Saturday, May 08, 2010 10:31 AM |
Here is an interesting one that I posted up on Pastebin a few days ago, but has come as a surprise to anybody I've pointed it out to.
When building strongly typed fluent interfaces for any purpose, it has become increasingly common to abuse expressions in order to retrieve members with a utility like so:
myFunkyInterface.GetProperty(x=>x.SomeProperty);
This can then be used in place of magic strings and name changes can then be caught by compile time errors instead of test-time exceptions.
The lambda based GetProperty method will typically look something like this:
MemberInfo GetProperty<Tpoco, TReturn>(Expression<Func<TPoco, TReturn>> expression)
{
...
posted @ Friday, April 23, 2010 12:27 PM |
I noticed a bit of traffic coming from somewhere I didn't recognise, so I went over to check it out...
It was just ranty link bait so I won't bother linking it, but it reminded me of a stance I took a few years ago while I was still just using the MS provided frameworks and software like a good little drone...
Starting with the obvious - "We already have NBuilder and AutoFixture so what on earth do we need another one of these for? "
When I set out to write AutoPoco, the fact that there were existing projects wasn't even a consideration for...
posted @ Friday, April 09, 2010 9:37 PM |
I've added some features to AutoPoco to make it actually functional
Configuration can now be done automatically:
IGenerationSessionFactory factory = AutoPocoContainer.Configure(x =>
{
x.Conventions(c =>
{
c.UseDefaultConventions();
});
x.AddFromAssemblyContainingType<SimpleUser>();
});
As to start with, meaningful data isn't always required - just non-nulls and sensible defaults.
Collections can now be created with controlled content, for example:
mSession.List<SimpleUser>()
.Random(5)
...
posted @ Thursday, April 08, 2010 1:48 AM |
** Update: Version 0.2 Now Released**
The product of one weekend and a bank holiday's code, I wanted to simplify the way we were generating test data for our tests, and writing a class called <ObjectName>Builder with lots of permutations for overriding various properties for every single object I wanted to generate was getting tedious.
I also wanted to have a go at writing something that exposed a fluent interface that could be extended using extension methods, and combined convention with configuration to do its job in an easily configurable fashion.
Combining these two into a project was a fun thing to do,...
posted @ Tuesday, April 06, 2010 8:54 AM |
Previous entries in the series
Why we want it
Breaking it down + Themes
Views
In the last entry, we covered how and why we might want to replace existing views and partial views from the core application with our own from modules. We also covered that with this ability it was possible to add entirely new views and partial views.
However, views need actions and actions come from controllers. If we add a new view to the application and the core application does not support that path with an...
posted @ Sunday, February 14, 2010 5:17 PM |
The feedback from DDD8 has come in, in anonymous form and for the most part I'm completely overwhelmed by the positive response the talk garnered from the people who attended the talk.
However, I get the feeling my talk managed to polarise the room somewhat and I'd like to respond to those that went completely the opposite way with their responses and apologise if I went a different direction to what they expected!
Varied Demos
Okay, no defence here at all - showing you all the same website over and over again until I got around to showing the final product of the...
posted @ Tuesday, February 09, 2010 5:28 PM |
I'll be gratuitously "borrowing" a lot of material from my DDD8 slides in this post, it seemed like the right thing to do given that this series is a write-up and then continuation of that talk.
When dealing with more than one customer in the desktop market, it is customary to have a single product which is extendable through the use of plug-ins and an API, and often you can leave it up to your consumer base to write those plug-ins and add to your product in a manner they see fit.
In the web world it's a bit different, and you...
posted @ Monday, February 01, 2010 10:10 PM |
I spoke about this chestnut briefly at DDD8, and I want to start expanding on the subject.
My plan is over the next few weeks to start talking more about multi-tenancy in our web-apps, and to get everybody else doing the same - speaking to other developers after my talk I realised that we're not alone, people are working on solutions but they're just not talking about it.
By getting some dialogue going, I hope we can generate a public description of what is good and what is bad about attempting to build multi-tenant applications on top of ASP.NET MVC, and what our...
posted @ Sunday, January 31, 2010 8:16 PM |
Wow.
That was a wonderful day, and the sessions I ended up going to were:
@ICooper's session on MVC Architecture (preaching the choir but good to be re-assured)
@robashton's session on Multi-tenant ASP.NET MVC (obviously)
@holytshirt's session on Mono (Good to see this project is advancing well)
@garyshort's session on JClosure (Lovely!)
@blowdart's session on the crystal maze
The last session was interrupted constantly by the MVPs and associated crowd because Barry is leaving the UK and heading off to MS to learn...
posted @ Sunday, January 31, 2010 6:01 PM |
I can't for the life of me get this to work, and [SetCulture] appears to be working fine - so I can only assume it's a bug.
I've posted to the mailing list and started off the process of working out whether it is a bug or not, but for now - I need to have my tests running in the right culture, without any side effects on the other tests once a test has been complete.
Here is my hack to do that:
public class CultureContext : IDisposable
{
...
posted @ Friday, December 18, 2009 2:28 PM |
Developer Developer Developer Day 8 has been announced, and I'm going to propose a couple of sessions, and hopefully use one of them to talk about an open source project I've been cooking for a month or so now :)
Click here for details!
posted @ Friday, December 11, 2009 11:56 AM |
I've just had a fun evening trying to come up with a half-suitable solution for this problem and thought it worth documenting here although my next entry isn't due for a couple of days.
As previously mentioned, we run a legacy classic ASP system for most of our clients and we're in the process of writing a replacement system in .NET.
This week we finished the user acceptance testing on the first deployable .NET application - a small interface built as a replacement for a small portion of that classic ASP system and needed therefore to build it to a live server.
The...
posted @ Wednesday, October 28, 2009 11:32 PM |