Creating a Custom Resource Plugin in Zend Framework 1.8

June 1st, 2009

Version 1.8 of the Zend Framework introduced a whole new concept of bootstrapping an application. The core functionality is contained in the Zend_Application component which supports a strictly object-oriented approach to bootstrapping. Although the new concept is fairly straightforward, it does take a little time to get used to it if you are used to the bootstrapping process in earlier versions of ZF.

One of the many interesting features of Zend_Application is the ability to push resources into resource plugin classes which can be utilized simply via configuration. In this tutorial we will be looking at creating a custom resource plugin. The plugin is quite simple, it creates a “value object” with the name, author and version of the application, and stores it in the Zend registry.
Read the rest of this entry »

Utilizing the Zend AMF Server Inside a Zend Controller

December 14th, 2008

Many tutorials suggest that you set up the Zend AMF server directly in the bootstrap or index.php file. But what if you want to build a hybrid application with both Flex and HTML interfaces? In this case it’s better to let the bootstrap file do its usual job of application dispatching, and to make the AMF gateway a controller.

Read the rest of this entry »

What’s in the Zend Framework for the Flash/Flex Developer?

November 26th, 2008

The 1.7 release of the Zend Framework includes the new Zend_Amf package which provides a gateway server implementation for AMF remoting.  By the time of writing this article, there are not many resources available yet (a good starting point is here), and the few tutorials mostly guide you through the process of setting up the bootstrap file and establishing a MySQL database connection by using mysql_connect() directly in the service classes.

Read the rest of this entry »

When a Cross-Domain Policy File is not Enough

August 15th, 2008

This post is a reminder to myself (and a source of help to anyone who may need it). For a long time I thought a cross-domain policy file in a web server’s root directory solves all cross-domain security issues automagically – until I stumbled over the fact that I wasn’t able to manipulate the bitmap data of an image that was loaded from outside my SWF file’s domain.

Read the rest of this entry »

Handling FlashVars in PureMVC

August 13th, 2008

In this blog entry I would like to share my approach to handling FlashVars in a PureMVC application. I assume that you are familiar with the basic concepts of PureMVC.

Read the rest of this entry »

1, true, yes, y, on? – A Boolean Converter in AS3

June 4th, 2008

Configuration files often contain Boolean parameters for enabling or disabling features in an application or website. This way non-programmers can easily customize complex systems. But what if someone uses another word than “true” (for example, “1″, “yes”, “y”, “on”)?
Read the rest of this entry »

TinyURL API

May 28th, 2008

Did you know TinyURL has an open API? As the service itself, the API is incredibly simple:

http://tinyurl.com/api-create.php?url=http://blog.log2e.com/

Here’s a little Flex demo that demonstrates its use.

TinyURL Demo

View source.

Twitter, Flex and JSON

May 25th, 2008

There are libraries in several programming languages that provide access to the Twitter API. Although there’s an ActionScript 3 library for Twitter, in this tutorial we will be looking at how you can retrieve Twitter’s public timeline with a little help from another collection of ActionScript 3 utilities, the corelib library.

The result of this tutorial can be seen here (“View Source” is enabled).
Read the rest of this entry »

Getting Started with the PureMVC Startup Manager – Introduction

May 19th, 2008

This three-parts tutorial reflects my own learning experience with the PureMVC framework and the PureMVC Startup Manager. It was inspired by Philip Sexton’s demo Startup as Ordered and is my first attempt on PureMVC. The tutorial’s goal is to provide beneficial information to other novice PureMVC users who have understood the theory but lack practice.
Read the rest of this entry »

Getting Started with the PureMVC Startup Manager – Part 3

May 19th, 2008

Preparing the View

We are almost there. In the final step of this tutorial we will be creating a very simple view:

  1. Create a file with the name StageMediator.as in the view folder.
  2. Create a new folder inside the view folder and call it components.
  3. Create two files in the components folder and name them SectionView.as and TitleView.as.

Read the rest of this entry »