News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Jake Blauzier's Blog:
Event-Based AJAX Framework for PHP
June 12, 2008 @ 11:18:31

Jake Blauzier has just posted the last part of his series focusing on the creation of an event-based Ajax framework that works with PHP. It allows for calls to static functions, can return Javascript representations of PHP objects and a "call queue" system to keep things from overlapping.

Here's the list of the parts of the series:

  • Part 1 - introduction, sample usage
  • Part 2 - problems in making an event-based ajax callback model (and his solutions)
  • Part 3 - the use of JSON in the framework
  • Part 4 - implementation of the Scriptifiable interface
  • Part 5 - implementing the Remotable interface

You can download the latest version of his Ajax framework directly from his blog.

0 comments voice your opinion now!
eventbased ajax framework series json callback scriptifiable remotable



John Maver's Blog:
How to create a Bebo application using PHP 5
May 12, 2008 @ 17:21:17

In this new post on his blog, John Maver gives a step-by-step guide for creating a PHP5 application for the popular social networking site Bebo.com.

I have been answering a lot of email requests for how to get started with a Bebo application. Since applications can be written in any language that supports interaction with the Bebo REST API, developers have a lot of choices in how they build their application. The focus of this article will be on the "officially supported language" - PHP.

He defines the parts of the application first (the callback, canvas page, profile box, invitation and news stories). Much like the Facebook API, the Bebo system has you host the application on your own servers and use their developer libraries to interface with their systems. He makes a simple application that has a "story" published to it that shows to each visitor.

He also tosses in a method for knowing a bit more about the user - like if they've just added the application, if they're a normal user or if they've just removed it from their application list.

0 comments voice your opinion now!
bebop application php5 tutorial callback canvas profile news invitation


Developer Tutorials Blog:
PHP array_walk() Run an array through a function
April 23, 2008 @ 08:47:09

The Developer Tutorials blog has a quick example of how to use the array_walk function to maneuver through the array of your choosing and applying a callback method to each of its elements.

It's a common sight: taking an array and running (well, walking) its elements through a particular function. Luckily, PHP provides a simple yet powerful function to overcome this: array_walk().

They include an example, giving a sample "some_function" the array_walk method uses when it's called, replacing a foreach (or other type of loop). Plus you can specify an object with the callback to run it against a method inside a class too.

2 comments voice your opinion now!
arraywalk function callback object method loop tutorial


Alexander Netkachev's Blog:
Practical PHP events
October 24, 2006 @ 07:20:48

In his latest tutorial, Alexander Netkachev shows how to, with some of the simple PHP functions, create an event system for your script, complete with callbacks.

The way how events are raised and how listeners are attached on the events is a part of a core in many modern applications. It plays an important role in some enterprise design patterns (MVC, for example).

He starts with the basics of event handling - some of the terms and descriptions of basic functionality that any good event handler would have. He describes the most common setup of an event-interaction relationship. Then, it's on to the code, showing first three different ways to call functions (by name, by variable, and by callback).

He finishes it off with a functional example that responds to a a call to fireEvent (five times) and handles each by calling the function in the callback information (myFunction).

0 comments voice your opinion now!
event handline callback tutorial basics calling methods event handline callback tutorial basics calling methods


Joshua Eichorn's Blog:
Webthumb API additions
October 02, 2006 @ 16:13:01

In light of the popularity of his WebThumb site thumbnailing service, Joshua Eichorn is implementing a new feature to help reduce the number of requests to the server. The most popular request is made to see if a thumbnail is ready, and the new feature - a GET callback to the server making the request - will help to reduce them.

If you wondered an API that requires polling isn't a very good thing for scalability. On my current setup I can pretty easily handle about 20 status requests per second on top of my normal traffic, the problem is its not hard for a bad polling implmentation being run by one user to make that many requests.

To solve this problem im adding an addition to the Webthumb API that will allow you to skip polling all together. The basic idea is that your make an API request and when your thumbnail is complete i'll make a GET request back too your server telling you that the request is complete.

