[ Content | Sidebar ]

Code Generation Real World Part 3

Written on July 20, 2007

This is a continuation of Code Generation Real World Part 2 which in turn is a continuation of Code Generation Real World Part 1 which is probably a good place to start if you’ve just got here.

In Part 2 I had just successfully downloaded the zip file which hopefully contains all the code I need to get started with the GlobalSurfari Facebook System.

GENNIT Code Generation Explorer
Extract the Zip file to a location on disk

After extracting the zip file you can see a number of folders and files exist. The first step would be to read README.html. This file contains a QuickStart guide and gives you the information about exactly what files have been extracted and what they are for.

Code Generation Readme
README.html - File Descriptions and QuickStart Guide

The file lists what each project and for certain projects, what each file does - it also contains a Quick Start guide for getting your project working.

From the Quick Start the following steps are to be taken -

  1. Ensure all of the directory locations match up (for example, this is an NHibernate template and I declared that NHibernate was located at c:\Program Files\NHibernate )
  2. Generate the database by using the script supplied by GENNIT
  3. Ensure the database connection string is correct and will connect.
  4. Open the solution and build it, use NUnit to ensure the solution is working correctly and communicating with the database.

Global Surfari Database Script
Generate the database using the supplied scripts

Opening the solution in Visual Studio I build the project and press F5 to run it. NUnit opens by default (as the parameter to NUnit is supplied when building your project), running the NUnit tests returns green lights, meaning the code and database are all working correctly. When this stage is reached the generated code is working properly and development on your custom solution can start.

Code Generation NUnit Build Green Lights

NUnit Green Lights is a crucial milestone

In the fourth and final part of the Code Generation Real World series I show what source code was changed and how the Facebook module turned out!

Filed in: Tips and Thoughts.

No Comments

Write comment - Trackback - RSS Comments

Write comment