2008-07-15

AccommodationManager

I've decided to upload a project I have been working on over the weekend. So far it's taken about 5 hours, this includes me deciding exactly what it was I was going to write plus hunting for pretty graphics :-)

The requirement came about because I was asked if I could display booking availability on www.trentinney.co.uk - in addition they wanted to show availability for a number of other sites + the cost to stay during certain periods. I decided to write a single-user ECO app using SQLite as the database. This app will track customer information, bookings, properties, and prices; whenever the user is happy they will click a Publish button and it will communicate with a webservice to publish the data (this part is not yet written).

The app uses some practises I would recommend, such as
  1. Having one EcoSpace per form where possible in order to ensure your memory is freed when no longer needed.
  2. Using OCL constraints to validate user input - using my DroopyEyes extensions.
  3. Replacing the IPersistenceService to perform double-check no constraints are broken, and to allow classes to define PreSave validation for more complicated validation (such as doing in-DB searches for clashing bookings so that you don't have to load in all bookings into memory).
  4. Adding a non-ECO DBStructure table to the DB so that you can detect the current version of the DB and apply relevant SQL upgrade instructions when needed (no upgrade code in there yet).

To run the project you will need to download SQLite. You will also need to remove the AirSoftware.Common and Eco.Persistence.SQLite projects and re-add them (I have copied them into the zip file).

The file is available here. The file uses only a few classes so it will work in the trial too. The project is a Visual Studio 2008 one.

1 comment:

gattaca said...

Eco.Persistence.SQLite is not work in Eco_4.0.0.3229!!

When I create an object and UpdateDatabase(), there is nothing in SqliteDB.

If it works good in your environment
, please provide a small project show CRUD.

Thanks!!