LinuXelite
Programmer
Hi
I start a whole new project. I want to reconsider my way of designing web application.
First, I'll use only XHTML/CSS. I'll drop HTML. I'll use PHP5 because the project will take MONTHS to developt so I'll be ready when PHP5 will be release for production server. This means that I will use OO programming almost for every functionnalities (xml service, orders, cart, auth, etc...)
Secondo, I'm looking for a way to do this:
- multi-language support (best solutions?);
- No hard-coded SQL (POST+SQL insert, select, etc...);
- Modules with ACLs that I can remove/add;
I want to code like Egroupware did (but this one is too complex, I dont understand their logic...)
#1 Multi-language
What do you use? Right now I use this method:
lang_top.inc.php
$TOP_MENU1['en'] = 'My office';
$TOP_MENU1['fr'] = 'Tableau de bord';
and then I call <?php echo $TOP_MENU4[$lang]?>
Is there a better way?
#2 FORMS AND SQL
Right now, I design a form like that:
<form action="$PHP_SELF" method=post...etc>
In the top of my page, I do something like:
switch ($mode) {
"add": $sSQL="INSERT INTO table VALUES $_POST['']....;
"mod": $sSQL="UPDATE....";
"del": $sSQL="DELETE from table where id...";
default: $sSQL = "SELECT from table where id=$_GET[id]";
}
well.. you get the idea... each form is long and hard to code and update.
I want to design a form once, that can insert, delete, update, select fields from a tables. I can program an object and pass an Array.. I dont know... what is the best pratice with PHP/MySQL?
#3 Modules
I want a system that can add/remove modules for each customer. I want exactly what egroupware uses. Well I have a good idea how do to this but if you use a simple system for that, tell me how you do this
.
Conclustion: I want a system that is powerfull, FAST, easy to update with a lot of code reutilisation (thanks to OOP).
Thank you for sharing your thoughs on this topic!
Frank,
I start a whole new project. I want to reconsider my way of designing web application.
First, I'll use only XHTML/CSS. I'll drop HTML. I'll use PHP5 because the project will take MONTHS to developt so I'll be ready when PHP5 will be release for production server. This means that I will use OO programming almost for every functionnalities (xml service, orders, cart, auth, etc...)
Secondo, I'm looking for a way to do this:
- multi-language support (best solutions?);
- No hard-coded SQL (POST+SQL insert, select, etc...);
- Modules with ACLs that I can remove/add;
I want to code like Egroupware did (but this one is too complex, I dont understand their logic...)
#1 Multi-language
What do you use? Right now I use this method:
lang_top.inc.php
$TOP_MENU1['en'] = 'My office';
$TOP_MENU1['fr'] = 'Tableau de bord';
and then I call <?php echo $TOP_MENU4[$lang]?>
Is there a better way?
#2 FORMS AND SQL
Right now, I design a form like that:
<form action="$PHP_SELF" method=post...etc>
In the top of my page, I do something like:
switch ($mode) {
"add": $sSQL="INSERT INTO table VALUES $_POST['']....;
"mod": $sSQL="UPDATE....";
"del": $sSQL="DELETE from table where id...";
default: $sSQL = "SELECT from table where id=$_GET[id]";
}
well.. you get the idea... each form is long and hard to code and update.
I want to design a form once, that can insert, delete, update, select fields from a tables. I can program an object and pass an Array.. I dont know... what is the best pratice with PHP/MySQL?
#3 Modules
I want a system that can add/remove modules for each customer. I want exactly what egroupware uses. Well I have a good idea how do to this but if you use a simple system for that, tell me how you do this
Conclustion: I want a system that is powerfull, FAST, easy to update with a lot of code reutilisation (thanks to OOP).
Thank you for sharing your thoughs on this topic!
Frank,