Day 2
Welcome to the Workhorse diary. The reason we start on day 3 is because I've only just thought about keeping this diary :-) Each "day" (of days I spend on the project, not real days) I will post the current project code, with what I have accomplished, what I think needs to happen next etc. etc.

To play a little bit of a catch up. Here's what I've built so far:
  • Two projects, one for the Front End (Workhorse), and the other with Business Objects (DataAccess)
  • IDatabase Interface for handling database access, along with DBSQL which is an SQL Server implementation of IDatabase. Future classes may include DBORACLE (Oracle databases) and DBOLE (OLE databases such as Microsoft Access JET)
  • DBSQL supports creating new Workhorse databases, as well as accessing existing (so you can start it up on any machine with SQL Server (Express) immediately)
  • Security class, with a password hashing function (utilising MD5)
  • Login screen, which uses the Security class to validate login credentials
  • Database configuration screen. If the config file has not been created, you'll be given a list of IDatabase classes (utilising Reflection) and allowed to configure and open or create the database
  • Main Workhorse window, contains a menubar and status bar, just a placeholder until I'm ready to add code projects

    Day 2's code:
    Download

  • Day 3
    This morning's stint was generally designing the database tables. Here's the current setup:

    I have omitted certain items such as delivery addresses, multiple warehouse support etc. because I don't think they add anything substantial to the project, maybe in a later version...
    Design Choices
  • Single Warehouse functionality - Doesn't add anything technically to the project
  • Single Address of Customers - While simple enough to program, I didn't feel it "added" anything

    To Do Next
  • Add scripts to create indexes and foreign key constraints in the Create DB functionality
  • Finish adding missing tables (such as inventory...)
  • Build a menu into the front end to access menu objects

    Day 3's code: Download

  • Day 4
    Database layout has been updated:

    I've also set up 3 users:
  • admin, password admin - Has access to everything
  • sales, password sales - Has access to order entry
  • whse, password whse - Has access to receiving/shipping inventory
    I've created the three "windows" (actually usercontrols to be displayed within the main form), and coloured their background each differently so you can tell that they are loaded.

    Design Choices
  • Ignored storage locations of inventory
  • The multiple joins from inventory to order_header and order_lines reflect both Received and Shipped orders
  • SDI (Single Document Interface) meaning you can only work on one screen at a time. There is very little difference coding between SDIs and MDIs (Multiple Document Interfaces). Not entirely sure why I chose SDI, but it wouldn't take more than a few lines of code to turn this into an MDI

    To Do Next
  • Add scripts to create indexes and foreign key constraints in the Create DB functionality
  • Design the three screens.
  • Create the DataAccess objects for orders and inventory

    Possible Future To Do
  • Extend SDI to MDI, maybe have any option for user to select SDI/MDI
  • Improve the menu system
  • Add icons and graphics

    Day 4's code: Download
  • Polymath Programming