Home » , , » Download PHP Advanced and Object : Oriented Programming Third Edition By Ullman, Larry

Download PHP Advanced and Object : Oriented Programming Third Edition By Ullman, Larry


Sinopsis

The career of a PHP programmer normally starts with writing individual scripts, each dedicated to a single purpose. From there you begin using more and more files, building up Web applications. Eventually you might develop sites on your own server and, if you’re lucky, balanced over multiple servers. No matter how large your projects are, learning new and improved ways to develop Web applications is an important part of the life of the PHP programmer.

In this chapter, the focus is on developing Web applications beyond the beginner or intermediate level. We begin with an explanation of how to modularize a Web site. Then you’ll learn a bit about the Apache Web server, including using its mod_rewrite feature that makes Search Engine Optimization (SEO)-friendly URLs. The chapter ends with a discussion of controlling the browser caching.

Modularizing a Web Site

In my experience, the arc of a program-mer’s development starts with writing one-page applications that do just a single thing. Over time, the work will evolve into multipage sites, involving templates and state management. After more and more experience, some seasoned PHP developers start doing the same amount of work in fewer pages, such as having the same script both display and handle a form instead of using two separate files. Or, conversely, the advanced PHP programmer may start generating exponentially more scripts, each of which doing far less, by focusing each script on a particular task. This last approach is the premise behind modularizing a Web site.

For an example of modularizing a site, I’ll create a dummy Web site (i.e., it won’t do much) that’s broken into its individual components. The new knowledge here will be how those components are separated, organized, and put back together. Instead of having individual pages (contact.php, about.php, index.php, etc.), the entire application will also be run through one index page. That page will include the appropriate content module based on values passed in the URL.



0 komentar:

Posting Komentar