cw-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cw-devel] oo backend


From: Timo Laine
Subject: [Cw-devel] oo backend
Date: Thu, 30 May 2002 01:52:06 +0300

Now that the database design is pretty good, this is how I currently
think we should implement the backend. The only possible thing that
could be wrong with this idea is that the performance might not be that
good, but I'm not sure about that. So, here goes:

The idea is to make a class for each kind of object we're going to have:
a topic, a user, a message forum, a message and so forth. We would hide
the functionality of the classes, and offer the frontend access to the
data only by using the public functions of the classes.

A typical procedure of the frontend getting the information (in this
case, user information) from the backend would go like this:

1. The frontend calls the constructor function of the backend's user
class, and it takes as its only parameter the user id.

2. The constructor function constructs a user object by fetching the
data from the database.

3. The frontend gets the data it wants using the return functions of the
user object.

4. The frontend calls the object's destructor function (if needed).

Timo Laine, address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]