Archives For PHP

This is the second of a two-part newsletter on “going big”. By “going big” I mean how one transitions from a Web site with little to moderate traffic, to one that can handle tons of traffic. The previous newsletter looked at going big from the macro perspective: theory, implementation, hardware, and networking. In this newsletter, I’ll look at the micro perspective: how to write code that scales well. And, as it turns out, this newsletter again got to be too big, so this is part one of two parts that makes up part two of the two-part series. (Huh?) In this newsletter, I’ll mostly focus on code. The next will mostly focus on the database.

Before going into details, I’m going to define what it means to be a “big” site. As I said in the previous newsletter, it actually depends upon the kind of content and activity the site has: X number of video requests is far more demanding than the same X number of mostly text pages. Likewise, X number of WordPress page requests is far more demanding than the same X number of static HTML page requests. For the purposes of this discussion, let’s say that “big” is a site that gets in the broad neighborhood of 100,000 to 500,000 pageviews per day. At that point (if not before), you’ll need more than one server to handle the load. (As a counterpoint, on the highest end, Netflix sometimes requires up to 20,000 servers at a single time.)

As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!

Continue Reading...

Last week, the first public preview of version 2 of the Yii framework was announced. Qiang and the entire team have been working very hard, and this is a great milestone to reach. The code is available on Github, and there’s a whole forum dedicated to feedback and design discussions. Input from the Yii community is actively encouraged. All that being said, understand that Yii 2 is not nearly ready for production uses yet. Many bugs will undoubtedly be found, and other changes to the framework’s design are inevitable, too.

Besides mentioning this exciting news, I also wanted to explain how I expect this impacts my self-published book on the Yii framework…

Continue Reading...

A couple weeks ago, I posted a link to the Nettuts+ article “HTTP: The Protocol Every Web Developer Must Know – Part 1” by Pavan Podila. That was the first part of a two-part article, covering what every Web developer ought to know about the Hypertext Transfer Protocol. That article explained the fundamentals of HTTP, and is something that that truly every Web developer should read. Nettuts+ just posted Part 2. In this article, Podila goes into…

Continue Reading...

I’m working on Part 3 of “The Yii Book”, and have made reference to the fact that I’ve been working on Chapter 15, “Internationalization,” and Chapter 16, “Leaving the Browser.” These are not the original chapters, per the first table of contents. Here, then, is an updated table of contents. These are still subject to change, but considering there’s not that much of the book left, there probably won’t be any dramatic changes.

Continue Reading...

Pádraic Brady just posted “20 Point List For Preventing Cross-Site Scripting In PHP”, a thorough list of steps you should take when developing a Web site to prevent Cross-Site Scripting (XSS) attacks. Arguably, it would have been useful to include the explanations for some of these, but then the post could have been too long. In any case, it’s worth a quick read. I particularly like the following:

Continue Reading...