Fileupload using AMFPHP, RemoteObject and Flash 10

15 03 2009

File upload with Adobe Flex is a common asked feature for lots of applications. There are several posts on the internet to be found which explain, in detail, how to do this.

Most of these examples however uses the http protocol to transport the binary data. With the arrival of the Adobe Flash 10 player and the new FileReference features that comes with it, it is now also possible to upload a file via a RemoteObject service call.

Read the rest of this entry »

Localized flex login using the Swiz framework

7 03 2009

After reading some blogs about a relative new Flex framework called swiz, i decided to try it out some time. Swiz is a framework. started by Chris Scott, that aims to bring complete simplicity to RIA development.

To get some feeling with the framework i started to work out a login example i found on the blog from Sönke Rohde, which uses a utility for mocking service calls, which also can be found in the swiz framework. For my own example i used the following snapshot swiz-0.0.5-010609.swc with mediator and event type checking support, but decided to extend the login sample with some runtime localization features.

These localization features consist of some xml-files which can be loaded during runtime and are used for translating labels and fault messages (bad credentials).

During development of the new example i found out that the mockutility in the framework only returned a result. In a real-life application faults will occur so i copied the sources of the swiz framework TestUtil class into a new class called MockUtil and added my own mockFault and mockFaultEvent methods.

The sources of my extended login example can be downloaded here (swiz library not included!). The assets/data/users.xml file contains the mock data for the login and can be modified with your own user credentials. The assets/locale directory contains sub-directories with the localization files used.