Brian's Waste of Time

Sat, 03 Jul 2004

PHP Scales Better then Java My Buttocks

Write stateless java webapps and it scales just as well. Because PHP has no built in constructs for maintaining state between requests other than cookies the language supposedly scales better. You can do servlets the same way. That way you get identical scalability and better performance. Don't confuse design with language. If you insist, I will point out that Brainf*ck scales better than PHP. It has no useful constructs, so applications are shorter and simpler.

It does speak to a design idiom I have expressed before -- make things you don't want people to actually do difficult to do. The servlet spec makes it easy to store server-side session state. People do it. I have recommended, and done myself, the practice of making a particular feature inconvient to use in order to make it used less often, or only when *really* needed. Yeah, this is telling clients how to use it, and may be of questionable ethics, but sometimes it is the best way to communicate, especially when acocmpained by docs saying why not to use it -- which they'll only bother to read when they say "this shouldn't be so inconvenient to do." Look at Java's reflection API for a great example of this in practice ;-)

3 writebacks [/src/java] permanent link