473,804 Members | 3,739 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interesting Article "Experience s of Using PHP in Large Websites"

I found and interesting article, "Experience s 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__<C lass 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 1509
On Thu, 15 Sep 2005 20:03:00 -0500, David <ma******@sbcgl obal.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_Messag e
Web_UI_Control_ TextBox
Data_Driver_MyS qlConnection

It's a *very* large PHP5 project.

Sep 16 '05 #2
David wrote:
I found and interesting article, "Experience s 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, "Experience s 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__<C lass 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_que ry(), fn
transact_db_dic onnect()...

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
5641
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 create a single View and specify also in this View the WHERE clause that is common in these stored procedures, I will have the new stored procecures changed to be like:
43
2767
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 & \ !(v)->vcpu_info->evtchn_upcall_mask) whereas evtchn_upcall_pending is of type unsigned char (and also evtchn_upcall_mask is of type unsigned char).
2
5522
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
2619
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
20586
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, and try to move to another record and get an Access error "Record is too large". The record is only half filled, with many empty fields. If I remove the added data or delete some older data, then it saves ok and works fine again. Whenever I'm...
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2993
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.