Posts tagged 'review'

Book review - Guide to Web Scraping with PHP

published on May 25, 2011.
Heads-up! You're reading an old post and the information in it is quite probably outdated.

It took me a while to grab myself a copy of Matthew Turland’sGuide to Web Scraping with PHP”, but a few weeks ago a copy finally arrived and I had the pleasure of reading it. I planned to buy it right as the print copy was announced, but then realised that php|arch accepts only PayPal as the payment method, which doesn’t work from Serbia, so I had to postpone the shopping for some better times. Fast forward 5-6 months and I found a copy on the Book Depository, which has no shipping costs! Yey!

My overall impression of the book is that it was worth the time and I’m really glad that I bought it. Matthew did a great job explaining all the tools we have at our disposal for writing web scrapers and how to use them. The chapter on HTTP at the beginning and a chapter with some tips and tricks at the end of the book, fit in great with the rest of the chapters, which are full of code examples. For the first reading, I’d recommend reading the book cover to cover, to get an overall view of all the tools presented, but later the chapters can be read independently.

As I said, the first chapter (actually, the second one, the first one is the introductory chapter :p), deals with the HTTP, especially with the parts of it which are needed for understanding, using and creating web scrapers.

The book then continues on different client libraries we can use to send HTTP requests and receive responses. Libraries like cURL or Zend_Http_Client are explained, but it is also explained how one can create his own using streams (the author does note that you’d be better of with an existing one!). For each of the tools it is described, how to handle things like authentication, redirects and timeouts, amongst others…

The second part of the book deals with preparing the documents for, and with the actual parsing of the data from these documents. Again, different tools are presented and explained, which one to use when and why. If none of the parsing tools can help, a most essential overview of the PCRE extension is given, too.

The book is finished with a nice “Tips and Tricks” chapter, which discusses real-time vs batch job scrapers, how to work with forms, the importance of unit testing… IMHO, without this last chapter, the book would not be finished.

I’m thinking hard right now, what bad things could I say about this book, but I can’t think of any. It is a guide, clear and straight-to-the-point, explaining what tools are there, which one to use and how for writing scrapers and that’s exactly what I wanted to know.

Yep, I’d recommend this book to anyone interested in web scraping with PHP :)

Book review - jQuery 1.3 with PHP

published on January 06, 2010.
Heads-up! You're reading an old post and the information in it is quite probably outdated.

Although I never wrote about jQuery here, I use it quite often and can pull of nice tricks with it. Also, bending any jQuery plugin to my will, was never a problem. But enough about me, you’re here cause of the book.

jQuery 1.3 with PHP is written by Kae Verens, a JavaScript and PHP developer. This book is aimed at PHP developers who have met only a few times with JavaScript and jQuery, but I believe even a novice programmer can gain knowledge from it – just be warned, the PHP examples are here for the sake of the examples only; about which the author warns throughout the book. As the author said: “This book is designed to help a PHP developer write some immediately-useful client-side applications without needing weeks of study”. And it will.

On the other hand, you need to know your HTML and CSS selectors, as the book only says that jQuery uses CSS selectors to select elements.

The examples in the book are well explained and commented!

The book starts off with an introductory chapter about jQuery, what it is, why the author chose it over other JS libraries, what projects use jQuery and so on…

The “Quick tricks” chapter shows some really quick but useful tricks, such as dynamic select boxes, contextual help or inline editing. OK, you may have all done this before, but it’s a good starting point for getting to know jQuery.

From chapter 3 to chapter 9, the author shows how to do things like validating forms, creating an event calendar, managing files and folders from the browser, rotating, cropping, resizing images (with ImageMagick!) also from the browser or making lists sortable by dragging and dropping items. Of course, no one wants to reinvent the wheel, so all the examples are using plugins – either from the jQuery UI collection or “standalone” plugins that are “too specific” to be in the said collection.

My personal favorite chapter is the “Data tables” chapter, which shows how to present and use table data on your website by adding sort, filter and pagination functionality to your table. The example shown uses a table with over 2 million rows, which is worth mentioning, cause this way we know that it’ll work on a large dataset also.

The final chapter is reserved for optimizing the front-end code and reveals some stuff behind jQuery and JavaScript in general (I personally never knew that there’s a speed difference between different type of selectors).

In conclusion, if you’re a PHP dev wanting to “spice up” your apps, this book will most likely worth the money spent.

You can take a look at the Table of Contents, read the sample chapter, or just buy the book!

Tags: book, jquery, php, review.
Categories: Development, Programming.

Zend Framework 1.8 Web Application Development book review

published on November 17, 2009.
Heads-up! You're reading an old post and the information in it is quite probably outdated.

A few days ago I finished reading Keith Pope’s book titled “Zend Framework 1.8 Web Application Development”, so, after letting it “rest” in my mind for a while, here are my thoughts on it…

First, I must point out the “language” of the book - I was expecting a text that’s hard to follow, that’s full of words and sentences requiring at least two dictionaries by my side to help me out (hey, English is not my first language!), but, it was quite an easy and, if I may add, an enjoyable read.

If you think, that you’re just gonna sit down, read the book and know all about Zend Framework, boy you’re wrong! Yes, the book explains a lot, but you’ll still need to follow the example codes along the way and play with them to get really familiar with ZF.

The book starts off with a basic application (yep, “Hello world!”), explains the bootstrapping, configuring, working with action controllers, views and handling errors… The second chapter continues with explaining the MVC architecture, the front controller, router, dispatcher… It even has a nice flowchart about the whole dispatch process, great stuff.

From chapter 3 to chapter 12, the author is taking you through a process of building a web application – from creating the basic directory structure, over the hardcore programming stuff to the optimizing/testing part. Chapter 4 gives a rather good explanation on the “Fat Model Skinny Controller” concept; chapter 8 deals with authentication and authorization; chapter 11 takes care of the optimization.

At last, my favourite part of the book is when the author has several “ways out of a problem”, he tells the good and the bad sides of each, picks out the best one and explains why did he choose that particular one. I hate it when an author just simply says: “This is the right way, trust me.”, without caring to explain why.

So, would I recommend this book to a friend who wants to start working with ZF? Absolutely.

Also, be sure to check out what Jani, Raphael, Rob and Sudheer have to say about this book (Jani’s and Rob’s reviews are not up yet, so I’m linking to their feeds!), too.

Happy reading! :)

Edit 2009., November 23rd: Added a link Sudheer’s post :)

Tags: book, framework, php, review, zend, zf.
Categories: Development, Programming.
Robert Basic

Robert Basic

Software engineer, consultant, open source contributor.

Let's work together!

If you require outsourcing or consulting help on your projects, I'm available!

Robert Basic © 2008 — 2018
Get the feed