I have a 2-tier application that allows the end user to create a form
containing controls of the user's choice. The same user can then
populate the database by entering data created using the form he
created. I have to convert this 2-tier application to a 3-tier
Since the form is created on the fly, all the information related to
the controls is also stored in the database. So, there is a lot of
information related to the controls, their sizes, their placement
which is UI information. Further, there is information related to the
data type that each control is representing which corresponds to the
application specific data. Finally, the data pertaining to database
calls is database specific part of the code. Now, even though this
distinction of three layers seem logically very easy, it is very
difficult to translate this into code. That is because the data
structure that would store the information entered in the controls
would have to processed at all the layers, viz. UI, application and
database( or so I perceive). More specifically, the UI layer would
have to contruct the data structure with all the values, the
application layer would have to process it and finally the database
layer would have to process it again to make a single insert call into
the database using ADO. Of course, I could send the value of each
control separately from the UI layer to the App Layer to the DB layer.
But this would make things very very slow that I dread.
Is there any way to do this in more clean way such that this data
structure is processed only in the App Layer and the other layers are
sheilded off this information?
Any input in this regard would be useful.