Archive for October, 2007

Whose Home is Chicago: Clinton’s or Obama’s?

True Chicagoan: Clinton or Obama?Congratulations to Thom Serafin for his 5 seconds of fame (1:07-1:12) on the Today Show this morning. Thom has been mentor of mine and I have had the privilege of working with him and coaching youth football with him.

Congrats Thom!

Clinton or Obama? No comment…

Tag:

How to Speed Up Build Times With NHQG and MSBuild

I love Ayende’s Rhino projects, especially his NHibernate Query Generator (NHQG). Since on most of my active development I am use NHibernate, Castle, and Rhino.Commons trunks, I keep nhqg in a tools directory and I was using a PreBuild command to generate the query builders. This had the negative impact of always rebuilding my domain project, even if a change was only made in another project. So, here is an msbuild snippet to generate my query builders only when my NHibernate mapping files change.

<ItemGroup>
 <NH-Mappings Include=“DomainQuery***.hbm.xml” />
</ItemGroup>
<Target Name=“BeforeBuild”
 Inputs=“@(NH-Mappings)”
 Outputs=“@(NH-Mappings -> ‘%(RelativeDir)Generated%(Filename).cs’)”>
  <Exec Command=“$(SolutionDir)..toolsnhqgNHQG.exe /lang:cs /files:%22$(ProjectDir)DomainQuery*.hbm.xml%22 /out:%22$(ProjectDir)DomainQueryGenerated%22″ />
</Target>

The Inputs and Ouputs of the Target is what allows msbuild to conditionally run the task. I use an msbuild transform to convert my mapping file name into the nhqg generated file name. Also, notice the %22 in command. This is the only way I could figure out how to pass quotes to a cmd inside of msbuild.

And the confirmation…

Target BeforeBuild:
  Skipping target "BeforeBuild" because all output files are up-to-date with respect to the input files.
  Input files: DomainQueryPost.hbm.xml;DomainQueryContributor.hbm.xml;DomainQueryTag.hbm.xml;DomainQueryItem.hbm.xml;DomainQueryBlog.hbm.xml;DomainQueryTagStat.hbm.xml
  Output files: DomainQueryGeneratedItem.hbm.cs;DomainQueryGeneratedTagStat.hbm.cs;DomainQueryGeneratedContributor.hbm.cs;DomainQueryGeneratedBlog.hbm.cs;DomainQueryGeneratedPost.hbm.cs;DomainQueryGeneratedTag.hbm.cs

Happy Building ;)

Tags: , , , ,

How Do Your Projects Go?

project

Tag:

Local and UTC Dates in NHibernate

How do you get a UTC datetime hydrated from NHibernate? Dan Morphis addressed this a while ago with an interceptor.

I proposed a patch to NHibernate that adds UtcDateTime and LocalDateTime data types that will specifically get hydrated with the proper DateTimeKind value instead of DateTimeKind.Unspecified.

Usage
<property name="MyDate" type="UtcDateTime"></property>
<property name="LocalDate" type="LocalDateTime"></property>

You download the patch from Jira, and vote for it if you like it.

Alt.net IS NOT Devisive

For those thinking that alt.net is negative and is divisive I remind of you David Laribee’s post several months ago about proposing the alt.net name. Now how can that mission be unclear, divisive, or negative?

If you have been doing agile, ddd, tdd, bdd, mvc, orm, ioc, di, and ci before alt.net, fantastic, so have most people in the software world. Alt.net is more than acronyms, practices, and tools. Its a mindset. Its trying help other .net community members think critically about their software and how their building it.

It is not about dictating policy, practice, or tooling. It is not about alienating people or ideas. It is about trying foster new growth within the .net community itself.

We can never be sure that the opinion we are endeavoring to stifle is a false opinion; and if we were sure, stifling it would be an evil still.
– John Stuart Mill

What is Alt.Net

I was privileged enough to attend the alt.net conference this weekend. Absolutely amazing, more on that later.

So what is alt.net, IMHO?

Alt.net is a community focused on finding practices and tools to engineer the best solution for your customer. Alt.net will challenge you to question your methodology. It will challenge you to face the fear to change. It will challenge you to question yourself, your team, your code, your tools. It will challenge you to be a better developer.

My favorite answer to many questions, I think I heard it over a 1000 times was, “it depends…” To me this phrase encapsulates everything about alt.net. As one attendee pointed out alt in the Mac world is option and that is what alt.net is about, options. How many ways are there to a skin cat? Which one is the best? “It depends”. Just give me options to skin the cat the best way for my given situation.

Tags: ,