In my last post I took a first pass at designing the database for WhatIWantMost.com. The next step is to use CodeSmith and .netTiers to generate… well, um… the .NET Tiers.
Using .netTiers in as easy as they say it is on the site. Really, all you have to do is open up the NetTiers template file in CodeSmith and execute it. Those of you familiar with CodeSmith already know what I’m talking about, those of you not familiar with it will know once you try CodeSmith the first time. After that the only thing you must do is select a datasource, choose a folder to output the generated code, and provide a Namespace to be used in the code. There are plenty of other optional settings, I’ll leave investigating them further as an exercise for the reader. I have to admit that I did spend a few hours tweaking the settings and determining what each did and the optimal settings for me, but it was far from back-breaking labor.
When you execute the template your code, a VS 2005 solution, and some other goodies will be generated for you.
One of the “other” things that is generated is a starter web site that includes a pre-built admin section for editing the database tables for which you choose to generate code. This feature alone can be a real time saver, though you could use tools like XLineSoft’s ASP.NET Runner (or ASPRunner) or 1ClickDB Free to do the same sort of things. I think the real value in the generated admin for me will be in looking at the code for examples on how to work with the .netTiers framework.
So, now that I have the framework in place, how does it all work? What do I do next? I have no idea. I guess I’ll start plugging in some code to figure it all out and learn how I’m supposed to use the generated .netTiers framework. .netTiers does provide some samples to get me started. Come back next time to read what I’ve learned.