NET Tiers Frustration


I hate to start with a disclaimer, but I want readers to know that I have nothing against the .NET Tiers. I feel John and team have done a great job with this open source product. The following was written in the midst of switching from the beta 2.0 version to the final version and reflects a small bit of difficulty we have had over the past day. Fortunately, it is easy enough to solve. With that being said, here is the original post:

I just recently experience a whole bunch of frustration. This is normal for me, as I play around with a lot of beta software. One day I will learn … nah, won’t happen … being on the bleeding edge pays too well.

My latest frustration has been with .NET Tiers, an open source template library for CodeSmith. Part of the issue comes from changes from beta to production, which I fully understand. Rules change as developers get deeper into code. But, some of the rules are not consistent.

Now, don’t get me wrong. .NET Tiers makes a good set of classes. There are some things I would have done different, but it has definitely saved our bacon on this project, so I am happy with the classes. The issue comes with inconsistency in naming. Before getting into the issue, let’s take a step back and look at history.

History

Have a partner company building a backend app. They inherited tables from another company and the tables are all Hungarian in nature (tUser). On our end, we have used a more .NET/SQL standard naming convention. To avoid merging right now (due to lack of bandwidth), we have junction tables that are in the form of Customer_tUser (yeah, a bit of impedance mismatch, but the tUser table should be tCustomer).

Problem

Now we get to the inconsistency part. .NET Tiers has the following naming scheme:

  • Stored procedures keep their original name: Customer_tUser_Find
  • Objects lose underscores: CustomertUser
  • Providers (Data Access components) go Pascal case and then lose the underscore: CustomerTUserProvider

Now, try a search and replace on that. My current classes are Customer_tUser and the final version find/replace to CustomertUser causes providers to fail in C#. Not a big deal, overall. Chock another one up for beta testing.

Oh, and I guess there is a good reason to use VB.NET after all*.

Solution

If you have played with .NET Tiers during the beta, and have tables with underscores, attempt a compile of your project and fix the errors with a search and replace. If everything is not cleaned up (a potential with C#, which is case sensitive), you will have to fix the case sensitivity. The other solution is to stop playing with beta software.

Until a bit later.
–GB

* VB.NET is not case sensitive, so you do not end up with this issue.

Advertisements

2 Responses to NET Tiers Frustration

  1. Robert Hinojosa says:

    Sorry for your frustration, but you there is an option in the latest version of the templates
    ConvertUnderscoreToPascalCase to allow you to turn it off or on.  Just hoping this helps your frustration level! 🙂

  2. Gregory says:

    Robert. The issue still present is the casing is not uniform across all of the conversions. It is not a major deal, overall, just a small point of concern. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: