PHP Thumb 3.0 Released

The long-awaited release is finally here!
PHP Thumb - An image manipulation library for PHP

Well, it’s been a long time coming, but I’ve finally managed to get the next release of my PHP Thumbnailer library completed! I’m also happy to announce that the project finally has its own website: http://phpthumb.gxdlabs.com. I’ve put a lot of work into bringing the class up to date, making it extensible, and most of all, making sure its well documented! I’ve also tried to make it easier to get help through either bug reports or forums dedicated to the project itself.

Rather than go into any detail, I want to encourage you to check out the project’s new site. Feel free, however, to share any thoughts you have in the comments for this post :)

Making RESTful Requests in PHP

How to GET, POST, PUT, & DELETE in PHP

APIs have become a very commonplace part of many popular web sites and services… especially REST APIs. I’ve already discussed how you can roll your own REST API for your PHP apps, but I’ve also received countless requests to go over how to actually make RESTful requests. That’s exactly what we’ll take a look at in this article. Before we dive in, however, I want to make sure you’ve got a basic understanding of how REST APIs work, so if you’re a bit shaky or unfamiliar with the concept, head on over to my previous article on REST and read up (you don’t need to go over the implementation stuff if you don’t want, just read the first part of the article). Seriously, do it… this article is written with the assumption you’re familiar with the concepts of REST.

Anyway, without any further delay, let’s take a look at what we’re going to cover…

Read the rest of this entry »

Create a REST API with PHP

Your apps never had it so good
Create

One of the latest (sort of) crazes sweeping the net is APIs, more specifically those that leverage REST. It’s really no surprise either, as consuming REST APIs is so incredibly easy… in any language. It’s also incredibly easy to create them as you essentially use nothing more than an HTTP spec that has existed for ages. One of the few things that I give Rails credit for is its well thought-out REST support, both for providing and consuming these APIs (as its been explained by all the Rails fanboys I work with).

Seriously, if you’ve never used REST, but you’ve ever had to work with (or worse, create) a SOAP API, or simply opened a WSDL and had your head explode, boy do I have good news for you!

Read the rest of this entry »

Working With the Aptana PHP Editor

I recently created a screencast for Aptana’s PHP Editor, and thought I would share it.

I’m also posting this since we recently relaunched our screencast site, http://tv.aptana.com. It’s actually really cool as its running entirely on Aptana Jaxer, and built with the soon-to-be released Active JS framework. I’ll soon be posting about the process of creating the site, but for now I’m happy to say that this is the first (to my knowledge) site written entirely in JavaScript that leverages Jaxer as a back-end for server side JavaScript.

Dynamically Add Functions to PHP Classes

Make your classes extensible and dynamic
Dynamically Add Functions to your PHP Classes

I’m in the process of working on the new version of my PHP Thumbnailer class, and came across a couple of interesting challenges. I’ve gotten a lot of great suggestions for features, and have wanted to add them, but at the same time don’t as I would prefer not to bloat the class with all sorts of functionality. So I started thinking about how I could provide certain functionality for people that want it, without either simply making it a part of the class (and making it more bloated as a result), or coming up with all sorts of extended classes to maintain and distribute. The other thing I don’t want to do is end up creating an app… I want this thing to be a small library. Finally, I want people to be able to integrate the library / classes into their existing apps as easily as possible. The solution (or paradigm I suppose) that jumped out was plugins. Ah, but how does one create plugins for classes? Rather, how do you dynamically add functions to PHP classes? Well, after some googling and tinkering, I think I’ve come up with the solution. Read on to see how it’s done…

Read the rest of this entry »