PHP 5 Recipes
jsuda writes "
With all the books being published recently about PHP a new one will need to find
and fill a niche to distinguish itself. PHP 5 Recipes: A Problem-Solution
Approach, published by Apress, has done so, in my view. This is an intermediate-level
volume exploring PHP 5 using a recipe approach where the basics of
PHP 5's functionality are expressed systematically but in a small-topic
by small-topic manner. Cook-book style, each topic is relatively autonomous
and can be individually selected, as necessary, for information or review, similarly
to how many refer to the Joy of Cooking for help on a cooking project.
It's a source for instant solutions to common PHP-related problems. There are
over 200 such recipes presented." Read the rest of jsuda's review.
Php 5 Recipes: A Problem-Solution Approach
author
Lee Babin, Nathan Good, Frank M. Kronman, Jon Stephens
pages
646
publisher
Apress
rating
8
reviewer
John Suda
ISBN
1-59059-509-2
summary
A problem solving approach to Php 5
Each of these recipes refers to a small element or aspect of PHP 5 and the presentations contain a brief overview of the topic, an explanation of how the code elements work, and where the code is applicable in projects. Overall, the book covers the whole range of PHP 5 functionality where each major element of PHP 5 is addressed in a recipe explaining and illuminating relevant code elements. You can easily get information about a specific PHP 5 element by going directly to the section of the book where it appears. Even better, the code snippets are designed to allow one to copy and paste them into your own applications or development easily and then to configure them as necessary. All of the code snippets are freely available for downloading at the publisher's website at www.apress.com.
There are 16 chapters and an index covering a total of 646 pages. The chapters are organized similarly to other PHP primers, covering the basic elements of PHP - data types, operations, arrays, strings, variables, files and directories, dates and times, functions, and regular expressions. The coverage for much of these concepts is relatively mundane and unoriginal. The discussion of dynamic imaging, however, is an exception. The writing throughout, however, is solid and clear. The book emphasizes the most important elements of new PHP 5. The object-oriented programming elements especially are covered - classes, objects, protected class variables, exception handling, interfaces, and the new mysqli database extension. The authors' discussions focus on PHP 5.0.4, MySQL 4.1, and cover Linux and Windows environments.
The book is directed at PHP programmers looking to learn the elements introduced by PHP 5, and for those looking to find fast solutions to coding problems. It assumes a basic knowledge of PHP. Many of the recipes discuss object-oriented programming and these are some of the more advanced sections of the book. I can say that Chapter 2, which introduces the object-oriented concepts is one of the better explanations of the topic that I've read. The chapter covers constructors, destructors, methods and properties, class diagrams and examples of these concepts at work in code snippets. There are a number of interesting segments containing custom coding of classes as reusable templates from which to create objects.
The book is well-designed and written. The discussion is clear and logical. The code snippets are well-explained. The authors are experienced programmers and developers, and Good and Stephens have authored or co-authored a number of technical books.
A large handful of the recipes contain projects, usually appearing at the end of the overview and presentation of code snippets covering the basics of the topics. The projects usually deal with the creation of higher-end classes and objects as solutions to common coding problems. The idea here is to show PHP 5 functionality at work providing useful code sections to be dropped into your custom applications. Chapter Five concludes with a sophisticated class dealing with dates and times issues. Other chapters contain constructions of string, file, graphics, and regular expression classes.
The last five chapters deal with using the PHP code in web applications and services. This material covers cookies (including construction of a cookie class), using HTTP headers, sessions, and using query strings. Much of this material has been covered elsewhere in the many primers on PHP already published. There is a chapter on using forms and an interesting chapter on working with markup. The better chapters are on using DOM to generate markup, parsing XML, using RSS feeds, SOAP, and simple XML. The chapter on mysql is basic, except for the section on creating a wrapper class. The last chapter deals with communicating with Internet services, like POP, iMap, and FTP. Another project presented here is one creating object-oriented code dealing with a mail class.
This is a useful book to have in a programmer's library."
You can purchase Php 5 Recipes: A Problem-Solution Approach from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Each of these recipes refers to a small element or aspect of PHP 5 and the presentations contain a brief overview of the topic, an explanation of how the code elements work, and where the code is applicable in projects. Overall, the book covers the whole range of PHP 5 functionality where each major element of PHP 5 is addressed in a recipe explaining and illuminating relevant code elements. You can easily get information about a specific PHP 5 element by going directly to the section of the book where it appears. Even better, the code snippets are designed to allow one to copy and paste them into your own applications or development easily and then to configure them as necessary. All of the code snippets are freely available for downloading at the publisher's website at www.apress.com.
There are 16 chapters and an index covering a total of 646 pages. The chapters are organized similarly to other PHP primers, covering the basic elements of PHP - data types, operations, arrays, strings, variables, files and directories, dates and times, functions, and regular expressions. The coverage for much of these concepts is relatively mundane and unoriginal. The discussion of dynamic imaging, however, is an exception. The writing throughout, however, is solid and clear. The book emphasizes the most important elements of new PHP 5. The object-oriented programming elements especially are covered - classes, objects, protected class variables, exception handling, interfaces, and the new mysqli database extension. The authors' discussions focus on PHP 5.0.4, MySQL 4.1, and cover Linux and Windows environments.
The book is directed at PHP programmers looking to learn the elements introduced by PHP 5, and for those looking to find fast solutions to coding problems. It assumes a basic knowledge of PHP. Many of the recipes discuss object-oriented programming and these are some of the more advanced sections of the book. I can say that Chapter 2, which introduces the object-oriented concepts is one of the better explanations of the topic that I've read. The chapter covers constructors, destructors, methods and properties, class diagrams and examples of these concepts at work in code snippets. There are a number of interesting segments containing custom coding of classes as reusable templates from which to create objects.
The book is well-designed and written. The discussion is clear and logical. The code snippets are well-explained. The authors are experienced programmers and developers, and Good and Stephens have authored or co-authored a number of technical books.
A large handful of the recipes contain projects, usually appearing at the end of the overview and presentation of code snippets covering the basics of the topics. The projects usually deal with the creation of higher-end classes and objects as solutions to common coding problems. The idea here is to show PHP 5 functionality at work providing useful code sections to be dropped into your custom applications. Chapter Five concludes with a sophisticated class dealing with dates and times issues. Other chapters contain constructions of string, file, graphics, and regular expression classes.
The last five chapters deal with using the PHP code in web applications and services. This material covers cookies (including construction of a cookie class), using HTTP headers, sessions, and using query strings. Much of this material has been covered elsewhere in the many primers on PHP already published. There is a chapter on using forms and an interesting chapter on working with markup. The better chapters are on using DOM to generate markup, parsing XML, using RSS feeds, SOAP, and simple XML. The chapter on mysql is basic, except for the section on creating a wrapper class. The last chapter deals with communicating with Internet services, like POP, iMap, and FTP. Another project presented here is one creating object-oriented code dealing with a mail class.
This is a useful book to have in a programmer's library."
You can purchase Php 5 Recipes: A Problem-Solution Approach from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
hedis
Give Up
TLA meals for the whole family.
f1rst p0st
Do the examples show how to write solid, secure code?
Indeed, inexperienced programmers writing insecure code has plagued PHP for years now. Far too many PHP books that I have flipped through show very poor style. They don't verify the inputted data, for instance, before making a SQL query.
So while a professional, or even somebody with some level of experience, would see such an obvious problem, a beginner may not. And then the result is often a compromised server, a destroyed database, or some other shenanigans. Often times a problem with a user's PHP script ends up making other, completely innocent and unrelated projects (such as Apache or Linux) look to be at fault. That's not good for the image of the community.
Cyric Zndovzny at your service.
Am I finally going to learn how to display "Hello World!"?
do.what.promptcmds
Due to the constant vulnerability announcements and lack of RedHat legacy rpm support, we've been removing PHP from all our webservers.
that PHP sucks donkey anuses? That poorly designed, hackish, continually mutating language needs to die. Give it up. You lost the language war.
I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
Maybe...
Come as you are, do what you must, be who you will.
Many PHP books I've seen often include an SQL tutorial. Due to space constrains, it is often quite lacking and only focuses on using SQL, rather than designing efficient and well-planned databases. Such half-assed tutorials may often be very misleading to new PHP users.
I recall working with one web developer who learned PHP from such a book. We told him that we wanted to use PostgreSQL as the backend for our site, but he insisted on using MySQL, since that was the only system mentioned in the book he had bought. We no longer required his services after that show of incompetence.
Does this book try to cover topics such as SQL and database design, which should be covered in their own, separate book(s)? Does it specifically refer readers interested in such subjects to consult other sources of information?
Cyric Zndovzny at your service.
Too bad PHP is so popular, pulling work away from languages that are well-designed. Argh. Too bad it costs more to get Python or Ruby hosting, and one cannot even hardly find Scheme hosts.
i tried looking on google. i need a good recipe about how to cook crack. i figure if i cook crack and sell it locally for about a few years i can make money. i'll save it up. no bling-bling for me. no car on rims. no prada jeans. no louie vutton flip flops either. while i sell/cook crack, i can seriously work on my rap game. i need to learn how to spit hot fire. after the spit game is going, i'll go into hollywood and get all the drug dealer parts in movies because i used to be one.
oh wait did 50 cent already do this?
Seriously slashdot, how you have fallen.
It may also be that security doesn't play a prominent role in the PHP community. The emphasis is more on developing solutions quickly, that appear to give the desired results. But it is ignored that such systems are often vulnerable in numerous, very obvious ways. No system will ever be completely secure, but the attitude in the PHP community would appear to be one where security is considered to be of little consequence. The numerous security issues found in PHP and various applications built using PHP would appear to back up this fact.
Of course, anybody who has designed any serious web applications knows that security is paramount. The integrity of one's data is an utmost concern.
Now, writing secure code isn't always an easy task. But that's no reason for the majority of PHP users to remain ignorant of even the most basic techniques.
Cyric Zndovzny at your service.
I learned PHP using Kevin Yanks tutorials and articles 4 years ago. His books and tutorials are very easy to understand and use. His tutorials and articles can be read on http://sitepoint.com/
Does anyone know if an anti-PHP coalition has been formed? What I envision is an organization of web developers who take time to point out the numerous flaws of PHP, and software written using PHP. They could even lobby distributions to not include PHP, due to the many security problems is poses.
Such a group could also give more useful reviews of books such as this. They could rate them with regards to their focus on security and writing quality code, for instance. It would also be beneficial if the group performed audits of various applications built using PHP, and put out notices suggesting which ones to avoid.
Cyric Zndovzny at your service.
That's the problem: there are very few in the PHP community who have the security knowledge and background to pass good advice and technique on to others.
What happens is that a developer with such background evaluates PHP, and sees that it is completely lacking with respect to security. Of course, such a developer does not use PHP for any serious project, and does not get involved with the PHP community. And this lack of involvement of trained or experienced individuals results in the ignorant trying to teach the ignorant. That leads to the massive and numerous security problems which plague PHP and much of the software developed with it.
Cyric Zndovzny at your service.
Maybe /. can do a review of 'CLOSED TAGS FOR DUMMIES' next.
Someone has an unclosed italics tag somewhere...
Look, I fixed it!
I'd like to see more distributions include Catalyst. I think Mandrake is the only one that does, now. If MVC frameworks like Catalyst were more universally available (as PHP is now) they'd get a lot more use.
Save yourself some money by buying the book here: PHP 5 Recipes. And if you use the "secret" A9.com discount, you can save an extra 1.57%!
An anti-PHP/anti-ASP coalition would be even better than separate anti-PHP and anti-ASP coalitions.
Either way, the fact remains that insecure, faulty systems are used far too often for web development. The best thing that can be done at this point is to raise awareness as to the flaws and problems associated with such systems. That may be the most effective way to eradicate their use, thus providing a far more secure Internet.
Cyric Zndovzny at your service.
It's hard to move them off PHP. The majority don't even use it, it only exists because it was included in the standard build (not my decision).
Now I'm hungry again!
All comments are properties and trademarks of the voices in my head. Not like I'm gonna claim them.
The term "Engineer" is, in most contexts, a priviledged term. Not just anybody can be labelled an "Engineer" until they've gone through some rigor.
Why not apply this idea to software? If there was a coalition or Union of workers, with a commonly agreed-upon set of requirements and certifications, with annual fees and a good reason to require a decent demonstration of competence? Something with real teeth, and ongoing certification requirements. Think, the Bar, only for software engineers instead of Attorneys. As with Real Estate, being a "Realtor" is a priviledged term.
If done right, it would be AWESOME to mention on a resume, and would likely become something like the Underwriter's Laboratories - a private entity, but one that's almost required by law simply because it's a reasonable assurance of safety.
There are a number of VENDOR certifications (EG: CCNE, RHCE, and the laughable MCSE, etc) but is there any platform-neutral, "This guy knows how to validate input and write qualifiable code" organization?
I have no problem with your religion until you decide it's reason to deprive others of the truth.
PHP, isn't that like the betamax of scripting languages?
Thanks!
Does B&N have an affiliate program? Looking at the purchase link, I see it passing an encoded userid.
I'm just wondering if someone is trying to make a buck off of this.
There is allegedly at least a 50% discount for the ebook as against the printed version, although the price of $22.50 means there is a nad less than a 50% discount from the full $44.99.
I guess publishers don't have to know maths, or they are just tight. That whole half cent makes their statement a lie..
Maybe they meant up to 50% discount.
I've never seen so many people bag on a web scripting language. Perhaps there should be a whole discussion board dedicated to your web language of choice whether is Pearl, JSP/JAVA, PHP. ASP, .NET or ColdFusion.
.NET. .Net is fast and easy, but you're stuck with Microsoft and it can be very browser specfic. ColdFusion is slow, but super easy.
I've heard great things and bad things about all of them. Pearl is hard to learn, but is super fast and secure. Java is super slow and hard to learn, but very secure. PHP is easy to learn moderately fast, but insecure. ASP is fast, but is being replaced by
Do you choose your language because that's what feeds you or do you choose it because you believe it's the best technology?
So what language would you PHP~Flamers suggest? RoR? Perl? JSP? .NET?
As many others have stated, blame the newbie coders not the environment. Every year people die trying to blow-dry their hair in the shower, it's not the water company, electric company or hair dryer company's fault.
Sure it lets you get into a mess rather quickly, but so does Linux in general. So does almost every other web language. Don't tell me you can't shoot yourself in the foot with Perl or ASP, if you think that you're a fool. They don't FORCE you to write secure queries or data validation classes either.
Most of you just like to cry about whatever others are. I'd wager some flamers here use FrontPage for their 'web development' tasks.
At the risk of getting off-topic, I've found Apress to be a reliable publisher, in terms of the quality of books they put out. The topics have been interesting, the knowledge useful, and the text easy to read. It's the only publisher whose books I'd buy just on name recognition.
Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me. - John 14:6 NLT
"There is a chapter on using forms and an interesting chapter on working with markup. The better chapters are on using DOM to generate markup, parsing XML, using RSS feeds, SOAP, and simple XML. The chapter on mysql is basic, except for the section on creating a wrapper class. The last chapter deals with communicating with Internet services, like POP, iMap, and FTP. Another project presented here is one creating object-oriented code dealing with a mail class."
If you actually learn something 'new' from this book, then you still have a long way to go!
the only permanence in existence, is the impermanence of existence.