Form Manager

I finally found a decent name for this “DynamicDataModel” project I have been working on; Form Manager.

Synopsis: A set of objects to allow the developer to write as little code as possible to instantly get a form with validated fields and basic data manipulation.

My idea to was to write something that would allow me to quickly describe what data I want to edit/display, have a standard mechanism for verify data from the user and a generic method of talking to a database to create/get that data.

So far this is what I have come up with:

I built the diagram in NClass, but I kind of cheated and built the model in C# and imported it

The modes know how to render the data, where the data needs to come from and at what time.
The fields are quite the opposite, they know where the data is, and what to do with it, but don’t know when to use it.

So I built this model, the TableDefinition and FieldSet have all the fields hanging off them. And the relevant modes are hanging off the FormManager.

Although I plan to integrate this into phpBB, I have put in layers that should allow for this model to be used in anything.

The other thing is that I am trying to build in as little state as possible so that it can be cached to improve speed. However this will be seen once I start using it in more realistic situations.

The only wierd thing about the model that I am not completely happy with yet is that when the field is told to render itself, it is given the data to use.

I have unit testing around it all, and generated documentation so once its finished I should have quite a nice comprehensive application.

Leave a Reply