Skip to content

Instantly share code, notes, and snippets.

@ToJans
ToJans / AAAA_global.asax.cs
Created January 18, 2010 20:15
By referencing the MvcExtensions.DLL in an asp.net MVC app you get a decent an fully working MVC app with just a few pieces of code
// This is a preview of my future MVCExtensions release
// By referencing the MvcExtensions.DLL in an asp.net MVC app you get a decent an fully working MVC app with just a few pieces of code
// It returns a working FluentNHibernate ORM,spark viewengine with "al_a" and "al_form" html tags included
// (for removing controller dependencies from the viewmodel),
// a custom automapper and the possibility to setup custom ioc child container per view
//
// Let me know what you think
// www.corebvba.be
protected void Application_Start()
// we need macros in c#, look at the need for all the implicit operator stuff !!!
public class XLat<T>
{
public virtual T DefaultInstance { get; set; }
public virtual IList<XLatInstance<T>> XLatInstances { get; set; }
public XLat()
{
XLatInstances = new List<XLatInstance<T>>();
}
using System;
using MvcExtensions.Services;
namespace Zehnder.Kits.Core.Services.Impl
{
public class MyDomainDefinition: IDomainDefinition
{
public MyDomainDefinition() { }
@ToJans
ToJans / Address.cs
Created February 16, 2010 10:55
problem with automapping components in fluent nhibernate
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FluentNhibExample.Model.Component
{
public class Address
{
public virtual string Street { get; set; }
@ToJans
ToJans / 0.Description.txt
Created August 14, 2010 03:04
Event Driven Development POC
This is a draft for a blog article...
Please let me know what you think about it : ToJans@twitter
Currently doing a major rewrite... so it might take some time until I post on the blog
Behavioral Event Driven Development proof of concept !!!!
Introduction
I think I found the perfect match between #BDD and #CQRS !!
This is an example of a BDD script I am currently using for a customer's project
tojans@twitter
1. Download msysgit and install it:
http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.0.2-preview20100309.exe&can=2&q=
2. Make a directory for your projects "c:\projects",right click it in explorer and choose "Git Bash here"
3. Open the network folder "\\JOMMEKE\github" in explorer
4. In git bash, configure your settings:
-> git config --global user.email=xxx.yyy@zz.com
-> git config --global user.name=xxx yyy
-> git config --global core.autocrlf false
5. Clone the original repository
-> git clone file://jommeke/github/workflow
@ToJans
ToJans / AggregateRootStore.cs
Created September 1, 2010 10:16
combining CQRS, Event sourcing and BDD
using System;
using System.Collections.Generic;
using System.Linq;
namespace SimpleCQRS2.Framework.Services
{
public class AggregateRootStore : IAggregateRootStore
{
public IAggregateRoot GetAggregateRoot(Type aggregateRootType, Guid aggregateRootId)
{
@ToJans
ToJans / AppConverter.cs
Created September 3, 2010 22:14
synchronous node.js like thingy for .Net
// node for .net POC using a CQRS messagebus
// tojans@twitter
// you need the source from http://www.corebvba.be/blog/post/Winning-the-game-with-CQRSevent-sourcing-and-BDD.aspx to compile
using System;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using NetNode.Services;
@ToJans
ToJans / server.cs
Created September 17, 2010 13:05
Code snip of a CQRS app I'm currently writing...
public class Server : IAggregateRoot,IDisposable
{
public Server()
{
}
~Server()
{
Dispose();
}