Back when we covered Diffbot, the visual AI-enhanced machine-learning crawler, we also mentioned they have libraries for a wide array of programming languages, but those are often less than cutting edge - with so many to keep an eye on, there’s bound to be a few bad apples that slip through the cracks. One such apple is the PHP library, and we’ll be building an alternative in this series, in an effort to do it better.
Note that this tutorial will focus on writing a good package - the code we write will be real and production-ready, but you shouldn’t focus too much on Diffbot itself. Diffbot’s API is simple enough and Guzzle’s interface is smooth enough to just consume it outright without the need for a PHP library anyway. Rather, pay attention to the approaches we use to develop a high quality PHP package, so you can reuse them in your own project. Diffbot was selected as the subject of the package because I’d like to demonstrate best practices on a real world example, rather than yet another “Acme” package.
Continue reading %Starting a New PHP Package The Right Way%
by Bruno Skvorc via SitePoint
No comments:
Post a Comment