CSTiers is born

A new CodeSmith Project enters the world and its called CSTiers, named after the excellent .netTiers project. While .netTiers creates a complete website, CSTiers will create a DBVT Community Server Visual Studio customization project framework.

Almost every Community Server customization project I do involves five areas: DBVTConfiguration, DBVTContext, DBVTUrls, a Data Provider and original Chameleon Controls.  The objective of CSTiers is to create the structure for each of these areas when I start a new CS project.

I created CodeSmith templates to generate Data Providers for both SQL Server and Access some time ago, and because I’ll be creating a number of Chameleon Controls over the next weeks I added a CodeSmith template to generate the control classes: Data, List, PropertyValueComparison, PropertyComparison, ControlUtility, Query and ThreadQuery.  All seven classes may not be used for every Chameleon Control, but why not create them anyway?  I included the option for generating a ControlUtility class, and since this is an early version of the template I’m sure I will add more generation options going forward.

Below is the execution template for CSTiers.Controls using my recent DBVT ITunes mod as an example.  A master CodeSmith template would be used for the project, equivalent to the netTiers.cst template and would replace the individual templates.

 

 

The output of CSTiers.Controls is shown below.  And no, the classes aren’t 100% complete, as there is still a bit more coding to do, but 80% complete is better than 0%.

 

The CodeSmith project output window so far looks like the following.  When complete it will contain a single template generating not only Controls and the Data Provider as shown, but the Configuration, CustomUrls and Context folders and files as well.

 

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.