Re: Database Module in a Web Application

2005-12-01 Thread Peter Hansen
mohammad babaei wrote:
 I'm going to write my first web application in Python,
 is it an good idea to write a database module that handles the 
 connection to database  executing queries ?

No, it's not a good idea to reinvent the wheel if someone else has 
already done the work for you.  All databases which you would probably 
want to use for this already have Python wrappers which will do the job.

-Peter

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database Module in a Web Application

2005-12-01 Thread Fredrik Lundh
Peter Hansen wrote:

 mohammad babaei wrote:

 I'm going to write my first web application in Python,
 is it an good idea to write a database module that handles the
 connection to database  executing queries ?

 No, it's not a good idea to reinvent the wheel if someone else has
 already done the work for you.  All databases which you would probably
 want to use for this already have Python wrappers which will do the job.

unless you interpret database module as a database abstraction layer for
my application, in which case it's a good idea -- unless you prefer to use a
ready-made ORM:

http://projects.amor.org/dejavu
http://skunkweb.sourceforge.net/pydo.html
http://sqlobject.org/
(etc)

or a web framework that contains an ORM:

http://www.djangoproject.com/
http://www.turbogears.org/
(etc)

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Database Module in a Web Application

2005-11-30 Thread mohammad babaei
Hi,
I'm going to write my first web application in Python,
is it an good idea to write a database module that handles the connection to database  executing queries ?


Regards
M.B
-- 
http://mail.python.org/mailman/listinfo/python-list