enjoy!
enjoy!
Question. Why didn't you use NServiceBus as your "Gate"? I think you could come up with that instead of a homemade bus. People will feel more "safe" about using it.
That's just my opinion.
The other question. Looking at your projects' structure... What's the motivation behind having an .Interface project? Are these the classes that will be exposed (think of an API) to the "world" for each Bounded Context?
I totally see the point on the KISS approach, but NServiceBus really offers a lot of good functionality. If i were you, i would've created several samples. This one you're offering, one with a NServiceBus approach, another one with a WCF approach, etc. After all it shouldn't be too hard. It's just add features.
One thing i like is that you have taken the time to write some comments to describe what's going on. In the lack of proper documentation, this fits perfectly fine. One thing you can do, which i think is very smart from microsoft CQRS Journey, is to create a PDF where you explain step by step what's going on. I can help you if you need help. The community will love it. I like Microsoft Journey but just the fact that they are SO (obviously) tied to Azure, makes me put it aside.
There is another "framework". Something called Skritchy or something like that. I don't think is ready for corporate applications but he created a video where he shows very simply how to start off using his libraries. Pretty cool and ingenious. Sometimes a video is WAY better than any book. Like you said... Keep It Simple.
One more question... are all those attributes just to make it easier to register those classes using windsor? Because other than that i don't get it.
container.Register(Classes.FromAssemblyInDirectory(new AssemblyFilter(HttpRuntime.BinDirectory)) .Where(t => t.IsComponentLifestyle(ComponentLifestyle.Singleton)) .StartIfNecessary() .WithServiceAllInterfaces() .WithServiceSelf() .LifestyleSingleton() );
public void Run<T>(T command) { // Transaction\Commit\Container CommadnHandler decorators are loaded by default <== THIS IS WHERE I SEE SOME MAGIC ICommandHandler<T> handler = Factory.Create<T>(); //You can add Your own capabilities here: dependency injection, security, transaction management, logging, profiling, spying, storing commands, etc handler.Handle(command); //You can add Your own capabilities here }
public ISession CurrentSession { get { return _perRequestSessionFactory.Create(); } }