design?
| From: | Sjef | Date: | Thu, 29 Jun 2006 18:16:25 +0000 |
| Subject: | design? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-238926@lists.php.net to get a copy of this message | ||
Hi there,
I am starting a new, very small project. A simple question and answering
form. In one screen, question and answer can be typed, the strings will be
saved in a database table questions which holds question and answer (as
there is only one answer to a question). There will be a webpage displaying
all the questions, clickable to the webpage of the answer to the question
clicked.
I want to create a class Question for dealing wiht the questions and a class
answer for the answers. Each could contain an array with the their part of
the content of the database table. The class Question manages the class
Answer, so when instantiating the Question, the Answer will follow.
Beside of this I want to create a 'visual' component class that creates the
lists as displayed on the webpage.
Is this a good idea? Or should I not bother, and just create one class
Question that also deals with the Answers.
Thanxs!
Sjef