Getting Started With The NuSoft Framework

posted on 12/15/07 at 09:00:47 pm by Joel Ross

While I'm away on vacation, I figured I'd put up a series of posts on the NuSoft Framework. This is one of those posts.


How and when do you use the NuSoft Framework? Well, there's two major requirements before you can get going with it. First, you need CodeSmith 3.2 or later. It does not require the full version of CodeSmith Professional - you can generate with the $99 basic version.

It also requires that your database be completed. Most custom development projects start from a database model and work their way up, and that's exactly how this works. Once your database is in place, you can start generating code.

When you unzip the templates, you'll find a Main.cst file in the root folder. That's the file you want to use for your initial generation. When you open it, you'll see a few properties that you need to set:

  1. SourceDatabase - this is the database you want to generate against. You'll probably have to create a new connection to the database, which basically involves building a connection string and giving it a name. We use certain features that require SQL Server 2005, however, it will work with SQL Server Express.
  2. ExcludedTables - here you can exclude tables from having classes generated for them. If you have ASP.NET membership tables, you'll want to exclude those.
  3. TablePrefixes: this is a comma delimited list of prefixes to strip off tables for class names. For example, if all of your tables start with tbl, then the entity generated from tblOrders will be Order.
  4. Namespace: This is the root namespace for the whole application. I typically use <CompanyName>.<ProductName>.
  5. DomainNamespace: This is the namespace to add to the root namespace for your Domain / Business objects. We default to Business, but we've also used Domain and Core in the past. The resulting namespace for your business objects will be <Namespace>.<DomainNamespace>.
  6. SQLType: We support both Stored Procedures and Dynamic SQL. You can choose either one. If you choose Stored Procedures, we'll generate a database project with all of the stored procedures used by the default framework implementation.
  7. OutputDirectory: The most important one! This is where you'll get your code when it's done.

Once you have that done, just click Generate, sit back, and relax. In a few seconds, your framework will be ready to go.

Tags: | |

Categories: Development, Software, RCM Technologies