SWB GAMES - Utilities - IDCG

Internal Data Code Generator


What the human user needs to see on the screen, how the database needs things to be organized, how printed reports should be laid out, different areas of the system have different needs for data organization.

Frequently forgotten is that the program itself may have totally different needs for it's own layout of data. When the unfortunate programmer mentions this, he/she is usually told "we don't have time", and has to force- fit another layout.

IDCG seeks to alleviate this. Given a set of fields that should be in a record, it generates custom C# class files to implement them with standard features like read from XML, write to XML, read/write to database, log the record, and so on. These class files can then be tweaked to the programmer's further needs.

While there are occasional needs for things like binary trees or even 2-dimensional arrays, 90+% of business objects can be laid out as items, or lists of items. A more complex object may contain multiple items or lists of items. Ultimately, an item comes down to individual int's, strings, etc. IDCG generates Item and List classes for each record given.

Being able to generate complex data structures quickly and easily for the program's use will hopefully give the programmer an excellent head start. Note: At this point, only int and string are recognized for basic data types.

Floor Management Example


Usually the best explanation is an example. For the ClassGeneratorFloorDemo example, the layout is like this:

  FloorItem
  +- OfficeList
     +- OfficeItem
        +- ComputerList
           +- ComputerItem
              +- Ram, Cpu, OsVersion
           +- PhoneList
              +- PhoneItem
                 +- Manufacturer, SerialNumber
           +- PersonItem
              +- Name, EmployeeID

A Floor consists of a list of Offices. Each Office contains a list of Computers, a list of Phones, and exactly 1 occupant (just for example). Then you can do FloorItem.ReadFile(), FloorItem.Logit(), etc, for your custom-built class.

Download FloorDemo Solution Zip File (Updated 2/22/14)

This unzips into a folder containing a VS 2010 C# solution. Detailed instructions are in the README.txt file. This requires nLog and SQL Server to run, both of which can be freely downloaded. When you run the demo, little shows to the screen, but generates a detailed log file.


Child Care Editor Example

This is a demonstration of an editor to read/write/update records, in the context of a child care provider's time recording. Only the parent editor is fleshed out. IDCG was used to generate the Common (library) directory files, and the only actual development effort was building the UI.

Download ChildCare Solution Zip File

This unzips into a folder containing a VS 2010 C# solution. Detailed instructions are in the README.txt file. This requires nLog and SQL Server to run, both of which can be freely downloaded (See first example). When you run the default project, an editor comes up that allows you to create and destroy the table, add/delete records, and so on.


ScottWeb ASP FloorDisplay Example

This is a demonstration of an ASP.NET web application with code-behinds to display the records in the database according to their various section. You will need Visual Studio 2012 Express for Web to compile the project. IDCG was used to generate the Common (library) directory files, and the only actual development effort was building the UI.

Download ScottWeb Solution Zip File

This unzips into a folder containing a VS 2012 C# solution. Detailed instructions are in the README.txt file. This requires nLog and SQL Server to run, both of which can be freely downloaded (See first example). When you run the default project, you can create the database if needed, and navigate around the tables.

Below is the compile web pages for the above project. Copy the zip file to the wwwroot directory and unzip. You will probably need to move things up 1 level so wwwroot will be laid out right. Instructions are in the readme.

Download ScottWeb Published web page File

Once installed correctly, you should just be able to bring up a web browser and do: http://localhost/ScottWeb and have the page come up.


Return to SWB Games home page