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.

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.

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 -
- 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 )
- Generate the database by using the script supplied by GENNIT
- Ensure the database connection string is correct and will connect.
- Open the solution and build it, use NUnit to ensure the solution is working correctly and communicating with the database.

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.

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.
