OO in practice

Hi!

I began to write a little page, but I stopped for a moment. I’m sure the
object design was somehow wrong.

I’d like to get some help how to organize my objects, and what are the
objects.

The site is a little blackboard. On the blackboard there are
programs, but it doesn’t matter.
Everybody can read the programs.
Everybody can subscribe to get mail notification of new programs.
To submit a new program, a user must register.
Registration and subscription is validated: the user gets a random
number to the mail addres given.

The programs are stored in a mysql DB.

So the site will consist of some forms, the forms should be checked.
If you submit a form with invalid data, you get back the same form,
with the errors highlighted.

So, my question is about the design. What are the objects, how to
organize the whole thing.

Gergo

±[Kontra, Gergely @ Budapest University of Technology and Economics]-+

    Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |

URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
±------“Olyan langesz vagyok, hogy poroltoval kellene jarnom!”-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

Hi!

I began to write a little page, but I stopped for a moment. I’m sure the
object design was somehow wrong.

I’d like to get some help how to organize my objects, and what are the
objects.

The site is a little blackboard. On the blackboard there are
programs, but it doesn’t matter.
Everybody can read the programs.
Everybody can subscribe to get mail notification of new programs.
To submit a new program, a user must register.
Registration and subscription is validated: the user gets a random
number to the mail addres given.

The programs are stored in a mysql DB.

Here’s a quick take:

  • Blackboard has many Programs
  • Person accesses Blackboard
  • Blackboard has MailingList
  • Blackboard has a submission procedure
  • Person is registered or not, and has a class method Person.find(email,pass)
  • you need some classes to access the DB

So the site will consist of some forms, the forms should be checked.
If you submit a form with invalid data, you get back the same form,
with the errors highlighted.

Err… I don’ know.

So, my question is about the design. What are the objects, how to
organize the whole thing.

Gergo

Gavin

···

----- Original Message -----
From: “Kontra, Gergely” kgergely@mlabdial.hit.bme.hu