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 »

Aptana PHP 1.0 Released – Free PHP IDE

Aptana (yes, this is a shameless plug) released version 1.0 of its PHP support yesterday, and it is something that you should definitely check out. Prior to working at Aptana, I was an avid user of Zend Studio, and Coda, simply because those were the best PHP IDEs as far as I was concerned. Over the past few months, however, we’ve been hard at work on the PHP support for Aptana Studio, and I can say with much confidence that it is in every way as good as every other PHP IDE out there, and better than some in other respects. I would also say this regardless of the fact that I work for the company… it really is that good! Read on to find out about all the new goodness…

Read the rest of this entry »

PHP Optimization and Scalability – Slides and Source

I gave a talk for the San Jose PHP meetup last night on PHP scalability and optimization. Everything from good code (and bad code) to infrastructure (including Cloud Hosting with Aptana) was covered.

If you have any questions, feel free to post them in the comments, I’ll respond to them as soon as I can!

Enjoy.

Source Code

Scalability In PHP
View SlideShare presentation or Upload your own. (tags: scalability php)