Tim Murphy's .NET Software Architecture Blog

March 2011 Entries

Alternate OOXML Document Generation Approach

Eric White has put out a document generation example which uses XPath and Word Content Controls.  I applaud Eric for the amount of work he has done with his exploration of different ways to perform template base generation.  This is a subject that is challenging and we need as many ideas as we can get.  There are a couple of areas that I see room for improvement in this XPath design that I would like to bring up. 

The first is that Eric has chosen to put his document generation in the document itself.  I see this as a maintenance and reusability issue.  Architecturally I would prefer to have my code external to the document so that I can write and maintain it centrally in a generic fashion and tie it to a rules engine.

Another place I see that this approach falls down is that it is good for simple text replacement, but it doesn’t handle formatting, replacing images or working with charts.  This doesn’t mean that it can’t handle them, but I think it would lose the simplicity which looks to be it’s appeal.

Lastly, Content Controls are currently a Word only feature.  It would be great if we could come up with a mark-up technique that was universal to all Office document types.  Hey, we can dream, right?

Personally, I prefer a more meta data driven approach based on my experience with solutions which had output that was more marketing material quality.  That being said, but approach is an interesting idea to add to the design arsenal.  Thanks for the thoughts Eric.

Linq to SQL and Linq to SQL classes

While I have been using Linq to Object for a couple of years now I had not investigated Linq to SQL up to this point.  I figured I would put together my take on this technology’s use.

Linq is a wonderful syntax for navigating an object graph without having to walk the graph object by object and member by member.  It is concise and compact but for someone who has never seen its syntax you would swear you went from reading English to obscure mathematic notation.  If you want to learn about the general structure of Linq go here.

In my opinion Linq to SQL feels like we are going back to datasets.  You can end up with code that is tightly bound to the database.  While you can abstract this by creating your own table classes instead of letting the SQL Class designer do it for you, but I don’t see most people doing that.  If you follow the tutorials your classes also directly reflect the structure of the database.  My thinking is that you are better off using one of the recognized ORM frameworks and if you happen to have a significant resulting object graph that you then use Linq to Object to navigate to a specific point in the graph.

In the end I plan to investigate this technology further to make sure that my initial observations hold true.

del.icio.us Tags: ,,

Architecture Blooming In Chicago

For the last three years the Chicago Information Technology Architects Group has been the only community in the Chicago area for Software Architects, Enterprise Architects, Infrastructure Architects and Database Architects.  Suddenly this is changing.

The first change was a special interest group created by member of the Chicago .NET Users Group (CNUG).  This has just started in the last couple of months.

Now it was just announced that IASA is finally launching a Chicago chapter.  This is something that I originally had entertained and had been in talk with the organization about but never found the right group of interested leaders to get it up and running.

So what does this mean for Chicago area architects.  Mainly that there a lot more resources than we have ever had before.  I plan on getting together with leaders from each of the groups to discuss what we can all do to be server the community.

Stay tuned for more updates and be sure to get involved.

What Is INET_ATON And Why Is It In A Database

While converting some MySql databases to SQL Server I ran across this function.  Confused by the lack of hints to its purpose in the name I did what any red-blooded IT person would do…  look it up.  It turns out that this function turns the string representation of an IP address into a long integer.  What good that does I am still not sure, but here is the jist of the operation.

(octet1 * 256^3) + (octet2 * 256^2) + (octet3 * 256) + octet4

Simple enough, right?  Now for the real question.  What the heck is this function doing in the database?  My only thought is that it is faster to search an integer than a string, but to my way of thought this function has nothing to do with normal database operations and doesn’t belong.  A value like this should be converted to an integer by your business logic and passed into the database.  Your DBMS should not be concerned with IP infrastructure.  Of course that is jus my opinion and I would love to hear what others think.

del.icio.us Tags: ,,,,

March 2011 Chicago IT Arch Group Recap

This month’s meeting was outstanding.  We had a record turnout for John Sprunger’s presentation on mobile architectures.  I guess that is what happens when you put up a presentation on the most popular topic in technology.  I invite everyone to join us for next month’s event.   And while I love to see new faces it is always great to have people come back and continue the conversation.

Here are some resources from last night’s presentation.

Presentation slides


Case study

Stay tuned for information on our upcoming presentations.