Archives For yiibk

Let’s look at a different way of rendering view files: using static pages. The difference between a static page and a standard page in the site is that the static page does not change based upon any input. In other words, a dynamic page might display information based upon a provided model instance, but a static page just displays some hard-coded HTML (in theory).

This is an excerpt from Chapter 7, “Working with Controllers,” of “The Yii Book”.

Continue Reading...

My first book, PHP for the World Wide Web: Visual QuickStart Guide, came out about 12 years ago now (it covered both PHP 3 and 4!). In the dozen years since then, I’ve written 22 more books (including revisions), with three different publishers. About 2-3 years ago, I first started thinking about self-publishing a book, and as of Fall 2012, am finally doing so with The Yii Book. I occasionally get asked, probably by people that also want to self-publish, about the tools I’m using for writing and self-publishing this book: technically speaking, how am I doing it? The introduction to the book does discuss this, but as not everyone has purchased the book, I thought I’d write up my process.

Continue Reading...

The subject of this newsletter is “going big”. By that I mean how to transition from a Web site with little to moderate traffic, to one that can handle tons of traffic. (How you get the traffic itself is an entirely different issue.)

To be entirely forthcoming, “going big” is not my forte, which is to say that I don’t have a ton of direct, personal experience in this area. Among the X dozens of Web sites I’ve worked on over the past 14 years, only a smattering have the demands of a “big” or “big-ish” site. Which makes sense, as statistically, not that many sites are “big”. In the grand scheme of things, the number of “big” sites is such a small percentage as to be almost negligible. This is fact I’ll speak more about at the beginning of this newsletter.

That being said, I do know a fair amount about the subject, and I know, and have spoken in detail with, people that are directly responsible for heavily trafficked sites. So, although I’m not an expert in “going big”, I’m not just guessing here, either.

As I was writing this newsletter, it also became “big” (as in wordy), so I’ve split it into two. This, the first, looks at going big from the macro perspective: theory, implementation, hardware, and networking. In the next newsletter, I’ll look at the micro perspective: how to write code that scales well.

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...

Content decorators are a less heralded but interesting feature of the Yii framework. Content decorators allow you to hijack the view rendering process and add some additional stuff around the view file being rendered. In this excerpt from Chapter 7, “Working with Controllers,” of “The Yii Book”, I’ll explain what content decorators are and how you use them. (This does assume you have some familiarity with Yii and how it renders the complete layout.)

Continue Reading...

I’m happy to announce that a new version has been posted today. This version includes Chapter 13, “Using Extensions,” and Chapter 14, “JavaScript and jQuery.” This concludes Part 2 of the book (better late than never, eh?).

Continue Reading...