March 19, 2007
@ 09:19 PM

Hmmm, I got some interesting feedback on my previous post which is going to force me to have another look at NHibernate, and Subsonic!

SubSonic is new to me, I had not found it until Mike Kelly blogged about it awhile back, and I honestly have not given it a lot of time.

So that being said, I will include Subsonic and a fresh look at NHibernate and Active Record in the upcoming posts!

Stay tuned...

Cheers,

Robert Porter


 
Categories: Reviews | Tools and Toys


March 19, 2007
@ 02:22 PM

I am going to insert this post ahead of the next ORM post because it plays a role in how I use ORM tools. And because my friend Mike Kelly blogged about it and it's add-ins recently here.

Lutz Roeder graciously created a program call Reflector which he gives away free of charge. He actively supports and maintains it as well. More importantly he had the forethought to make it extensible via a documented plug-in/add-in interface and the community has responded with a slew of add-ins for the product.

So what is Reflector? According to it's author it is:

Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.

And that does about sum it up, but does not do it justice. If you hail from pre .NET VB then think of it as Object Explorer on steroids. In short it is a tool that lets you spelunk into the bowels of the CLR as well as any other CLS based assembly.

You can decompile the code of any call in either C# or VB.NET and I believe some of the add-ins allow you to decompile to other languages as well.

It's small, fast, you can run it from a USB Key, (provided the .NET Framework is on the system) and it is fantastically stable and fast.

Run to your browser and add this to your toolkit. It truly is a "no brainer" addition.

Cheers,

Robert Porter


 
Categories: Reviews | Tools and Toys


March 18, 2007
@ 07:49 PM

One area most developers tend to spend a lot of time "re-inventing the wheel" in is Database Access Code. DAL (Data Access Layer) code tends to be rather painful to write and is a pain to maintain when the underlying database structure changes.

The code generators I am focusing on for this post are specifically geared towards minimizing this particular pain point. They all support multiple databases, typically MS SQL, MySQL, VistaDB and Oracle at a minimum.

Most of them also give you a choice of Frameworks, or templates, to choose from which dictate how the data access code is generated. Template driven generators offer the most flexibility, at the cost of complexity. You can use the predefined templates for most jobs but you have the ability to choose to edit or create new templates.

This way you have the maximum amount of control. There are 4 tools that I have personally used that generally fit this category. But in the interest of at least semi completeness here are a couple of lists I used as starting points when I was investigating this topic

Christopher Shain at TheServerSide.NET has this list. And Richard Hundhausen  has this list as well. Beware, at some point in the past CodeSmith was apparently freeware. That is no longer true. But a lot of web resources still list it as freeware. (If I am wrong and it is still freeware please let me know!)

The tools I have personally used or evaluated are:

At this writing, Codesmith and LLBLGen Pro are not freeware, while MyGeneration and NHibernate are. Update: NHibernate is not a code generator, it is an ORM utility. This blog post title is inaccurate since I am evaluating these tools as ORM utilities not as code generators. So I have updated the post title.

Of the 4, Codesmith and MyGeneration are my favorites. They are both template based code generators and both offer a large library of templates, both free and fee based, to select from.

NHibernate is a .NET port of the Java ORM tool called Hibernate, and is the least flexible of the tools I tried, not to mention unnecessarily (IMHO) complicated to use.

LLBLGen Pro is powerful, but I found it cumbersome and difficult to understand. And I resent paying money for things that are difficult to use, especially when they are supposed to simplify my life!

So, my choice is CodeSmith and MyGeneration, next post we will take an in depth look at each!

Cheers,

Robert Porter


 
Categories: Reviews | Tools and Toys


March 16, 2007
@ 09:23 AM

One of the things that makes developers passionate is our tools! We would, if left to our own devices, spend the rest of our lives making tools to make our job easier. Luckily some people actually get paid to perform this wonderful activity.

This post is the introductory post in what will be a very intermittent series about tools I use to do my job, what I like and dislike about them, and how they help me do the work that actually generates my income.

