designing question

pserrand bucodi at worldnet.fr
Mon Jul 19 03:36:19 EDT 1999


I have the mission to develop a rather big database front-end
application. Since the application must be multi-platform LINUX -WIN it
will be developed in Python.

For infomatiion, this is what will be used :
Python of course
Tk
Pmw
Gadfly

I have two questions:
1. The database will hold abouth 50.000 lines in its biggest table, can
gadfly handle this without problems, what abouth acces time ??

2. The application will have abouth 50 different inputscreens wich acces
all to different tables.
I will create a class for every window wich inheret from a general
'input-screen'-class.
I wonder if a should place the db-access code (insert-update-delete) in
every specific window or if i should  create a big db class wich has all
possible db-acces in it ?
Ex :
Possibility 1 :
class window :
    def __init__
                ..
    def createwidget:
                ...
    def handlevents :
                ...
    def insertrecord :
            ...
    def deleterecord:
            ....
    def update record :
            ....
Possibility 2:
class window
    def __init__
                ..
    def createwidget:
                ...
    def handlevents :
            call here db().inserttable1()
                            db().updatetable1()
                            db().deletetable1()

class db
    def __init__:
            connect to db
    def inserttable1
        ..
    def updatetable1
        ...
    def deletetable1
        ...

Hope my question is clear and sorry for the bad english, i'm french :)

Pierrette





More information about the Python-list mailing list