You are here: Home / Dog Blog / Archives

PHP and Web Standards

Tuesday 24 August, 2004 (11:08AM GMT)

Dan Webb has written an interesting post about the attention the web standards community gives to PHP. To sum-up the points that Dan (both in the post and the comments) and the article he references, PHP is not suitable for large-scale web sites and the web standards community should not get carried away by it.

I disagree with a lot of the points of the article, but Dan knows a damned sight more about back-end programming than I do, and that's partly the point.

Most web-standards evangelists are front-end design, HTML and CSS experts. They are not, and cannot be expected to be, back-end experts. If I want help with back-end development (including PHP), I don't think that the likes of Mezzoblue or A List Apart are the best places to look for it.

But PHP can be picked up relatively easily and I think that's why chiefly front-end developers (including myself) have embraced it. When it comes to large-scale, commercial (usually e-commerce) sites though, is PHP good enough?

Comments

Comment 1

I think either of those articles would be more useful, with a comparison of how some other language or technology such as C+ or Java or J2EE or .Net would handle large scale websites, or even gives examples of some large scale web sites that use those technologies. I think that Yahoo and Excite seem to be some large scale applications, and it is not clear how PHP does not scale well.

So said BillC on Tuesday 24 August, 2004 at 11:39AM GMT.

Comment 2

Actually i think with a bit of experience, caution and knowing your server settings to every detail PHP can still be used in large scale sites to its full extent

So said Musaki on Tuesday 24 August, 2004 at 12:06PM GMT.

Comment 3

Reding http://mindview.net/WebLog/log-0053 (and other recent posts by Bruce) may give some food for the brains.

So said Rimantas on Tuesday 24 August, 2004 at 12:16PM GMT.

Comment 4

My old job involved work on a lot of major, high-profile, heavy duty application engines, for services spread over many servers. I was the bloke who added the front end layer onto the templates rather than someone doing the backend.

We used perl a lot (usually mod_perl), some Java and some C++.

We got "mocked" by some of our "cleverer" users - Perl is crap they'd say, use PHP for your software - it's great. They obviously knew best. I just tended to shake my head and roll my eyes.

It's about using the right language for the right application for the right team - and PHP wasn't that language for any of those situations

PHP has come a long way on - its scalability is better than it was for starters. And I'll be interested in seeing what Yahoo do with it - I note one article about that saying that Java was ruled out pretty much cos of Java's multi-threading support on FreeBSD. Personally I would be very surprised if every new project they do is in PHP.

(Personally I don't use PHP - I use a HTML pre-processor called Hitoplive that processes on the fly and has many similarities to PHP but with some nice extras revolving around navigation. And I wouldn't let that on a large scale site either!)

So said Andrew B on Tuesday 24 August, 2004 at 2:50PM GMT.

Comment 5

I think the lack of namespaces and the inconsistent naming of functions alone would drive me absolutely nuts, not to mention the lack of strong typing, bizarre treatment of variables, and no way to package up libraries for reuse.

It's a shame the language wasn't well-designed in the first place. I do think it would be quite handy to have an easy-to-use server-side scripting language for the web that takes out some of the complexity of full-featured programming languages while retaining good design.

It seems like PHP gives you plenty of rope to hang yourself. It doesn't enforce good programming practices at all.

I'm so glad I get to work with Java and JSPs.

So said Jennifer Grucza on Tuesday 24 August, 2004 at 4:45PM GMT.

Comment 6

Being (at the moment) primarily a back-end developer for a PHP-and-PostgreSQL-powered Content Management System at my work, I think I can safely say that PHP is just fine for bigger projects too. It has its flaws, true enough, and the inconsistencies in PHP and its various modules tend to be rather annoying when you're skilled in the language and are held back by PHP's own flaws, but on the whole it's still a very powerful, flexible language that can be used for an awful lot of things just fine.

My only real gripes with PHP are the bloated environment and the fact that it's been kind of standing still for a few years. However, I'll still take PHP over something like ASP(.NET) or Java any day.

So said Faruk Ates on Tuesday 24 August, 2004 at 6:42PM GMT.

Comment 7

Has anyone else realized that that article was written in 2002? PHP has changed much since then. The views of this article need to be re-evaluated by the author for current times.

So said Wired on Tuesday 24 August, 2004 at 9:55PM GMT.

Comment 8

Faruk - I have no idea why /anyone/ would want to use ASP for a big project myself! :)

