Winton DeShong
Web / Flash Development

Archive for January, 2009

File uploading in a PureMVC application

Problem Summary

File browsing/uploading/saving is a common task. What is the best way to implement file handling while using the PureMVC framework?

Solution Summary

Below I propose a foundation for handling file browsing/uploading/saving in a single-core PureMVC application.

Explanation

In both single-core and multi-core PureMVC applications, I tend to keep all of the FileReference/FileReferenceList event handling in a Proxy. This allows for application/module -wide handling/presentation of errors related to file uploading. It also abstracts the code for re-use in all of your components in the application.

For more, check out my Flex Cookbook post at http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postid=12706&loc=en_US&productid=2.

Project source files

No comments

Managing your code with Git and the EGit plug-in

January 25th, 2009 | Category: Adobe Flex, Eclipse, Flex Builder, Source Control, Workflow, git

Problem

I’ve been migrating to Git for my SCM needs. Using the command line is fine and all, but it would be nice to have a more accessible and streamlined approach. One that works with eclipse/flex builder?

Solution

The EGit project is an eclipse plug-in for managing projects that use Git. Though the project is somewhat new, it has come a long way. It is simple to use and the project is constantly being improved.

Explanation

For more information, see my flex cookbook article at http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postid=12606&loc=en_US&productid=2.

No comments

Using AMF and RemoteObject without services-config.xml

Problem Summary

The most common approach to configure your environment to talk to amf services is through a file called services-config.xml and RemoteObject. The problem is that services-config.xml is used at compile-time. This creates annoyances when using multiple developers and/or multiple platforms for development, deployment, etc…

Solution Summary

In my case, I decided to migrate the endpoint-uri from the services-config.xml file into a configuration XML file that is used at run-time. Each site can then have it’s own config file and I only need to compile the application once.

Explanation

For this example, I’m going to assume you already know how to create, load, and parse XML files and feed that data throughout your application. In my case, I created a singleton with a static property of ‘endpointURI’ that can be referenced through the application.

See my post on the Flex Cookbook for more details.

No comments

Playstation 3 DLNA, MediaLink, and Apple Airport Express

January 11th, 2009 | Category: Apple, Gaming, Hardware, Networking, Playstation 3

I finally decided on software to transcode various media types for use with the Playstation 3. After trying various packages, such as; MediaTomb and EyeConnect, I decided to use NullRiver’s MediaLink. Though many people have had success with EyeConnect and MediaTomb, I felt MediaLink had the easiest interface, produced the best results for my situation, and was cost effective. For only $20, you can turn your Mac into a Playstation 3 compatible media server.

Now, it might not be as simple as it sounds. My first attempts during this process were using my existing network consisting of a Fedora Core Linux server, two Apple Macbook’s, and some other devices networked with a Linksys wireless router. The combination of the increased traffic from those devices and the quirkiness with the Linksys router resulted in random connection issues and heavy latency. Even with proper port forwarding, my wireless devices would fail or my entire segment would go down and require a restart.

In the end, I decided to work around this issue and make a separate network entirely with an Apple Airport Express (which I had). Anytime I want to handle media distribution throughout my apartment, I switch over to this network and can communicate with the Playstation or remote speakers via airTunes. This segment extends the other so I can still communicate with my file server and other devices. Having the Playstation always working off of the airport express eliminated the issues I was having. With the Airport Express configured, I connected the playstation and my laptops with the MediaLink server wirelessly to that access point.

Now I can browse those systems for any media I want to view on my HDTV. For the _best_ performance, I recommend atleast using a wired connection for the playstation 3. It works for me either way, but when it comes to larger files it may take your PS3 longer to queue them up.

1 comment

Using the FluorineFx AMF3 package to communicate with Flex.

Problem

Utilizing SOAP web services to communicate with Flex has many benefits, but it’s slow. Using custom XML can be light-weight, but it’s not standard. What is the best route for someone using ASP.NET?

Source

ASP.NET and Flex Source Code [1.8 MB]

Explanation

Instead of using SOAP or your own custom XML solution, I recommend giving AMF a try. Visit http://osflash.org/documentation/amf.

Read more

9 comments

google

google

asus