API's that Suck

January 3, 2011

The Story of UltraBase: Chapter 4

Filed under: UltraBase — Grauenwolf @ 8:35 pm

Fred didn’t like project references. In fact, he absolutely hated project references. So when he started on the middle tier he made sure his team only built their project using assembly references. Moreover, those assembly references all had to point to the golden location, a shared drive where releasable code was posted.

In some cases this makes a lot of sense. Especially when the purpose of each assembly is clearly delineated and low level assemblies are completely unaware of the assemblies that use them. But this situation is a little bit different.

To start with, you need to know about the six assemblies that make up the middle tier. From highest to lowest they are the Adapter, Core, BusinessLogic, DAL, Config, and Data libraries. Each library builds upon the ones before it. For example, in order to add a UserSearch function to the Adapter and BusinessLogic layer you must first add a UserSearch entry to the DataMapperEnum found in the Data Library. And all of the parameters must exist on a UserSearchInput object found in the DAL assembly.

I’ll walk you through the process. First get the UserSearch stored procedure from the database team. Then enter in its name, parameters, and output columns into the UltraBase configuration database. Since databases don’t really work with source control, make sure you kick off a backup.

Open up the Data libraries solution and update the version number. Kick off the code generation process, and then check everything in.

Once the build machine is done, copy the new version of Data into the golden location. Then open config library and update its version number. Change its reference to point to the new version of Data, regenerate the code, and check it in.

Once the build machine is done, copy the new version of Config into the golden location. Then open DAL solution and update its version number. Change its reference to point to the new version of Config and Data. Regenerate the code and check it in.

Once the build machine is done, copy the new version of DAL into the golden location. Then open BusinessLogic solution and update its version number. Change its reference to point to the new version of DAL, Config, and Data. Regenerate the code and check it in.

Once the build machine is done, copy the new version of BusinessLogic into the golden location. Then open Core solution and update its version number. Change its reference to point to the new version of BusinessLogic, DAL, Config, and Data. Regenerate the code and check it in.

Once the build machine is done, copy the new version of Core into the golden location. Then open Adapter solution and update its version number. Change its reference to point to the new version of Core, BusinessLogic, DAL, Config, and Data. Regenerate the code and check it in.

Once the build machine is done, you can deploy the new version of the middle tier.

Once the build machine is done, copy the new version of Core into the golden location. Then open Adapter solution and update its version number. Change its reference to point to the new version of Core, BusinessLogic, DAL, Config, and Data. Regenerate the code and check it in.

With all this done, you can change your website code to use the middle tier.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.

%d bloggers like this: