Geeks With Blogs


Mike Nichols - SonOfNun Technology If I were the captain on a big steamboat... September 2006 Entries
When Design Decisions Aren't
I've been working exclusively alone on a project for a while and have as much liberty as any developer could hope for. I'm a blessed man. Nonetheless, I have tried to kind of "pretend" like I am working in a team environment that has regimented deadlines. This is mostly due to integrity and partly due to prevention for easy is it to constantly be researching solutions without implementing them? There was a necessary period of growth in skill sets that had to occur and while I certainly ......

Posted On Saturday, September 30, 2006 12:29 PM

Isolating NHibernate Logging
I am sure everyone else has already figured this out but thought I'd jot it down here. I wanted to isolate all messages being sent from NHibernate to its own logging file. NHibernate has lots to say during its operations and often the messages it delivers are the only way of tracking down some obsure error since sometimes the exception messages in NHibernate are...well, wanting. After poking around the forums and trying out a few methods, here is how I finally split my NHibernate logs from the rest ......

Posted On Friday, September 29, 2006 7:58 AM

NHibernate Class Mapping With Generic Parameters
I needed to implement a component that uses generic parameters. Documentation is sketchy on NHibernate so thot I'd jot it here. I *stole* an IRange implementation from someone and needed to use it for a date range within a class. <component name="DateTimeRange" class="Cei.eMerge.Common.Ra... Cei.eMerge.Common" access="field.camelcase-und... > <property name="Start" access="field.camelcase"> <column name="StartDate" not-null="true" /> </property> <property ......

Posted On Sunday, September 24, 2006 8:36 PM

NHibernate Parameters and Escaping Special Characters in HQL
I am sure I everyone else knows this by now, but I wanted to jot a note. When you are passing strings to an HQL query, it's best practice to assign those strings to a parameter (named or positional) and let HQL escape the special characters for you. So it would look like this when searching by a Name and Distinction tag on an Entity: StringBuilder queryString = new StringBuilder(); queryString.Append("from Entity e where e.Name= :name AND "); queryString.Append("e.Disti... = :distinctionTag ......

Posted On Tuesday, September 19, 2006 11:48 AM

Patterns, voicings, and rudiments
For the first 14 years of my professional life, I was a touring musician with a Master's in Music Performance in percussion. By the grace of God, I've been moved along into a fun profession of Software Development. For the most, I've been a lone ranger and have had to learn everything on my own, which is fine since I enjoy problem solving. As I've matured (ok..I am still in Beta :)) in my 'skills' - not the numbchuck kind - I've seen many parallels to music composition/arrangement and development. ......

Posted On Thursday, September 14, 2006 4:40 PM

Builds that make my eyes bleed and the assemblies that cause them
Lately, my ASP.NET 2.0 app has been taking so long to build I have been going crazy. I came across this post at ScottGu's blog that had a possible cause for suddenly long build times. I have about 20 projects, but it's hardly a massive site. I had some problems that I just kind of put up with a while ago where an older version of Iesi.Collections.dll would appear in my /bin folder of my web root and I have been running the NHibernate alpha 9that uses version of Iesi.Collections). Anyways, ......

Posted On Wednesday, September 13, 2006 9:16 AM

Validation With Bows and Arrows or With Battle Axes and Swords?
One of the things that requires a realignment in thinking when moving away from RAD development tools as a means of solving business problems into a Domain Driven approach is where to put validation and how to provide meaningful messages back to the user when something goes wrong. It seems to me that a good indicator of an anemic strategy for validating data is lots of work being done with validation controls and checks at the presentation (view) level. That doesn't mean that careful validation and ......

Posted On Tuesday, September 12, 2006 9:42 AM

I'm sure I don't get it about the ObjectDataSource control
I guess I'm confused about the ObjectDataSource control. the SqlDataSource control is a non-issue for me since I'll *never* build an app that puts a view dependency on my database schema, but I see alot about the ObjectDataSource control in the Nhibernate forum. It's been a while since I actually wrangled with the ObjectDataSource control since I didn't see what advantage trying to get it to wireup to my model this extra control would bring to the table. What is so different about simply binding ......

Posted On Monday, September 11, 2006 1:32 PM

Visitor Pattern For DataBinding ListControls with Model View Presenter
Implementing the Model-View-Presenter has been fun. I appreciate it's tendency to enforce discipline in keeping any business decisions out of the View layer. I was always bewildered when I would read that the business logic should be separated from the 'code-behind' source and then see millions of DataSet examples where that was tons of business logic embedded in Web Pages. However, trying to separate the presentation logic away and keep the client as dumb as possible presents (forgive the pun) some ......

Posted On Saturday, September 9, 2006 10:30 PM

Messaging Pattern Encapsulating Exceptions From Domain
Sergio Bossa has a nifty proposition for handling Specification failures during the course of operations in the Domain layer and propogating those messages up the layers thru the Service layer at http://sbtourist.blogspot.c... The basic idea is to collect Specification errors into a collection within a Notification inside a custom exception. I had considered this, but was frankly trying to avoid throwing exceptions for these kinds of things. But since ......

Posted On Wednesday, September 6, 2006 5:43 AM

Domain Validation Considerations
I have an Aggregate called Person that has a method called AddAddress which accepts an IAddress invariant to (hopefully) be added to the Person.Addresses collection. Within the method body of AddAddress, I am invoking a Command object that goes down a list of Specifications and if all are passed, then the address is added to the collection. So far so good. Now, i am calling this method from my Service layer and am expecting an IAddress object in return. If it fails, what is the best way of communicating ......

Posted On Tuesday, September 5, 2006 12:59 PM

Wintellect's PowerCollections come thru again
While trying to tighten down access to invariants within an Aggregate, I'd like to make the exposed collections ReadOnly. Then I control the addition of child objects thru exposed methods, thus enforcing the Aggregate's role as gatekeeper for these objects. The problem is, I am mapping NHibernate to my fields which implement IList which, of course, allow .Add(T entity) and casting to an ReadOnlyCollection in the exposed property isn't going to work. So I poked around the Algorithms utility class ......

Posted On Friday, September 1, 2006 11:09 AM

Copyright © Mike Nichols | Powered by: