Hudson buildserver for GAE projects

July 18, 2010 – 9:17 pm
I just created a Hudson buildserver for (Python-based) Google Appengine projects. Thanks to this great guide: http://www.rhonabwy.com/wp/2009/11/04/setting-up-a-python-ci-server-with-hudson/ I was able to get Hudson up-and-running for python projects. However Google Appengine requires some extra features (the Appengine SDK for example). Thanks to this guide: http://heisel.org/blog/2009/11/21/django-hudson/ I was able to use nose for my unit tests publishing the coverage results for cobertura (Hudson plugin). Now the complete picture looks somewhat like this: I've whipped up an Ubuntu 10.04 desktop VM with all the prerequisites installed: a turnkey solution. If you want a copy I'll share it with you, leave me an email below. (1,5 GB rarred download).

Google App Engine Development

May 3, 2010 – 10:31 pm
Finally, this weekend I got to some App Engine experimenting. Great chance to learn a new language, Python :). I was really amazed by how easy it is to get your first app up and running, but I'm a graphics junkie so I think I can add some value to the net by publishing this picture: It gives a short overview of the developer's context in which to operate when developing Python-based App Engine Apps. Three main tools are at the developer's disposal: the Google App Engine Launcher (download via the tutorial), a browser to run/test your apps and an IDE for writing the Python code, IDLE for example. The GAE launcer can interact with a local development server which serves the code files from a local development folder (with a subfolder for each project). Using the same app, the launcher can deploy the app to the Google Cloud where it ...

ASP.NET application reference sheet

February 28, 2010 – 3:26 pm
Last week I gave a short overview of the .NET framework for a few collegues. They mainly knew the Java platform, so I gave a global overview of the ASP.NET event/page lifecycle. Just as a reference I made a sheet as how different elements are handled in ASP.NET (modules, httphandlers, pages, user controls and the global asax). The result of my efforts can be downloaded here (2-A4 ref sheet): ASP.NET

The new development hype: CQRS

December 13, 2009 – 12:01 am
Why is everybody referring to EDA (Event Driven Architecture) as CQRS nowadays? I can say we're doing EDA in practice at Sogyo and I love the loosely coupled nature and all of this approach, but why o why do we all of a sudden need to call it CQRS in the software development world? We don't go and rebrand something like object oriented design and call it someting hypish like "domain driven design" now do we? (oh, stupid me, we did a few years ago :)). No flame intended to Greg Young, I believe he has done great work with CQRS for certain problems but come on, don't over-hype it people... Merry christmas to all for now, I'm going to enjoy my holiday. More on EDA will follow in 2010!

A general repository for datagrids in Virtual Mode

October 24, 2009 – 5:34 pm
For a series of posts in Dutch on Model Driven Development using MS DSL Tools in Visual Studio I used some code I wrote for feeding a DataGridView component in virtual mode with data. First of all, the code for the gridview itself: (pretty straightforward, I use a simple 'employee' class as datasource elements). partial class EmployeeBrowser : System.Windows.Forms.DataGridView { EmployeeRepository repository = new EmployeeRepository(); public EmployeeBrowser() : base() { this.VirtualMode = true; this.Columns.Add("Id", "Id"); this.Columns.Add("Name", "Name"); this.CellValueNeeded += new DataGridViewCellValueEventHandler(Browser_CellValueNeeded); this.RowCount = repository.Count; repository.CachefetchingStart += new EventHandler(repository_CachefetchingStart); ...

WCF pub-sub example with callback contract

October 1, 2009 – 10:51 pm
Today I produced a little demo of a pub-sub structure using callback contracts in WCF. I learned a few important lessons.First let's have a look at the servicecontract code: [ServiceContract(CallbackContract = typeof(IEventCallback))] public interface IEventsService { [OperationContract(IsOneWay = true)] void Subscribe(string name); [OperationContract(IsOneWay = true)] void NotifyAll(string eventName); } [ServiceContract] public interface IEventCallback { [OperationContract] void Notify(string eventName); } Pretty straightforward. Note the IsOneWay=true and CallbackContract settings. The implementation of the service is equally straightforward: [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode=ConcurrencyMode.Multiple)] public class EventsService : IEventsService { List callbacks = new List(); public void Subscribe(string name) { callbacks.Add(OperationContext.Current.GetCallbackChannel()); } public void NotifyAll(string s) { foreach (IEventCallback cb in callbacks) cb.Notify(s); } } Note the concurrencymode ...

Standard Logging in C# / .NET

July 30, 2009 – 10:02 pm
For a discussion with some collegues I whipped up a little reference sheet on how to implement logging using the standard System.Diagnostics.Trace class. It works out-of-the box so no extra frameworks are required.Despite my effort we went with the standard log4net way. For the ones interested in frameworkless logging, this refsheet might be handy.The sheet is available for download: wt-logging.pdf.

Domain Driven Design + Linq2SQL

July 27, 2009 – 9:42 pm
Recently I have seen some projects in which Linq2SQL is used as a databridge layer. For a customer using this framework, I have developed a PoC application demonstrating how to design applications using a domain driven strategy in combination with this framework. My conclusion: it is not possible to separate the objects entirely from the datalayer (or you will have to introduce a DTO layer between data and domain logic).In order to be able to focus on domain logic I have defined another strategy: separation of structural definition and behavioral definition of the domain classes. Using the DBML designer for structural definition it is possible to build classes-first. In order to focus on behavioral aspects of these classes (defining collaborations and responsibilities in methods), I use a set of partial classes.I compiled a one-page cheat-sheet that can be downloaded here, in combination with a demo project that can be downloaded here.

Social Networking Algorithm

June 28, 2009 – 10:53 am
As a geek / nerd I tend to get very uncomfortable in the 'social networking' scene. What site do I use for which 'friends'? How do I separate my business related contacts and profile from the more informal ones? I tended to panic and have deleted some accounts because I just could not cope.Yesterday I decided to formalise my social networking activities and I would like everybody who wants to connect to honour the following algorithm (inspired by Sheldon's friendship algorithm from the Big Bang Theory):

NHibernate mapping attributes Cheat Sheet

May 26, 2009 – 9:32 pm
NHibernate is cool, NHibernate annotations are a nice addition. A big problem I keep facing is the lack of examples and documentation. I'm a great fan of cheat sheets, so I decided to write one for the most commonly used mapping patterns. Properties, many-to-one, one-to-many, subclasses, component (value objects) mappings are presented. I work from a class diagram, showing a resulting database schema, combined with the code for the mappings on the second page. Enjoy :). Download PDF here.