CQRS - erm OOP and Validations

João P. Bragança
A discussion came up recently on the DDD/CQRS forums recently, that got sidetracked into ‘where do the validations go’ (along with a lot of weird nonsense about async command queues, http status code pedantry, etc, but we’ll leave that for some other time). A large minority of developers - perhaps even a majority - seem to think that validations belong somewhere in the ‘trusted’ client. I find this conclusion strange, as none of the .

Sharepoint Enterprise Captain’s Log, Stardate 233284.98

João P. Bragança

Unlocking the Key in Navision So We Can Apply CQRS

João P. Bragança
The Soap Box Part We’ve heard this before, but it bears repeating: CQRS is not just for greenfield event-sourced ddd systems. It can apply to crappy brownfield systems too. It may even have more relevance there. Let’s take the penultimate brownfield system, an ERP system. In particular, Navision. Navision has a fantastic interface for interacting with it (snipped for brevity): public interface SalesPrice_Port { Read_Result Read(Read request); ReadMultiple_Result ReadMultiple(ReadMultiple request); Create_Result Create(Create request); Update_Result Update(Update request); Delete_Result Delete(Delete request); } In other words, a 100% behavior free SQL-like interface that isn’t sql because you have Create / Read instead of INSERT / SELECT.

C# A Quanta of Bad Design

João P. Bragança
This bit me in the ass yesterday. 0m.Equals(0.0m) but 0m.ToString().Equals(0.0m.ToString()).Equals(false)

Scrum in Under Ten Minutes

João P. Bragança
Great video explaining Scrum in under ten minutes! And it’s not just for developers either.

Automatic Exception Reporting with YouTrack and Nancy pt. 2: Bouncing Off the Green Monster

João P. Bragança
In Part 1 of this series we looked at putting NancyFX as a simple http wrapper in front of YouTrack. Now we’re going to make it more RESTful - i.e. we will display the error page to the user agent and include the exception report form on that page. We will do this by leveraging Nancy’s status code handling features. This will allow us to intercept any status code we want and modify the response.

Automatic Exception Reporting with YouTrack and Nancy pt. 1: The Skeleton

João P. Bragança
Getting the business users to try and recreate a bug is difficult to say the least. They may not remember what it is they did to reproduce. But you can bet that if you don’t fix it by yesterday you’re gonna get an earful. In fact we just did. This is me doing something about it :) Turns out this is annoyingly easy with Nancy and the YouTrackSharp library, so easy that I’m not going to bother test driving this.

Displaying the Current Sprint in YouTrack for Your Boss

João P. Bragança
Here where I work we use YouTrack for issue tracking. We have a small team, it’s easy to use and free. We’re also trying to get the business side more involved with what we’re doing - to know that we’re not just talking to ourselves / the keyboard all day. Unfortunately the default search leaves much to be desired. Really what I want to show is all current features without subtasks (too noisy) AND any ‘orphaned’ tasks, bugs etc.

Empty Project - Nancy vs MVC4

João P. Bragança
I just installed the Nancy Templates for Visual Studio for Visual Studio. Before this, creating a project for Nancy has always been a bit of a pain - adding a mvc project and then removing a whole bunch of crap you don’t need. Way too much fiddlery required. What really got me was the minimalistic set of dependencies: Nine is a good number. Compare that to an empty MVC4 project:Seventeen is very inauspicious.

MVC4 Cache Con-trolling

João P. Bragança
All I want to do is cache something for one day. MVC4 is seriously trolling me today: public override void ExecuteResult(ControllerContext context) { context.HttpContext.Response.OutputStream.Write(contents, 0, contents.Length); context.HttpContext.Response.ContentType = contentType; context.HttpContext.Response.Headers.Set("Cache-Control", "public, max-age=86400"); context.HttpContext.Response.Headers.Set("Expires", DateTime.UtcNow.AddDays(1).ToString("r")); } And the response? Cache-Control:private Content-Length:30262 Content-Type:image Date:Tue, 28 May 2013 22:18:07 GMT Expires:Wed, 29 May 2013 22:18:07 GMT ARRRRRGH. I don’t know why people who develop on the microsoft default stack put up with crap like this.