Robert Basic's blog

Posts tagged 'book'

Book review - Guide to Web Scraping with PHP

by Robert Basic 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 :)

Tags: about, book, php, review, web scraping.
Categories: Development, Programming.

Book review - jQuery 1.3 with PHP

by Robert Basic 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

by Robert Basic 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.
Categories: Development, Programming.

Online resources for Zend Framework

by Robert Basic on March 03, 2009.
Heads-up! You're reading an old post and the information in it is quite probably outdated.

Besides the official documentation and the Quickstart, there are many useful resources for Zend Framework, like blogs and Twitter. I did my best to collect them. If you know something that’s not listed here, but should be, please leave a comment and I’ll update the post :)

Update #1 (seconds after publishing): Gotta love Twitter. Already got a message that I missed a blog. List is updated.

Update #2: Added more blogs to the list, thanks Jani for the recommendations!

Update #3: Thanks to Federico and Pablo, even more stuff to add :)

Update #4: Thank you Jon and Cal :)

Update #5: This is growing up into a pretty big list :) new stuff added!

Update #6: Should I keep adding these Update #x lines? :)

Update #7: A bunch of new stuff!

Update #8: A new ZF application via Federico’s blog!

Blogs

Blogs are probably the most important resources out there. Besides the posts, comments can add a great value to the topic, so be sure to read them too. Here are the blogs that have posts on ZF and were updated recently (in the past month or two):

Also, I recommend subscribing to PHPDeveloper’s and Zend Developer Zone’s feeds, just in case I missed some good blogs ;)

Twitter

On Twitter there are many friendly developers willing to help out with any problems related to Zend Framework &#151 just write your question with a ZF hashtag and someone will most likely show up with the answer :)

Books

These two books are a must read. That is all :)

Surviving The Deep End — a free online book that is written chapter by chapter. Author is Pádraic Brady:

The book was written to guide readers through the metaphorical "Deep End". It's the place you find yourself in when you complete a few tutorials and scan through the Reference Guide, where you are buried in knowledge up to your neck but without a clue about how to bind it all together effectively into an application. This take on the Zend Framework offers a survival guide, boosting your understanding of the framework and how it all fits together by following the development of a single application from start to finish. I'll even throw in a few bad jokes for free.

Zend Framework in Action — OK, this book is not an online resource, but it is great and surely must be mentioned :) Authors are Rob Allen, Nick Lo and Steven Brown:

Zend Framework in Action is a book that covers all you need to know to get started with the Zend Framework.
The first part of the book works through the creation of web site using the MVC components (Zend_Controller, Zend_View and Zend_Db). The book then follows on by looking at user authentication and access control, forms, searching and email to round out the application. After considering deployment issues, we then look at other components that add value to a web site; including web services, PDF creation, internationalisation and caching.

Guide to Programming with Zend Framework — another great book, a must have. Written by Cal Evans.

This book covers much of the primary functionality offered by the Zend Framework, and works well both as a thorough introduction to its use and as a reference for higher-level tasks

Beginning Zend Framework — written by Armando Padilla

Beginning Zend Framework is a beginner’s guide to learning and using the Zend Framework. It covers everything from the installation to the various features of the framework to get the reader up and running quickly.

Easy PHP Websites with Zend Framework by Jason Gilmore

Easy PHP Websites with the Zend Framework is the ultimate guide to building powerful PHP websites. Combining over 330 pages of instruction with almost 5 hours of online video and all of the example code, you’ll have everything you need to learn PHP faster and more effectively than you ever imagined.

Applications powered by ZF

Wanna see what’s ZF capable of?

Other resources

Of course, there’s the good ol’ IRC, channels are #zftalk and #zftalk.dev. For more information, visit ZFTalk.

Jani Hartikainen’s Packageizer is a great tool to get only those ZF components you need.

Scienta ZF Debug Bar an awesome plugin for Zend Framework which “injects into every request a snippet of HTML with commonly used debug information.”

There’s also the Zend Framework Forum. For those of you who understand it, here’s a German forum www.zfforum.de.

The Zend Framework Wiki and the Zend Framework Issue Tracker are also very helpful, so, be sure to check them out.

The unofficial PEAR channel for the Zend Framework can be found at http://zend.googlecode.com/.

That’s all from me. This are the resources I found useful and hopefully are and will be useful for you too :)

Do you know anything I missed? If so, please, leave a comment and I’ll update the post :)

Cheers!

Tags: blog, book, framework, resource, site, twitter, zend.
Categories: Development, Places on the web, Programming.