Archive for July, 2006

Understanding AJAX went to the Printer

Thursday, July 27th, 2006

The milestone i’ve been waiting for has finally happened.

My book went to the printer yesterday at 3:30 p.m

My Webthumb Status Screen :-)

Wednesday, July 26th, 2006

Understanding AJAX Cover Complete

Tuesday, July 25th, 2006

I just signed off on the finished Understanding AJAX cover.

Its exciting to be so close to having the finished book.

AzPHP has a meeting tonight, hope too see you there.

Webthumb updates

Wednesday, July 19th, 2006

Webthumb got off the ground yesterday without too many problems. It ran into problems right out of the gate since a large number of sites don’t seem to want to finish loading correctly. I was able to fix this by adding an extra timeout handler to the browser code. If we stop making progress loading a site for 5 seconds we just give up and snapshot what is currently loaded.

I also updated the server config, Webthumb now supports flash (version 7), and has a lot more fonts installed so sites that need non-latin characters should be working correctly.

My current feature goals are:
Better Url’s, something like /thumbs/url/time
5 minute cache on thumb generation (if anyone else has requested the same site in the last 5 minutes just return those images)
A way to get a thumb of a site without going through the queue, if its already been generated
A way to search for current thumbs
User accounts with:
Snap at time
Snap recurring

I’m also looking at prototying and API for access, though it may require paying a fee to use.

If you have any feature suggestions or input on an API leave a comment.

Webthumb

Tuesday, July 18th, 2006

So about 11 months (wow that long time ago, feels like last month) I used some code I had lying around to make some thumbnails of all the planet php blogs. Work priorities has finally allowed me to work on that code base again, and I was able to get things up to a usable state.

The result of this, is a new project. A website that lets you grab snapshots of any website at any time. The result is 3 different images, one at 800×600, one at 160×120 and one at 80×60.

I took a snapshot of mywebsite as an example.

Webthumb is still on the experimental side and the UI could use some improvements but its an interesting experiment so I thought I share it in its current state.

Now im guessing you’ll have a couple questions, so i’ll attempt to guess at a couple and answer them now.
How does it work:
I have a custom mozilla browser written in c++ that takes a url as a command line input and outputs a snapshot. This is wrapped in a bit of PHP code to generate 1 thumbnail at a time from a queue of requests.

Are you releasing the code:
The custom mozilla browser will be released under the GPL license by Uversa at op-en.org, but its not a priority right now. Im not planning on release my hack of a PHP website that it runs under at any time :-) .

Is there a webservice API:
I’d really like to make one, but I don’t have deep pockets and I don’t have a solution to making a system like that pay for itself.

phpDocumentor enhancements

Thursday, July 13th, 2006

As PHP keeps added language features one of the things we have to do is figure out how to document them.

Lately I’ve been hearing requests for a way to document virtual properties and methods on classes that are implemented using __call etc.

After talking a bit with Greg, I’m leaning towards adding in some new docblock tags to classes to allow these methods/properties to be documented.

It might look something like this:

<?php

/**
 * whatever
 *
 * @property int $blah this is the short desc (no long desc allowed)
 * @property-read int $foo read-only variable
 * @property-write string $oof write-only variable
 * @method int myfunc(int $var, string $param2, Object $param3 = null) description of myfunc
 */
class magicClass {
}

?>

My big concern with this approach is it can lead to a unwieldly class level docblock and it makes it hard to add large descriptions. On the plus side this is easy to implement and normally when you have a virtual method/property it doesn’t need a lot of description.

Finally if anyone has thoughts on managing changes like this in the future let me know. Right now we consider the phpDocumentor manual to be the official guide to how things work, but im not sure if that works that well for other people writing phpdoc parsers (ide’s etc).

Related Bugs:

Book Progress

Wednesday, July 12th, 2006

I’ll my copy editing reviewing is finally done. I’m in the process of reviewing layout right now and getting the last of the fixes sent in.

Understanding AJAX is really close to getting done. Also i should have a full table of contents to post in the next couple weeks.

This circle expands additional navigation