Jump to content

Big performance hit on this design?


patrick24601

Recommended Posts

I'd appreciate the community's opinion on this.

 

Here is a purist OOP application design I am considering. I am curious as to how much this is going to affect performance with the multiple classes I am using. FYI... I am using PHP5, MySQL5, PEAR and Smarty.

 

1. Every call/postback to my website is going to go through index.php?function=xxxx

2. In index.php I instantiate a 'driver' class I have

3. That driver class/file is going to include_once() all of my business tier files/classes. It will call the business tier, get the data back, and then display the smarty page.

4. All of the business tier .php files are going to include their own data tier files/classes.

5. The data tier is the *only* place you will find SQL. It will build the queries, call PEAR, and return the data to the business tier.

 

Thought 1 : I am thinking that I can save on performance by getting rid of what I am calling a 'data tier'. PEAR is really my data tier. So in my business classes I will have my SQL coded and just have the business class call PEAR to execute the query.

 

Thought 2 : I can also go ulti-purist, get rid of my data tier, and put all of my sql into stored procedures.

 

Your thoughts ?

 

Thanks in advance,

Patrick

 

Link to comment
https://forums.phpfreaks.com/topic/99392-big-performance-hit-on-this-design/
Share on other sites

The JAVA programmer in me is used to a header full on require_once() calls. I really prefer using it that way. If I ever write a basic testcase at the bottom of the file then I don't have to worry about dependencies in other 'packages' (again, the java thing.)

 

Here's what the structure of my app looks like, Patrick: http://nick.stinemates.org/work-desktop.png . Ignore the python on the right :X

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.