So said Andrew B on Wednesday 25 August, 2004 at 9:35AM GMT.

Comment 9

I'm no backend expert either, but I know at least one 'biggie' started converting to PHP a couple years ago: Yahoo.

Check this out:

http://public.yahoo.com/~radwin/talks/one-year-of-php-oscon2003.htm


So said will on Wednesday 25 August, 2004 at 10:29PM GMT.

Comment 10

That presentation above is really interesting. Good link! It's confirmed a few things that have been said in the comments here and on my site but also offered a few surprises. There obviously very aware of the shortcomings of using something like PHP but have come up with some very nice solutions.

So said Dan W on Thursday 26 August, 2004 at 4:18PM GMT.

Comment 11

I'm a big fan of PHP. I helped build an internet-accessible PHP/MySQL-based database for my company, and while I acknowledge that PHP has flaws, it has done everything we wanted it to do and then some. It has allowed us to create a database that is MUCH more flexible than our old proprietary database software ever was. The facts are that sloppy code can exist with any language and there are flaws and limitations in ever language.

So said Dan on Friday 27 August, 2004 at 5:20PM GMT.

Comment 12

Unworthy of the time lost reading it. Same old 'my language is better than yours because ... (something nobody really cares here)'.
My advice: if you have to build a large-scale website or an e-commerce one, use a language you know well, whichever this might be, not one you barely read a couple of tutorials about. PHP (like HTML) being easy to start playing with doesn't imply you have to stop there: as in anything, it takes time, perseverance and effort to learn the details and use it right.
Anyway, what does it have to do with standards? A web scripting language outputs what you tell it to, be it standard-compliant or not!

So said djn on Monday 13 September, 2004 at 2:36AM GMT.

Comment 13

A few years ago, we used PHP to develop a multi-stage, multi-participant workflow application to automate a number of business process - like expense claims, time recording, leave applications, and the like. It was deployed at an entertainment event client who had a regular bursts of hundreds of users needing to use the system - mostly for time recording - without missing a beat, on low powered linux gear. The application was fully buzz-word compliant through PHP using XML, XSL, LDAP, RDBMS, SMTP, HTML (of course). This was easy with the PHP libraries.

A later generation of this application now services a large multinational client in a separate sector with users around the world - again without a problem.

I agree that the PHP could be more consistent in its APIs. And I'd love to see the ability to constrain variable instantiation, for another example.

I haven't looked too closely at the latest release (5.x) of PHP, but what I have seen looks good - particulalry the OO stuff.

Finally, I have to strongly agree with djn. The use of Web Standrards is not a function of the back-end scripting language. It's a function of developers who know and care enough about making their sites more accessible, consistent, and easier to maintain.

So said vince on Thursday 16 September, 2004 at 4:09AM GMT.

Comment 14

Heh, you PHP guys have it lucky

Us using ASP.Net and "browser controls" (basically pre-compiled HTML that is inserted at compile time) have to spend ages re-writing controls to make them standards compliant

Heh, its all Win/Lose with ASP, you can either get slow performance, yet ease of standards conformity with ASP 3.0, or speedy applications that break the W3C left, right, and center with .Net

So said W3bbo on Friday 17 September, 2004 at 10:03PM GMT.

Comment 15

I started using PHP this year after years of using ASP/VB scripting. I also learned about web standards this year and I find that you can output web standard compliant dynamic content with PHP if you know what you are doing. I don't think it is the best or only tool you can use, but I am going away from Microsoft based slavery and using open source tools that I can offer customers a good product without charging never-ending licence fees for. Great site by the way. I commend you for putting forth this effort to help people learn xhtml/css. The web is going in the right direction using standards design. Combine that knowledge with back end server technologies and things are really going to get cool.

So said Mike on Monday 20 September, 2004 at 5:45AM GMT.

Comment 16

hey guys. php is really a wonderful and fantastic language as a web server language for back end programming. It is simple and easy to learn. Moreover with the added advantage of mysql as the database, its usabilty increases more. I have been learning php for the past 3 years and have developed enomorous both small and large projects for local companies. It has been a great experience working on php.

So said florence on Saturday 25 September, 2004 at 3:20AM GMT.

Comment 17

We are using php on the backend of www.army.mil the Army's official website. It supports standards to a large degree and supports 8 million plus visitors a month.

So said Chris on Thursday 3 November, 2005 at 1:59AM GMT.

See Also

^ Top

SiteGround: Fast, reliable, recommended hosting.