|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jobo Smarty Rookie
Joined: 18 Jul 2003 Posts: 10 Location: France
|
Posted: Mon Sep 15, 2003 6:01 am Post subject: Best practice for database transactions (add or chg record) |
|
|
I chose Smarty because I wanted to simplify my code. For transactions which only display data, that objective is achieved, as Smarty cleanly separates the database/control functions from the user interface HMTL.
I’m much less comfortable with my result for transactions which update the database (add or change data), even when they are fairly simple and low functionality. I end up with some complexity: a recursive call of the PHP program, which contains the validation routines inside a long case..switch statement.
In the coming weeks, I’ve got the code to write for 30 tables, and before I produce dozens of transactions containing hard-to-maintain code, can anyone provide some guidance ?
Are there any « best practice » examples out there? Or general purpose functions/classes ?
(Personally, I’d prefer procedural rather than object oriented examples, but I guess the wider Smarty community needs both) |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|