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

By George Schlossnagle

During the last 3 years personal home page has advanced from being a distinct segment language used so as to add dynamic performance to small websites to a robust instrument making robust inroads into large-scale, business-critical net structures.   The fast maturation of Hypertext Preprocessor has created a skeptical inhabitants of clients from extra conventional "enterprise" languages who query the readiness and skill of Hypertext Preprocessor to scale, in addition to a wide inhabitants of Hypertext Preprocessor builders with no formal desktop technology backgrounds who've realized throughout the hands-on experimentation whereas constructing small and midsize functions in personal home page.   whereas there are lots of books on studying Hypertext Preprocessor and constructing small purposes with it, there's a severe lack of knowledge on "scaling" personal home page for large-scale, business-critical structures. Schlossnagle's complicated personal home page Programming fills that void, demonstrating that Hypertext Preprocessor is prepared for company internet purposes by way of exhibiting the reader tips on how to improve PHP-based purposes 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

Best programming: programming languages books

Oracle InterMedia Java Classes. User's Guide and Reference

This advisor describes how one can use Oracle interMedia Java periods. This advisor is for builders or database directors who're drawn to storing, retrieving, and manipulating multimedia information in an Oracle database, together with builders of multimedia specialization functions. clients of this advisor must have adventure with Java and JDBC.

Developing Applications with Java(TM) and UML

Constructing functions with Java™ and UML makes a speciality of the craft of making caliber Java software program. The e-book introduces the basics of the Unified Modeling Language (UML) and demonstrates how one can use this average object-oriented notation to construct extra strong Java purposes that satisfy clients' requisites and stand the try of time.

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

Example text

Next, you write some documentation for a function. phpDocumentor tries its best to be smart, but it needs some help. A function’s or class’s documentation comment must immediately precede its declaration; otherwise, it will be applied to the intervening code instead. Note that the following example specifies @param for the one input parameter for the function, as well as @return to detail what the function returns: /** * Determines whether a number is prime * * Determines whether a number is prime * about the slowest way possible.

Here’s an example: $foo = ‘bar’; 19 20 Chapter 1 Coding Styles In this case, you create an entry in the current symbol table for foo and link it to its current value, bar. Similarly, when you define a class or a function, you insert the class or function into another symbol table. Here’s an example: function hello($name) { print “Hello $name\n”; } In this case, hello is inserted into another symbol table, this one for functions, and tied to the compiled optree for its code. Chapter 20, “PHP and Zend Engine Internals,” explores how the mechanics of these operations occur in PHP, but for now let’s focus on making code readable and maintainable.

The refactoring of protected methods requires more care, to avoid breaking the classes’ subclasses. Encapsulation is not necessary in PHP (if it is omitted, methods and properties are assumed to be public), but it should be used when possible. This quickly leads to unmaintainable code, though, because instead of a simple public interface having to be consistent, all the methods in a class are unable to be refactored for fear of causing a bug in a class that uses that method. Using PPP binds you to this agreement and ensures that only public methods are used by external code, regardless of the temptation to shortcut.

Download PDF sample

Rated 4.81 of 5 – based on 13 votes