Here's an interesting link for a Friday. Viktor Zeman on Quality Unit sent us a link to "PostAffiliateXpress", some boring IT application with an interesting interface and an even more intriguing back-end.
The UI combines a Vista-like "Start" menu along with an OS X-like dock (using everyone's favorite fish-eye widget). It also has a built-in widget system that leverages Google Widgets. Overall, it's a pretty nice implementation of a desktop and windowing in Ajax.
The framework itself is "GwtPHP" which attempts to take all the advantages of GWT and deploy them to PHP backends in an attempt to solve the problem of limited Java-friendly hosting services. Unfortunately, the framework isn't available for use until sometime in early November.
Dual-License
The developers intend to use the familiar "free for hobbyists, pay up for commercial use" licensing model (what their licensing page calls a "what for what" model).
Give some feedback
Viktor says that they are quite keen to get feedback from folks on the project, so interested folks should get in touch, let them know what you think about the licensing model, and perhaps get early access, etc.

Alvaro Videla just wrote in to tell us about Firesymfony, a Firebug extension that provides an alternative to Symfony's built-in web debug toolbar.
sometimes the toolbar position makes impossible to use some features of the layout of our website, like a link menu on the top right corner. It also happens that while we display a small popup with the resize functionality disabled it’s turns hard to access all the data displayed by the toolbar.
The solution I’ve came up with is to move all the data from the toolbar to Firebug, actually, to port the symfony web debug toolbar as a Firebug extension. This will remove the toolbar from the page html and will show it in a convenient place that almost every web developer is used to.
Taking advantage from the cool new features of symfony 1.2 I started a project to develop a symfony plugin to send the data to the Firebug extension. The later has been smartly called FireSymfony.
Alvaro has another blog post that talks more about the first release.
Andi Gutmans announced Zend Framework 1.6 which includes the new Dojo support which they put to work on the site itself:
With this release we continue to provide enterprise-grade features with our new Zend_Soap component, which brings PHP-style simplicity to building and exposing SOAP web services. This component can operate in both WSDL and non-WSDL mode and makes creating or consuming a SOAP service a snap.
Preview of Tooling Project:
Zend_Tool is a component currently under development in the Zend Framework library. It provides services for generating and managing ZF-based projects. We are offering a preview release along with ZF 1.6 to collect feedback from users in a variety of environments and with different requirements. Please let us know how Zend_Tool works for you by visiting the Zend_Tool focus group site at http://tech.groups.yahoo.com/group/zf-tool/. We will also be posting an overview of Zend_Tool on the Zend Developer Zone within the next 24 hours.
Lucene 2.3 Index File Format Support:
Starting with 1.6, ZF supports version 2.3 of Lucene's index file format. This update to the format allows segments to share a single set of doc store (vectors & stored fields) files, which enables faster indexing in certain cases. This also makes Zend_Search_Lucene compatible with the latest version of the Lucene project.
Zend_Session save handler for Database Tables:
This is a database independent adapter for use with Zend_Session. Saving sessions in the database may be used for supporting sessions which must be maintained across multiple servers or kept for logging purposes.
Paginator Component:
Zend_Paginator is a new component for displaying large data sets in groups of 'pages' on a website. It can paginate data from virtually any source, and it fetches data lazily to maximize performance and minimize memory use when the data set is particularly large (as is often the case with data stored in a relational database). Zend_Paginator comes with a few data source adapters out of the box, along with an interface for implementing additional data source adapters.
Figlet Support:
Zend_Text_Figlet can create large ascii-character-based text given a figlet font and a string to render. Although they’ve been around for a long time, Figlets are most useful for captchas nowadays, especially when a lightweight solution is required and/or bandwidth is constrained. In fact, the new captcha form element includes an adapter for figlets.
ReCaptcha Service:
ReCaptcha is a very cool service that provides text-based captcha images. The answers submitted to ReCaptcha help digitize printed books. The new captcha form element also includes an adapter for the ReCaptcha service. Read more about ReCaptcha here: http://recaptcha.net/learnmore.html.
Captcha Form Element:
A form element to render and validate captchas, which are commonly used to ensure a human is submitting a form and not a (potentially malicious) bot. The captcha form element is backed by several adapters for different captcha mechanisms, including GD-based graphics, figlets, and the ReCaptcha service. Users can implement their own adapters;each adapter takes care of validation and decorators to ensure the form element looks and behaves correctly, regardless of the captcha mechanism used.
Zend_Config_Xml Attribute Support:
XML attribute support has been added to Zend_Config_Xml that allows ZF developers to write smaller XML documents that are more human-readable. This attribute support is already seeing a lot of adoption inthe Zend_Tool project.
Zend_File_Transfer Component:
This is a new component used for transferring files from one machine to another over multiple protocols. It currently supports HTTP, with an adapter interface that can be implemented to support additional protocols in the future. This component also supports validation on the transferred file.
File Upload Form Element:
This component completes the HTML form element support in Zend_Form. Files can be chosen by the user, validated for properties such as size, and uploaded to the server simply by adding a file upload form element to your forms. The element utilizes Zend_File_Transfer internally to validate the uploaded file and move it to its final destination.
Zend_Wildfire Component with FireBug Log Writer:
Zend_Wildfire is a new component supporting the Wildfire protocol: http://www.wildfirehq.org/. This feature also adds a FireBug log writer to write server-side log events to a FireBug console. A specialized FireBug Zend_Db profiler is provided to log DB profiler data to the FireBug console, as well.
Media View Helpers (Flash, QuickTime, Object, and Page):
ZF 1.6 contains new view helpers for embedding Flash, QuickTime, Objects, and Pages in a view.
Zend_Translate adds the INI file format:
This addition adds to the long list of translation file formats it already supports.
The Zend Framework aims to be a top notch framework for building next generation Web applications in PHP. Dojo has similar aims on the front-end side, so they decided to join forces to provide an integration layer. If you like the combination you will have a better, tighter, way to build your applications.
What we see in the initial release is:
JSON-RPC Server: We are re-working the Zend_Json_Server that has
been in our incubator since, oh, what? 0.2.0? and never released to
actually follow a specification:
JSON-RPC. This
will allow it to work seamlessly with Dojo, as well as other toolkits
that have JSON-RPC client implementations. I have actually completed
work on this, though the proposal is waiting to be approved; if you want
to check it out, you can find it in the
ZF svn.
The original Zend_Json_Server implementation will be abandoned. It was
never fully tested nor fully documented, which has prevented its
release. Additionally, since it implemented its own ad-hoc standard, it
did not provide the type of interoperability that a true JSON-RPC server
implementation will provide. I am excited that we will finally be able
to provide a standards-compliant solution for general availability.
One final note: there are currently two different JSON-RPC
specifications, 1.0 and 2.0. My goal is to support each, though for the
time being, only version 1.0 will be supported, as that is the version
Dojo currently targets.
dojo.js script -- you have aonLoad(), anddojo() view helper will act as astyle andscript elements in your page.
Zend_Form.Zend_Form's design already works verydojo.data defines aOf course, you can continue to any Ajax library in conjunction with the Zend Framework, and ditto for Dojo.... but why did this match happen?
There are many synergies and similarities between the two projects and their communities, including:
- Licensing and IP: Both projects are very business friendly.
- Design affinity: Similar philosophies, including a strong emphasis on use-at-will architecture.
- JSON format used strongly in both
- Comprehensive Ajax Solution: Dojo has it all
- Standards: "Dojo not only implements published standards, but also drives them"
- Communities and support: Strong communities, with support offerings behind them
And, here is some code from a JSON-RPC demo:
I got emails on the same day from two developers letting me know about ExtJS wrappers for PHP.
PHP-Ext
First, Sergei Walter Guerra told me about PHP-Ext "an open source widget library written for PHP 4 and 5 to empower the UI Layer."
The API looks like this:
ExtPHP
Then Chris Ravenscroft came to me to announce ExtPHP:
"It is something that I had to think about in my day job, because my team is migrating to PHP for web development and I believe that we simply do not have enough time for them to learn JavaScript's intricacies, I needed to be the one person who would have to wrestle JavaScript when problems happened. I therefore needed a way to insulate them from the gory details, which is why I created ExtPHP."
The API looks like this:
Maybe you guys can join forces? :)
My favourite kind of tutorial or trick are the ones that are very easy to do but make a lot of sense - you know the ones that make you slap your forehead and say "why didn't I do that before?".
Dirk Ginader blogged about a commenting trick (in German) that is one of these. He rightly claims that when you develop, you will comment and uncomment a lot as you optimise and test your code. This means either inserting lines with comment and deleting those lines, adding and deleting the /* */ by hand or using a shortcut of your editor of choice (I loved Homesite for ctrl+shift+m). In any case, it means highlighting several lines to comment in or out.
If you however use the following syntax then you only need to delete one slash to comment and uncomment a section:
The trick is the // before the closing */. With this you can just add another slash before the opening one and uncomment the block this way.
This works in many languages, alas not in CSS as there is no single line comment.
Update: in CSS you can just delete and add and remove an asterisk:
HTML Purifier 3.0 has been released.
What is HTML Purifier?
HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C's specifications.
What's new in 3.0?
Release 3.0.0 is the first release of 2008 and also HTML Purifier's first
PHP 5 only release.
The 2.1 series will still
be supported for bug and security fixes,
but will not get new features. This release a number of
improvements in CSS handling, including the filter
HTMLPurifier_Filter_ExtractStyleBlockswhich integrates
HTML Purifier with
CSSTidy for cleaning style sheets
(see the source code file for more information on usage), contains
experimental support for
proprietary CSS properties with %CSS.Proprietary, case-insensitive
CSS properties, and more lenient hexadecimal color codes. Also, all code
has been upgraded to full PHP 5 and is
E_STRICTclean for all versions of PHP 5 (including the
5.0 series, which previously had parse-time errors).
You can run a live demo to see it at work.
John Le Drew has been working on a PHP framework for a few years, and has now packaged it as Simplicity:
The Simplicity PHP Application Framework is an advanced, scalable and extensible PHP application framework to aid developers in creating high traffic, high availability Web 2.0 online applications. Integrating a solid MVC framework with some of the best Open Source projects around Simplicity aims to assist developers with any amount of experience in taking their applications to a new level.
You can get to the code on the launchpad for the framework.
One important piece is the Ajax admin console, developed in Ext that allows a developer will be able to configure all aspects of their application via the Ajax interface, this includes database modeling and the creation of stub controllers, and even the addition of predefined actions to speed up development.
Jack Herrington has written his second article in his series on Gears.
The article goes into detail on creating a form based data entry application that works offline. This means that entries are batched up, so when the user goes online they can be sync'd up. The forms are sent using Prototype and Ajax.Updater.
Jack iterates on the data model, going from a simple blog, to separate content.
Conclusion
For years now, web applications have been stuck at the 90 percent solution mark. Web applications are incredibly easy to develop, but fail utterly when the customer isn't connected to the Web. On the day Google Gears was released, I knew that this status quo had instantly changed. Just as the addition of Ajax functionality to the browser was the one small step that added rich interactivity, this small step of Gears solves one of the few remaining problems of web development. What a powerful tool indeed!
I haven't seen many languages implemented in PHP. J4P5 "is a JavaScript interpreter written in PHP 5, that allows to run untrusted scripts in a sandbox on your server. It aims to implement most of Ecma-262 3d edition."
J4P5 uses a modified version of the CFG parser of the MetaPHP project, and is licensed under the GPL
This project is new. The current version already exposes most of the features commonly associated with JavaScript, such as objects, prototypes, closures.
Notable caveats of this version (aka "the TODO list"):
- No support for unicode strings
- No support for regular expressions
- Semi-colons at the end of statements are not optional
- Most of the pre-defined objects/methods have not been tested
- The speed is definitely slower than PHP. It's getting better though.
plainTemplate is a new library that aims to separate out an HTML template from design and coding, thanks to selectors.
The designer works by simply using HTML in any way they wish, and then the programmer:
phpQuery is a port of jQuery that let's you do things like this:
plainTemplate is a new library that aims to separate out an HTML template from design and coding, thanks to selectors.
The designer works by simply using HTML in any way they wish, and then the programmer:
phpQuery is a port of jQuery that let's you do things like this:
Timothy Lorens has created a XAJAX PHP Live Datagrid that is as simple to setup as:
xajax_showDataGrid is a callback where you get to implement methods such as passing back how many rows there are, and the rows to show.
The Sun Web Developer Pack isn't a sexy name, and having 'Sun' start it out often doesn't help a technology.... but there is some good technology here.
The Sun Web Developer Pack helps you to leverage emerging web technologies and techniques to create interactive and dynamic web applications for the enterprise. This toolkit is a collection of technologies for Ajax, Scripting and REST-based services development supported by a NetBeans plugin that simplifies the design and development of Rich Internet Applications.
If you look past the marketing-speak you see that Sun has packaged technology such as Project jMaki and Project Phobos.
jMaki is a lightweight, client/server framework for creating JavaScript-centric Web 2.0 applications. You can use jMaki when developing with PHP, Portlets, Facelets, Java, and JavaScript.
Do you see that? Since when did Sun create something that lets you develop with PHP :)
Phobos is a lightweight, scripting-friendly web application environment that runs on the Java platform.
Phobos allows you to write with JavaScript on the server side, which can be very powerful indeed.
There are a vast number of demos available including interesting mashups.
jQPie is a lightweight PHP interface to jQuery that supports XML, HTML and JSON handlers.
What can jQPie do?
- Easily request and process data from php using $.getJSON Example
- Inject php generated html into elements using $.(element).load Example
- Call php functions directly from your web pages using $.jqpie Example
- Call jQuery from php in respond to $.jqpie calls Example
- Advanced autocomplete using jqpie_complete ExampleAuto
François Zaninotto has been talking about a new Unobtrusive JavaScript Plug-In for symfony.
Simple Example
How it is generated
this becomes...
PQuery is to jQuery as Rails helpers is to Prototype and Script.aculo.us:
PQuery is a set of helper classes for JQuery JavaScript library.This library allows you to easily integrate AJAX , Effects and other JQuery functionality into your PHP scripts.IT has a small foot print and is compatible with PHP4 and PHP5.
Steve Marx has created a PHP library for the Microsoft Ajax 1.0 release that uses the JavaScript piece in PHP land.
The Microsoft AJAX Library is a pure-JavaScript library that's used by ASP.NET AJAX but is also available as a separate download. Because it's pure JavaScript, it's not tied to ASP.NET on the backend. PHP for MS AJAX is code to help you make use of the Microsoft AJAX Library from PHP applications. With this first Alpha release, it simply supports exposing PHP classes as AJAX-enabled web services, just as in ASP.NET applications. In fact, the generated proxies are identical to what you get from ASP.NET, meaning you can have full interoperability.
Hello World
The service on the backend so to speak:
And the front end that will talk to it: