473,237 Members | 1,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

Interesting Article "Experiences of Using PHP in Large Websites"

I found and interesting article, "Experiences of Using PHP in Large
Websites" (http://www.ukuug.org/events/linux2002/papers/html/php/) ,
which lists some issues with scaling PHP for larger projects. Worth
a read although it appears to be three years old.

The major issue I have had with PHP is a conflict in class names for
modules created by two project teams. We resolved this by prefixing
all class names with a module ID, ex. "ModuleName__<Class Name>"

The only mistake I can see with this article is a statement that you
can only have one php.ini per server.

Who is using PHP for larger projects and how do you handle the naming
issue?

Sep 16 '05 #1
3 1467
On Thu, 15 Sep 2005 20:03:00 -0500, David <ma******@sbcglobal.net>
wrote:
Who is using PHP for larger projects and how do you handle the naming
issue?


I use "package" naming where each class is prefixed with it's path
location separated by underscores. Examples:

Net_Mail_Message
Web_UI_Control_TextBox
Data_Driver_MySqlConnection

It's a *very* large PHP5 project.

Sep 16 '05 #2
David wrote:
I found and interesting article, "Experiences of Using PHP in Large
Websites" (http://www.ukuug.org/events/linux2002/papers/html/php/) ,
which lists some issues with scaling PHP for larger projects. Worth
a read although it appears to be three years old.
Why do people keep bringing up this stupid article? It's both partisan
and dishonest. Starting with the title: it purports to be an article
about the experience of using PHP in large projects, yet there was zero
discussions about actual problems encounter. Everything is just the
author's opinions.
Who is using PHP for larger projects and how do you handle the naming
issue?


Easy. You just rename one or both of the classes.

Sep 16 '05 #3
David wrote:
I found and interesting article, "Experiences of Using PHP in Large
Websites" (http://www.ukuug.org/events/linux2002/papers/html/php/) ,
which lists some issues with scaling PHP for larger projects. Worth
a read although it appears to be three years old.

Not really - the article is rather badly written, poorly justified, and in
several instances just plain wrong. I find it remarkable that someone could
produce so many words about PHP development without mentioning code
testing. (see recenet thread here regards typing / variable declaration).
The major issue I have had with PHP is a conflict in class names for
modules created by two project teams. We resolved this by prefixing
all class names with a module ID, ex. "ModuleName__<Class Name>"

The only mistake I can see with this article is a statement that you
can only have one php.ini per server.

Who is using PHP for larger projects and how do you handle the naming
issue?


I have about 600,000 lines of PHP here, 6 programmers and between 1 and 3
web designers. The servers field about 3 million requests/day. Is that big?

I use a similar approach - any global symbol in an include file should be
prefixed by the file name e.g. file transact_db.inc.php might contain fn
transact_db_ini(), class transact_db, fn transact_db_query(), fn
transact_db_diconnect()...

The namespace thing is an old chestnut in PHP circles. I had some time
recently to have a think about it and wrote my own namespace handler (in
PHP). Next time I have some time free I'll publish it somewhere.

The ,ost important advice I could give to anyone embarking on a large-scale
project using PHP would be:

- set strict style/naming guidelines - the PEAR ones are a useful starting
point
- use unit and integration testing
- don't worry about scalability - PHP has it in spades

HTH

C.
Sep 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
43
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \...
2
by: Dave Strydom | last post by:
Hi, I'm getting the following error in my event log: ============ Event Type: Error Event Source: Active Server Pages Event Category: None Event ID: 5 Date: 2007/03/09 Time: 11:50:48 AM
65
by: Spiros Bousbouras | last post by:
Has anyone found that declaring variables register affected speed of execution ? If yes on what hardware and around which year ?
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.