It's a simple matter of including a new "notify" tag in the XML message to the server with a URL to make the callback to. He even includes some sample PHP code to get you started with the new feature. The script handles the automatic download of the thumbnails when called from the WebThumb service.

0 comments voice your opinion now!
webthumb api callback notify message sample webthumb api callback notify message sample


Lukas Smith's Blog:
Next MDB2 releases are around the corner
July 18, 2006 @ 05:50:27

Lukas Smith notes in this new blog post that the next releases for his MDB2 package should be just around to corner.

He's been working on several issues:

  • fixing issues with MySQL drivers
  • updating transaction support to add SAVEPOINTS
  • integrating a debug callback mechanism

The only two bug reports I am currently hoping to get resolved before the next release are: a MySQL issue getting the last ID and a problem with an internal datatype.

Keep an eye out for his next release.

1 comment voice your opinion now!
mdb2 database abstraction layer transaction drivers debug callback mdb2 database abstraction layer transaction drivers debug callback


Felix Geisendörfer's Blog:
Welcome to the Dark Side of Plugins in CakePHP
June 26, 2006 @ 06:27:28

CakePHP users out there looking to squeeze just a bit more out of their plugins might want to check out this new post over on Felix Geisendörfer's blog today. He shows how he's worked around two issues that have bothered him with the current framework setup - inter-plugin communication and filter callbacks.

He starts off by looking at the filter callbacks, looking to make "drag and drop-able" plugins for his setup. He notes that, right now, you'd have to call a plugin to perfom an action, making for a good bit of load depending on the application structure. It also means that you have to change the Controller to add a new plugin ("...which doesn't seem like a very RAD approach to me").

So in order to streamline such plugin callbacks, I created a function inside SpliceIt!, that allows plugins to hook into any AppController event, such as beforeFilter, afterFilter, beforeRender, etc. in order to make their own changes to the controller. So a Themes plugin can easily change the Controller::view and a Statistics plugin can make calls to a Model.

He gives the code for the function as well as an example of how to use it in your app.

Moving on, he looks at his next issue to overcome - inter-plugin communication:

Generally spoken Controller::requestAction() isn't a bad way to exchange data between controllers. It's a clean interface and you don't have to plan in advance what data should be exchangeable and what data should not. However, there are a couple problems with it.

His solution involves the creation of an entirely seperate ApiController pattern. Of course, he provides examples, specifically related to his SpliceIt! application.

0 comments voice your opinion now!
cakephp framework mvc plugin callback hook inter-plugin communication cakephp framework mvc plugin callback hook inter-plugin communication


PHPit.net:
Having fun with PHP's output buffer
April 17, 2006 @ 07:13:24

One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together this new tutorial on how to get started.

I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.

In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.

The groundwork is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages.

0 comments voice your opinion now!
php output buffering example tutorial simple callback replace gzip php output buffering example tutorial simple callback replace gzip


Pierre-Alain Joye's Blog:
PEAR Template IT bugs fixes release
April 12, 2006 @ 07:37:38

Pierre-Alain Joye notes today that there were some issues with the PEAR HTML_Template_IT package he's a lead programmer for.

An annoying bug in the ITX callback system introduced a couple of months ago has been fixed. I would force me to write 100 more tests if I forgot again to run them before a release. But the bug seems to not have affected too much people (no related bug report) :-)

The other two are a PHP notice and a warning. For some reason fread decided to raise a warning when the content is zero, it will be fixed in PHP soon, but I still have to fix it in my code.

You can either check out the HTML_template_IT homepage for more or just grab it directly.

0 comments voice your opinion now!
php pear html_template_it package callback system notice warning php pear html_template_it package callback system notice warning



Community Events











Don't see your event here?
Let us know!


framework application example package PEAR ajax developer zendframework zend conference PHP5 job database book release security releases code cakephp mysql

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework