Advanced PHP Programming : A Practical Guide to Developing by George Schlossnagle

By George Schlossnagle

During the last 3 years Hypertext Preprocessor has developed from being a distinct segment language used so as to add dynamic performance to small websites to a strong device making powerful inroads into large-scale, business-critical net platforms.   The swift maturation of personal home page has created a skeptical inhabitants of clients from extra conventional "enterprise" languages who query the readiness and skill of personal home page to scale, in addition to a wide inhabitants of personal home page builders with no formal desktop technology backgrounds who've discovered during the hands-on experimentation whereas constructing small and midsize purposes in Hypertext Preprocessor.   whereas there are various books on studying personal home page and constructing small purposes with it, there's a critical lack of understanding on "scaling" Hypertext Preprocessor for large-scale, business-critical structures. Schlossnagle's complicated Hypertext Preprocessor Programming fills that void, demonstrating that Hypertext Preprocessor is prepared for company net functions by way of displaying the reader find out how to enhance PHP-based functions for optimum functionality, balance, and extensibility.

Show description

Read Online or Download Advanced PHP Programming : A Practical Guide to Developing Large-scale Web Sites and Applications With PHP 5 PDF

Similar programming: programming languages books

Extra resources for Advanced PHP Programming : A Practical Guide to Developing Large-scale Web Sites and Applications With PHP 5

Sample text

In my company, code produced for clients is not considered complete until its entire external application programming interface (API) and any internal idiosyncrasies are fully documented. Documentation can be broken down into two major categories: n n Inline comments that explain the logic flow of the code, aimed principally at people modifying, enhancing, or debugging the code. API documentation for users who want to use the function or class without reading the code itself. The following sections describe these two types of documentation.

Because book pages are somewhat smaller than terminal windows, I use two space tab-widths in all code examples in this book. Many editors support auto-detection of formatting based on “magic” comments in the source code. For example, in vim, the following comment automatically sets an editor to use soft tabs (the expandtab option) and set their width to four spaces (the tabstop and softtabstop options): // vim: expandtab softtabstop=2 tabstop=2 shiftwidth=2 In addition, the vim command :retab will convert all your hard tabs to soft tabs in your document, so you should use it if you need to switch a document from using tabs to using spaces.

Vacuous comments only clutter the code. In the following example, the comment adds value: // Use the bitwise “AND” operatorest to see if the first bit in $i is set // to determine if $i is odd/even if($i & 1) { return true; } It explains that we are checking to see whether the first bit is set because if it is, the number is odd. API Documentation Documenting an API for external users is different from documenting code inline. In API documentation, the goal is to ensure that developers don’t have to look at the code at all to understand how it is to be used.

Download PDF sample

Rated 4.80 of 5 – based on 9 votes