NHibernate Validator Documentation released
Here is the promised documentation of NHibernate.Validator 1.0.0 Alpha1. You can download it here in different formats: html, pdf and the API via .chm
Download documentation
NHibernate FAQ Blog
A lot time ago this blog bring up to us interesting posts about NHibernate, I recommend to you have a look, there a bunch of nice HowTo’s.
Track an IP with a GUI in Visual Basic…
What can I do, I think a “no comments” would be fine :)
Source: John Papa’s blog
Integrating NHibernate.Validator with Db4o
For who isn’t familiar with NHibernate Validator: it’s a cool framework to validate objects anywhere at our applications. That’s it.
Now, how we can integrate this tool in order to validate the objects before save/update at Db4o? The answer is: very easy. You can download the code at the end of the post.
Remember you can configure NHibernate Validator using .Net Attributes or Xml files. In this case we will se how to do it using the first approach. The class Customer should look like this:

Now how to make the integration using a little helper class ? Like this:

As you see, with a little helper class we can configure the integration with only one line of code, very easy. In this line the method Initialize register before events on the Save/Update at the Db4o Core.
Now, let’s see the validation in action, the below example show the application trying to save an object with an invalid state:

So when the Save/Update is going to happen, first of all, NHibernate Validator check if the entity is into a valid state, if it’s not, an InvalidStateException is thrown, then Db4o wrap it with an EventException, so we have to unwrap the exception to recover the invalid values to display to the user. Would be nice that Db4o don’t wrap the exceptions, but this topic was discussed on this thread.
So, was easy to integrate NHibernate Validator with Db4o. Wasn’t it ?
Download the Example
Sharpen - Conversión inteligente desde Java a C#
I was waiting this release from the Db4o for long time, and the people whom folow to Db4o I think as well.
For the people that are not so familiar, Db4o run onto Java and .Net Platforms. The main development is made at Java, and then using this amazing tool: Sharpen, they make the conversion to nice C# code, although Db4o.Net is not 100% converted, the most part of it it’s.
I hope it helps !
NHibernate.Validator 1.0.0 alpha1 released
Finally you can download the first official drop of NHibernate.Validator. This project began as a port of Hibernate.Validator project, but later was growing up on features, and now has a quite different API, optimized to validate objects integrated with NHibernate and objects of any part of our application. NHibernate Validator allow us to validate objects configured using .Net attributes or nhv.xml files.
Don’t call us, we’ll call you
How does inversion of control look on a system using frameworks ?

yaml, an alternative for XML
yaml is an serialization data language, an alternative to the markup language of XML. And I think is pretty cool their use it, because really is more readable than XML. It’s focus on the simplicity. Let’s go to an example took from the reality, this is how an NHibernate mapping file should look with the yaml format:
If you use NHibernate, you know, this is too much easy to read. As you see the delimitation is made for the indentation, if you know something about languages like Python this is very familiar. Of course, this is not provided, but who knows, maybe someone want to donate some hours to the OSS and make it
Maybe a notorious disadvantage is that yaml don’t have schema. And you can guess the missing features because of that, the most important is the yaml-validation.
In the .Net world is not so popular, but in languages like Python, Php, Perl, C++ is well used. In the brand new baby of Google: Google App Engine, which the main language of the core is Python (actually right now is the only one supported) uses yaml of data definition.
XUnit 1.0 - Using ReSharper as Runner
Today I heard about this drop, that actually I was waiting for it. Time ago when this brand new project was release, we talked about it(Spanish post).
We have to remember that exist many Unit Testing frameworks, and XUnit is an special one, has many distinctive differences respect another frameworks like NUnit. Although the creator of XUnit is the same whom create NUnit, these projects are quite different. The main idea that led to creation of another new Unit testing framework for .Net was to leave some aspect that NUnit had strongly inherited from they source of inspiration: JUnit.
To run the tests with XUnit we can use different runners:
- xunit.console (included at XUnit’s binaries)
- xunit.gui (included at XUnit’s binaries)
- TestDriven (integrates with Visual Studio)
- Resharper 3.1 (integrates with Visual Studio)
Here you can see XUnit in action running into Resharper:
