The Web Wizard's Guide to PHP
Title: The Web Wizard's Guide to PHPAuthor: David A. LashPublisher: Addison-WesleyISBN: 0-321-12174-0
If you're looking to learn PHP or to teach a course on PHP, check out The Web Wizard's Guide to PHP by David Lash. This is an excellent book for learning PHP, even if you have no programming skills. If you're like me and have experience in another language, such as Perl, you'll find that Lash's book makes it easy to rapidly get up to speed in PHP. Although it's only a little over 200 pages in length, it's packed with all you need to get started with PHP and offered at a fair price.
The book explains PHP variables, how to pass them between web pages and PHP scripts and how to build expressions for pattern matching and data extraction. It covers the basics of arrays and associative arrays, and it shows practical ways to incorporate them into web design. It also explains the syntax for script flow controls (i.e., "if" and "else" statements, "for" and "while" loops) and provides useful examples of each. As for more advanced topics, Lash presents them in an approachable manner, including opening, reading, writing and closing files. He also goes over creating and using PHP sessions and cookies. The last chapter in this eight-chapter book provides basic instructions on writing PHP scripts to interface with a MySQL database and some related examples. Finally, several exercises are offered at the end of each chapter to reinforce concepts in depth.
When I spoke with Lash, he mentioned he took special care in preparing the example scripts in his book. He wanted to provide real-life examples that were clean and to the point. They involve order forms, inventory look-ups and some typical web functions, such as user comment forms that e-mail a webmaster. Lash, an adjunct professor at DePaul University in Chicago, said that he wanted the example scripts to be intermingled among the text to make learning PHP easier. "My students like that they can work through the examples without having to wade through a lot of text before being able to apply the concepts presented."
Good advice on coding style and documenting accompanies many of the examples, as do warnings concerning common mistakes that newcomers to PHP typically make and how to troubleshoot them. "Teaching evening courses to working adults at a liberal arts school definitely helped prepare me for writing this book", says Lash, who is also a software engineer at Lucent. Because of his experience working with non-technical students, he makes no assumptions about the reader's background in his book except that the reader has some familiarity with HTML. But this is not required when used in a class room setting. As such, he introduces PHP functions in a manner that shouldn't lose the beginner nor bore the more advanced programmer.
Because the book was made primarily for use in the classroom, it has a schoolbook feel to it. While you may find this book to be reminiscent of your middle-school days, please do not think this is a book for teenagers. "The book strives to have some of the easy-to-use qualities of those Visual computer books but with solid explanations and real-world examples useful to classrooms and software professionals", says Lash. "I wanted to provide simple, straightforward explanations with useful examples and syntax descriptions." The playful graphics and the color-coded scripts, which add to the schoolbook style, both disarm readers who have never learned a programming language and make studying the code easier. To further assist in picking apart the code presented in the book, incidentally, Lash provides line-by-line explanations of each script excerpt.
If you would like to make use of Lash's book for teaching a web design course, you can find instructor aides on Addison-Wesley's site for their Web Wizard series. Lash says, "I put in a lot of extra work on the course materials because I knew that I was going to use them for my classes."
The site provides PowerPoint slides (which can be opened in OpenOffice, by the way), sample tests, class handouts and instructor tips. To get access to these resources, including answers to the test questions and the exercises at the end of each chapter, you need to talk to an Addison-Wesley sales representative about setting up a free instructor account. Go to the web site mentioned above for contact information. By the way, several other books in Addison-Wesley's Web Wizard series (listed on the site) may be of interest to you, including another book by David Lash on Perl and CGI.
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- Django Models and Migrations
- Hacking a Safe with Bash
- Secure Server Deployments in Hostile Territory, Part II
- Huge Package Overhaul for Debian and Ubuntu
- The Controversy Behind Canonical's Intellectual Property Policy
- Home Automation with Raspberry Pi
- Shashlik - a Tasty New Android Simulator
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile
- diff -u: What's New in Kernel Development