There are a number of other blogger's that publish various lists of tools that they use. The best example, IMHO, of this is Scott Hanselman's Ultimate Developer and Power Users Tool List for Windows.

Scott publishes a yearly version of this list, and periodically updates individual entries scattered through the year as well. It's a fantastically valuable starting point for anyone developing in the Windows environment to begin looking for recommendations for tools.

I am going to try and go more in depth on a specific tool, or set of related tools and provide some background on what I needed to accomplish, what my selection criteria were and how my experience has been.

Commercial or Open/Shared Source and everything in between are on my system and in my arsenal. I am, like most of us, sensitive to cost to some degree. I am happy to pay a fair price for a great tool. But I do have a budget (who does not) and so I tend to look for value pretty carefully.

My primary criteria tend to be results oriented, meaning I want tools that tend to do something very very well and that do not require a steep learning curve to use them effectively.

So, with all the above in mind, my next post will be on ORM tools and persistence layers, stay tuned!

Cheers,

Robert Porter


 
Categories: Programming | Tools and Toys


March 8, 2007
@ 12:54 PM

A great friend of mine has started blogging, let me revise that, he has started publicly blogging. He has been blogging behind the firewall for sometime I believe.

Mike Kelly, whom I have known for many years now, has a blog at The Eniac Papers, his premise is the ability to share "Tribal" knowledge among the community. A phrase he may not have coined but I first heard from him!

We met and first worked together at what was then First Union Bank in Raleigh North Carolina. I still recall the first time I heard Mike mention his concept of Tribal Knowledge. He had come to ask about some arcane data in a monster lookup table. When I explained what the particular data he needed was and what to use for a where clause to retrieve it he was a little non-plussed.

He looked at me with his trademark "frown of BS happening here" look. And said as near as I can recall something along the lines of "And I was supposed to know this how? Should I wait for some tribal drum signal or did someone think it might be nice to actually document this somewhere?"

Mike has always been a share the news kind of guy. We have exchanged countless emails that contain nothing more than a link to something we think the other should see or know about. I am glad to see he is blogging now and a wider audience will benefit from his experience and considerable insight.

Cheers,

Robert Porter


 
Categories: Misc | Programming | Reviews


March 2, 2007
@ 02:11 PM

J. Ambrose Little warmed my keyboard with his recent post and article "Purporting the Potence of Process" which appears in the March/April 2007 issue of CoDe Magazine.

The article takes a well written look at a topic that has long plagued developers and users alike. Where and when should validation take place?

Along the way he discusses the role of workflow in process automation and validation. His primary contention seems to be that validation is in essence contextual, meaning it should be done in the context of the specific moment in time of the objects life span.

We have all worked on systems that have validation scattered throughout the application tiers and layers. You have validation most often expressed in the database in terms of constraints and foreign key relationships.

Then there is the field level validation in the UI layer or sometimes the business layer. But I have yet to see an application where the validation logic actually mapped to the real world.

Databases make great storage repositories, but they impose a set of conditions by their very nature that don't exist in the "real world". We often hear the term impedance mismatch applied when describing ORM systems that attempt to map an inherently non object oriented structure onto an object oriented representation.

But I, and I suspect you, often find that the majority of the validation code I write, wherever it is based, is an attempt to handle the inescapable exceptions that occur when you try to impose a rigid structure on the real world.

A case in point, a system I once worked on required a first and last name value for a person. A customer actually had no first or last name, just one name. Or how about an individual that does not have a phone? A number of systems I have worked on make the assumption that everyone has a phone.

Sure there are workarounds to each of these cases, and the dozens of others that I have run into, but the fact of the matter is that to a large degree we as a profession need to rethink how we design systems, in particular how we validate and persist objects, and how we automate processes in general.

I don't know if Ambrose has the whole answer, but it is certainly worth reading his article and thinking about it!

Cheers,

Robert Porter


 
Categories: Programming