Wednesday, March 22, 2006

Focussed thoughts on new state

Ok, I have had some time to think about how things will now work. I am going to add 3 objects. One is the DataObject. This holds all the state and is essentially a wrapper for a DataSet. This objects will act as an intermediary between the site and the database. The neat thing is that session state no longer needs to be saved on a Session State server. A persistent hidden field (created by base page) will track a tag (either an orderid or fake ISBN). This tag along with user id will be able to create the DataObject. Normally you will just grab the DataObject from the session, but if you lose your session you can instantly reclaim it with the tag.

So all TOCs will be saved. This means the the SaveTOC page becomes meaningless. But you now have to display your unique tag so the user can use it on the history page.

The history page also becomes much more important. Here you will be able to load a toc you have created, but users might also want to manage the TOCs they have created. For example, they might want to delete or rename an order. Also when they select an order do they want to 'work' on it or generate a new copy.

So the second object will be a History Object which will also be a wrapper around a DataSet. It will handle the History interactions.

The problem is that the code is becoming more database dependent and my datalayer abstraction is dying a bit. This is ok, but moving to a new backend becomes more important and unfortunately, may generate more work. For example, I plan to power the DataObject with 9 stored procedures. Easy stuff, except that with our current backend these 9 will become about 200 stored procedures. Bleck!

0 Comments:

Post a Comment

<< Home