Agile Ajax: Rails Development for iPhone with rails_iui

„I’ve been doing some web development for iPhone and Mobile Safari lately, not least because of a series of articles that will be showing up in IBM DeveloperWorks soon.

I was using the iUI toolkit, which contains a number of CSS styles and JavaScript event handlers to make iPhone Web apps look and feel somewhat like native iPhone applications. As I was working with iUI, I realized I was building up a library, so I converted everything to a Rails plugin: rails_iui.

Get the plugin from github: git://github.com/noelrappin/rails-iui.git

Right now the plugin is primarily interested in doing a few things:

It contains a rake task to download iUI, move it’s files to the Rails public directories, and change the CSS image URL’s accordingly.

There’s a controller class method acts_as_iphone_controller, calling that sets up a before filter that captures the Mobile Safari user agent string and sets the request format to iphone for use in respond_to blocks. For testing purposes you can call the method as acts_as_iphone_controller(true), and all calls will be treated as iPhone requests.

There is a module of helper methods that are wrapper methods or combinations of iUI CSS classes. Included are:

*

A method for creating the iPhone toolbar at the top of the view.
*

Methods for creating the iPhone list structures from a list of elements that know their associated URLs, including a grouped list in the style of the iPod application
*

Rounded rectangle classes
*

A form helper for the iPhone toggle button, as seen in the settings page.
*

A method to specify an Ajax callback when the phone changes orientation“

Agile Ajax: Rails Development for iPhone with rails_iui

Auf der Suche nach dem perfekten PHP Application Framework

Ich habe mich in letzter Zeit etwas nach Frameworks für die Applikationsentwicklung in PHP umgesehen. Hintergrund ist die anstehende Entwicklung einer etwas grösseren Anwendung. Das Framework sollte den MVC-Pattern umsetzen, eventuell Hilfestellungen bei Routine-Tasks geben, aktuell sein (weiterentwickelt werden) und vor allem sollte die verfügbare Dokumentation umfangreich sein.

Nach kurzer Zeit musste ich feststellen, dass die Auswahl sehr gross und unübersichtlich ist. Bisher habe ich mich nicht entschieden. Vielleicht hat der eine odere andere Leser Erfahrungen mit einem dieser Frameworks und möchte sie mit mir teilen? Ausserdem mag ich mit diesem Überblick die Leute unterstützen, die vor einer Ähnlichen Entscheidung stehen.

Es handelt sich hierbei wirklich nur um einen Überblick und keine Bewertung. Es werden die mir bekannten Frameworks mit der Beschreibung von ihrer Webseite verlinkt.

(mehr …)

AJAX PHP File Upload Progress Bar

„One of the few things that I find lacking in PHP is the ability to report the progress of a file upload. This means that file uploads, especially uploads of larger files, can be extremely frustrating for end users when they don’t know if the upload is progressing or if it has stalled or if it has even started. There are two ways around this. One is to patch PHP, Pdoru provides such a patch. Not everyone can patch PHP though. You can’t use a patch if you’re on a shared server, if you want to use ready-made binaries, if you don’t want to risk stability by using a patch or if you just don’t want to have to remember to apply the patch again every time you upgrade PHP. The other option is to use a perl script to receive the file when it’s uploaded. This is the approach used by MegaUpload. MegaUpload is what I have based my solution on, but I have added asynchronous file upload support and an AJAX upload progress bar, instead of the refreshing popup used by MegaUpload.“

AJAX PHP File Upload Progress Bar

AJAX PHP File Upload Progress Bar

WebWork: WebWork 2.2: Released and ready for Struts!

„WebWork 2.2: Released and ready for Struts!
OpenSymphony and the WebWork team are proud to announce the release of WebWork version 2.2 (download now). This release is the biggest release ever for WebWork and there are plenty of reasons why (full release notes):
Full support for Java 5 Annotations and Generics
Rich AJAX support using DWR and Dojo
New QuickStart tool makes development easier than ever
Tons more documentation with over 900 PDF pages!
Client side validation using AJAX or plain JavaScript
Built in support for Continuations
JSR168/Portlet support for several popular Portlet servers, including Pluto
Rich UI template framework with native support for JSP, FreeMarker, and Velocity
Native support for Spring and Pico IOC containers
More intelligent error reporting
Developer Mode makes building webapps even easier with improved error reporting
Simplified tag syntax
Advanced data binding framework that works with any object, including domain objects
This release marks an important milestone in the WebWork history: the last major release under the WebWork and OpenSymphony names. While future minor releases will continue to take place (including 2.2.x and 2.1.x releases), all major work will now fold in to the Struts Action Framework, version 2.0. You can use WebWork 2.2 as an early preview of Struts Action Framework 2.0, but you can also expect many other great improvements to be added between now and then.
Thanks to the entire WebWork team for all their hard work, especially during these last few weeks as the final touches were put in place.“

WebWork: WebWork 2.2: Released and ready for Struts!

WebWork: WebWork 2.2: Released and ready for Struts!

AJAX Regular Expression evaluator

„This site is a Regular Expression evaluator for three different regular expression systems:
PHP PCRE.
PHP Posix.
Javascript.
The site is written with the help of the so called AJAX technology, therefore will work on the following browsers:
Internet Expolorer 5 .
Mozilla Firefox 1.0
Opera 7.54
Safari 1.2
The site is still in the process of active development and testing, so don’t hesitate to send me any bug reports or suggestions you may have.“

AJAX Regular Expression evaluator

AJAX Regular Expression evaluator

AjaxTrans

„Start typing any text you want to be translated into the green field. The words should be automatically translated into the language of your choice and appear in the bluish box. To switch langauges, simply click on the language you would like to translate from and then procede to select the language you would like to translate into. In order to swap the contents of the two boxes, use a double click.“

AjaxTrans

AjaxTrans

Behaviour : Using CSS selectors to apply Javascript behaviours

„AJAX (asynchronous javascript and xml) has been getting a lot of press lately. It is seen as a way to add desktop-application functionality to html pages. Things like Drag and drop, Fluid animations and Dynamic page updates.

It’s great to see public uptake of these technologies – but it worries me to see the influx of tags and onclick attributes into webpages.

After all the work of WASP and others to promote clean markup, valid pages and graceful degradataion via css – it sucks that we’re going back to tag soup days by throwing javascript tags into our html.

The better way to do javascript is to do it unobtrusively. PPK and Simon Willison have been recommending this approach for ages. And it’s definitely the way to go. The only problem is that it’s a bit of a pain in the ass.

That’s why I came up with Behaviour – my solution to unobtrusive javascript behaviours.

How does it work?
Behaviour lets you use CSS selectors to specify elements to add javascript events to“

Behaviour : Using CSS selectors to apply Javascript behaviours

Behaviour : Using CSS selectors to apply Javascript behaviours