Conception question

P

PHILIPPE

Hello everybody
I'm facing something maybe trivial but I cannot found the solution.
Here is the situation:
I want to code three web visual components that will all inherit from
the same base class called FormItem (abstract)
A FormItem has an Id, a Parent (which is a form item also), a Form
Item child collection, a Type (literal), a sort tag and some other
properties. This base class is built with two other classes
(FormItemEnumerator and FormItemList) to provide access to the child
collection.
The three derivated classes will be named Page, Group, Question. A
page can contain groups and questions, a group can only contain
questions.
All the properties are saved to a Sql database in the FormItem class
so that data can be retrieve later. Each visual component will be able
to support postback events.

What is the best way to code this? Should I code all my classes and
then create the visual components based on those classes or should I
start creating the visual components directly derivating from my main
class?
I have some difficulties to separate the presentation, the events, the
base objects themselves, the persistence of the objects during
postback events, and the DB access to save/retrieve data

If you have already faced such an issue or if you have a good example,
please help me :)

Regards
Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top