Chapter 12. Coding Your Application
In This Chapter
Setting up the Zend Framework
Building your Data Models
Automating tasks with cron jobs
Creating your game's scoreboard
Finally! It's time to start coding.
If you skipped to this chapter to get to the fun stuff, I recommend taking a look at Chapter 9 to get an idea of the application you're building here. Also, I use the Zend Framework and its included Twitter API library heavily in this chapter. If you aren't familiar with Web development frameworks like Zend, please check out Chapter 10. Finally, this Web application is based on a LAMP (Linux, Apache, MySQL, & PHP) stack. If you don't have your servers set up yet, please review Chapter 11.
Still here? Okay, time to get to work.
Setting Up the Zend Framework
In Chapter 10, I discussed how Twitter API libraries could speed up development by saving you from reinventing basic functionality, and it can make your code more robust by encouraging a solid design pattern. I've chosen the Zend Framework and its included Twitter API library for the Twooshes project. To get started with the Zend Framework, the first thing you need to do is set up your directory structure.
Create your project's initial directories
Stake a place on your hard drive and copy the folder structure illustrated in Figure 12-1.
Figure 12.1. Your directory structure looks like this.
Underneath your project folder, titled