Subscribe: Jeffry Houser's Blog - Flex
Added By: Feedage Forager Feedage Grade B rated
Language: English
adobe  air  apache  app  code  column  component  flash platform  flash player  flash  flex  mobile  platform  player  things 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jeffry Houser's Blog - Flex

Jeffry Houser's Blog - Flex

Jeffry Houser's Blog

Published: Tue, 16 Jan 2018 06:52:30 -0700

Last Build Date: Thu, 27 Jul 2017 09:35:00 -0700


Goodbye Flash

Thu, 27 Jul 2017 09:35:00 -0700

Adobe announced an End of Life for the Flash Player. I've written things in defense of Flash in the past and thought it would be worth it to revisit those statements today. Who Am I? If you came across this without knowing me, I am arguably one of the best Flex Developers in the world. I tied my business and professional life to the Flash Platform, and Flex, more than a decade ago. Here are some of my credentials: I produced two Flex podcasts. a href="">The Flex Show presented highly edited community interviews. and The Flextras Friday Lunch was a live demo with Q&A. I created Flextras, a business selling Flex components. I was editor in chief of the short-lived Flex Authority magazine. I spoke at dozens of Flash based user groups and conferences. I answered a ton of questions on StackOverflow and still retain the top spot in the Flex user charts. I became an Adobe Community Professional due to my work in the Flash community. I was one of the founding PMC members of the Apache Flex team. Back then, I bet that Flex would provide a better application building experience than anything HTML could offer. I thought it would rule the world. I wanted to get in early and ride the wave to success. I took a calculated risk that turned out to be wrong. Why Does Adobe's Decision Makes Sense? Browsers have slowly been shutting down their plugin APIs and Flash Player was a plugin. Flash was able to get around this because it is widely used and Adobe was able to negotiate to add Flash directly into the browser. Both Microsoft Edge and Google Chrome are distributed with Flash. These APIS have slowly become more restrictive over time and the future of the web will be plugin-free. Since HTML is finally adding a native form of DRM, the bulk of the major content providers no longer need Flash's proprietary nature to protect their content. This removes the last commercial obstacle which I suspect has been keeping the Flash player alive. Jeffry, How does this Affect You? Personally, I spent a couple hours last night playing Bloon Tower Defense one of my favorite casual browser games. I hadn't touched it in years, but I'll miss it when it is finally gone. Professionally, this doesn't affect me all that much. I refactored my business more than five years ago to focus on alternate technologies. In the HTML world, I really like Angular, but I've touched on a lot of different technologies. I never turn down the Flex work that comes my way, and people still find me based on my past history. But, I am not actively pursuing it. If you need help migrating your Flex applications to an HTML5 platform, I'd be glad to help, so reach out and we can discuss. How does this Affect you? Adobe will stop distributing the Flash Player in 2020, but the Adobe Flash Platform will live on through Adobe AIR. Given AIR's use as a cross platform mobile app development platform I expect that to be around for a long time. If you still have Flash applications in production, now is the time to start planning a migration of sorts. You have, roughly, 2 years to plan your strategy. What migration strategies can you use? Distribute to the Desktop as an Adobe AIR application. You can use all your existing code and the migration will not take long. Distribute as a Mobile Application with Adobe AIR. This has the benefit of using the same code base, but you'll probably need some UI rework to accommodate for the different screen sizes. Rework to HTML5: You can rework your application into an HTML5 application. You should be able to reuse a lot of your services and database code, which means you'll just be writing a new UI. Some technologies such as FlexJS or Haxe allow you to use your ActionScript skills in the process I'll be more than happy to help you with any of these tasks, so give me a call. What Next? I had a fun ride with the Flex community and met some new lifetime friends. I'm sorry to see Flash go, but the world has moved on. This is just a last reminder that we all ha[...]

How can I control the parameter order when doing a HTTP POST call from Flex?

Tue, 11 Jul 2017 09:40:00 -0700

I've been working on a legacy AIR application for a client. It integrates with a backend I have no control over. According to their documentation, we need to pass the form parameters in a specific order. This seems unusual for a form post, which contains key-value pairs and is probably not accessed in parameter order. But due to other problems integrating with this service, I decided to see what I could do to specify the parameter order and remove that as a possible point of failure. I wrote about my attempts in this StackOverflow question.

What Didn't Work

This is what we were doing. First, create an HTTPService: Then, create the parameter object in code: var parameters : Object = new Object(); parameters.firstParameter = "firstOne"; parameters.amount = 100; parameters.otherParameters = "Other Random Misc Data"; parameters.lastParameter = "LastOne"; When the parameter object is created for the service call, I added the parameters to the object in order. Then make the call: var call : Object = this.service.send(parameters); call.addResponder( this.responder ); You may have already guessed why this won't work. Object parameters, or keys in a dictionary, are by definition, not in any specific sort order. When the Flex code looped over all parameters to add them to the outgoing service, it was accessing them in alphabetical order. However, that is not something I would bet my life on happening every single time due to the unordered nature of object properties. I also noticed that the outgoing request in the Flash Builder network monitor had the parameters in yet another order. Something with them changed between the Flex code and the server hit. So, what am I to do?

Using Lower Level APIs to make this work

The final solution was to use lower level APIs. I created the request using URLRequest and URLLoader classes. Instead of passing an object to the request I also had to manually create the request body which is very similar to a URL parameter string. First, create the parameter string: var parameters : String = ''; parameters += "firstParameter=firstOne&"; parameters += "amount=100&"; parameters += "otherParameters=Other Random Misc Data&"; parameters+= "lastParameter=LastOne"; Then, create the URLRequest: var r:URLRequest = new URLRequest(yourURLHere); = parameters; r.method = URLRequestMethod.POST; r.contentType = "application/x-www-form-urlencoded"; The data is set to the parameters string. The method is set to POST and the contentType is set to 'application/x-ww-form-urlencoded'. And finally, create the URLLoader: var l:URLLoader = new URLLoader(); l.addEventListener(Event.COMPLETE, myResultMethod); l.addEventListener(IOErrorEvent.IO_ERROR, myFailureMethod ); l.addEventListener(SecurityErrorEvent.SECURITY_ERROR, myFailureMethod ); l.load(r); After doing this I could see in the outgoing requests that the parameter order was retained. So, things were good and my issue was solved! This is a lot more tedious than using the HTTPService, but at least I eliminated it as a possible error.

Why doesn't Flex Remoting work with ColdFusion 10 and Apache Web Server?

Thu, 09 Mar 2017 08:51:00 -0700

I'm doing some maintenance on an AIR application with a ColdFusion backend. For testing purposes, I installed a brand new copy of ColdFusion 10 and Apache Web Server 2.2. My first step was to test this new setup the Flex Remoting connection between ColdFusion and Flex. It was borked! The flex2remoting URL would return a 404. What was wrong? I do not remember having problems in the past. ColdFusion 10 introduced a new version of Flex Remoting, so maybe that was somehow the cause. There are a few people complaining about errors they've encountered. I tried all the fixes. First, I tried tweaking ColdFusion's file, as described by my good friend Joseph. That didn't work for me. I found another suggestion which recommended commenting out some lines of ColdFusion's web.xml file. No luck there either. I went over all of ColdFusion's Flex Remoting Configs in an attempt to find something amiss, no luck. I started grasping at straws and experimenting. I know that in IIS, there is a virtual directory called Jakarta which is a Java Mapping and helps Flex Remoting, among other things run. Does Apache have something similar and could the setup be wrong? Apparently the answer is yes! Open up the mod_jk.conf file. It was created when you used the ColdFusion Web Server Configuration Tool to configure the Apache web server. There are a bunch of 'jk' properties: LoadModule jk_module "C:\ColdFusion10\config\wsconfig\1\" JkWorkersFile "C:\ColdFusion10\config\wsconfig\1\" JkMountFile "C:\ColdFusion10\config\wsconfig\1\" As best I can tell this is the Apache equivalent of the Jakarta mapping in IIS. I started researching the different options around the module loading. When using virtual hosts with Apache Web Server, the mappings do not trickle down. I added this command to my Apache config: JkMountCopy All And everything started working magically. There are reports of similar problems with CF11. It is frustrating that problems like this still exist.

The Future of Flex and the Flash Player

Thu, 24 Mar 2016 09:00:00 -0700

This question comes in from a reader, about the future of Adobe Flex and the Flash Player:
Hello Jeffry, I know you because some answers your in StackOverFlow. But my contact is because in Brazil we company is totally based in Adobe Flex used Flash builder 4.6 and AIR for mobile, and I would know you suggestion about future of Flex and flash. I believe that programming for long year ahead because all programmer in my company lover Flex but sometime I have fear Adobe finish Flash player and my apps can´t running in my clients.
I wrote a lot about the future of Flex in the past. But, all those posts are few years old. What do I think today? First, I am not an Adobe employee and am no longer part of the Adobe Community Professional program. I cannot offer any personal insight into what Adobe may do with the Flash Platform. I do think the Flash Platform will be around for a long time. However, I do not see Flash as a growth area. It is very difficult for me to run a Flash Debug Player on my Surface Book Most new browser based applications are written using HTML5-based technologies. I have had success with AngularJS in the HTML5 world. I even wrote a training course about AngularJS for Flex Developers. AIR for mobile seems a lot more viable than the browser based Flash Player. I know a lot of gaming companies still use AIR for mobile deployment. In terms of Flex, the Apache Flex team has done wonderful things with Flex. Since you're still on Adobe Flex; I recommend you consider upgrading to the latest version of Apache Flex. If your clients do not have problems running your apps today; I'm sure they'll continue to run them throughout the next year without any problems. For those out there who are considering re-writing your apps to use HTML5 tools; feel free to reach out. I am available for consulting, training, or mentoring.

Using Flex and HTML together

Tue, 04 Aug 2015 09:00:00 -0700

I wrote an article for this month's newsletter that harken back to our past as Flex developers. I was recently contacted by a developer who wanted to use the Flex iFrame component to open up a Google Maps link. This was an experienced developer, but one that is new to Flex. He didn't know where to start. I gave him some input, and thought I'd do a write up about it. What is Flex iFrame? The Flex iFrame component is a component that uses an iFrame to open up an HTML page over a SWF. This makes it appear as if the HTML portion of the app was part of the Flex app. It is a kludgy way to get HTML and Flex talking to each other, but is functional for certain use cases. Get the Component Code The first step is to get the code, which you can do from this GitHub repository. Drill down into the repository to get at the component's code . The code is in two classes, the IFrame class and the IFrameExternalCalls class. To use this code, you have two options. The easiest is to copy the two classes into your project. The second is to create your own library project and a SWC of the component. The latter is preferred for reusability purposes, but for the sake of this sample we'll use the first option and keep it simple. Unfortunately, Flash Builder had trouble with the class names, IFrame and IFrameExternalCalls. I believe this is because the 'I' at the front of a class name is convention that denotes the class as an interface, not a real class. As such I had to rename the two classes for them to be usable. I chose FlexIFrame and FlexIFrameExternalCalls. The two classes have references to each other, and each one will have to be modified to reference their newly named counterpart. If the Flash Builder refactor function doesn't perform the code changes for you, a quick search and replace will. Get your Google Maps URL Before opening up a URL in the app you have to determine what URL you want to open. Since my new developer friend wanted to open something in Google Maps, the first thing is to get a Google Maps API Key. This is a simple form for you to fill out. Next you need to create a URL. There are a bunch of different options for creating Google Maps URLs. I am going to bring up a map that points to the Water Park I'd like to be at today. This is the URL: With the URL in hand, we can go into the code. Using the Flex IFrame This is the code that will open up load a Flex app with an iFrame. It is a simple MXML application, and only uses the Flex iFrame component : The source of the IFrame component refers to the Google Maps URL. See this app run here, or view the full source Mixing Flex and HTML The previous example just used an iFrame component. However, the iFrame can exist and be placed around other Flex elements; making the iFrame HTML content look as if it were part of the Flex application. This sample will show you how to hide or display the Flex iFrame with the click of a button: This is the code: The map is put in a VBox, which includes a button above the iFrame. The iFrame component's visibility is set to false by default. On the click of the button, the iFrame's visibility is toggled, either displaying or hiding the component. This is the default load of the app, with the map hidden: This is the app with the map displayed, after clicking the button: See this app run here, or view the full source Final Thoughts Sometimes this Flex stuff feels like a walk down memory lane, but half of my consulting work is still in the ActionScript and Flex realm. I feel lucky to be able to balance my time between my old world and the new world. What have you been up to? Sign up for DotComIt's Monthly Technical Newsletter First Name Email Address * [...]

Why won't my AdvancedDataGrid sort correctly?

Fri, 01 May 2015 10:00:00 -0700

I was having some problems with sorting the Flex AdvancedDataGrid, and went into details of them in DotComIt's newsletter. I thought I'd share them here. The Problem I was creating a AdvancedDataGrid in a client project. The dataProvider for the grid had nested objects whose properties were being displayed in the column with an itemRenderer. I was also using a custom itemRenderer that would introspect the objects based on the dataField of the object. The combination of these things made two different columns always perform the same sort, even though my code told them to use a different sortCompareFunction. This will make more sense with a sample. Let's start with the dataProvider: [Bindable] public var collection :ArrayCollection = new ArrayCollection([ {dummyValue:'',user:{firstName:'Arvid', lastName:'Zimmer'}}, {dummyValue:'',user:{firstName:'Jeffry', lastName:'Houser'}}, {dummyValue:'',user:{firstName:'Tom', lastName:'Amilton'}}, {dummyValue:'',user:{firstName:'Kyle', lastName:'Wellington'}}, {dummyValue:'',user:{firstName:'Zipper', lastName:'Stretch'}}, ]); Each property in the ArrayCollection has two values: a dummyValue which is a placeholder and a user value which is an object. I want the DataGrid to display the firstName and lastName in columns. This will do it: I simplified things from my client app, however the key to remember is that I was setting the dataField property so that the itemRenderer could access it. The problem with this is that clicking the column to sort would treat the columns as if they were identical. You can try a full sample. The top grid in the sample exhibits the problem. Once one column was clicked, the other would always call the first column's sortCompareFunction; thus sorting based on the wrong criteria. For example. Load the app, click the first name column: You'll see that the first name column is sorted. However, you can also see the sort arrow show up on the second column. Now click the last name column: After clicking the last name column, the first name column is sorted in reverse order, but there is no sorting on the last name column. Reload the app, and try to sort the second column first. It sorts correctly. Then click the first column, and you'll see that only the second column is affected. Using the Flex Debugger I determined that once one column was clicked that column's sortCompareFunction was called for all columns that had the same dataField specified. That was not expected behavior. My Solution After some experimentation, I determined that the problem was that the dataField on both columns was identical. My solution was to add the dummy property into the dataProvider's objects and change one of the column's dataFields to point to the dummValue: The side effect of this change is that I could no longer use the 'generic' itemRenderer. Instead of using the listData object in the renderer, I had to hard code the value. Like this: labelDisplay.text = data.user.lastName; I determined using a non-generic itemRenderer was better than having the columns not sort properly. I'm sure my client would agree. Click the first column in the grid and see this: The first name column is sorted properly, and the last name column is untouched. Now click the last name column: You see that the last name column is sorted properly and the first name column is untouched. This is how it is supposed to work. Play with the full app here and check out the source code. The top grid shows the problem and the bottom grid shows the solution. Sign up for DotComIt's Monthly Technical Newsletter First Name Email Address * [...]

Check out the Flextras AutoComplete KickStarter

Thu, 15 Nov 2012 11:59:00 -0700

Earlier this week, I launched a Kickstarter project for Flextras. The intent is to flesh out the API of the Flextras Spark AutoComplete component, and then donate it to Apache Flex. This is an experimental approach to fund some of the the development I want to do around Apache Flex. At the time of this writing, the project has reached over 10% of it's goal. There are a bunch of cool rewards including T-shirts, Flex Show content, and personal mentoring time with me. If you're interested in Flex, and how it is going to thrive under Apache, check out, and fund the Flextras AutoComplete Kickstarter.

In Defense of Flash - Revisited

Tue, 04 Sep 2012 05:00:00 -0700

I wrote this post for a Flextras newsletter. Before I get into details; I want to remind everyone that they should check out 360|Min coming this October. It is an unconference style event in Las Vegas by the folks who put on 360|Flex. It should be lots of fun and educational on stuff happening now. Back in November, I wrote a newsletter entitled In Defense of Flash. There was a lot of client confusion about the future of the Flash Platform; and they were worried that all their apps would suddenly stop working; or that their investment in the platform would turn out to be a significant waste of time and money. My original post spoke about a lot of specific issues; but at the time some things were unknown. I thought it was time to revisit that post and see where things stand, 10 months later. Flash Player on Android The ball that started the “Flash is Dead” bandwagon rolling was that Adobe announced it would cease development on Flash Player for Android devices. This made sense to a lot of people. Although, it was nice to have a Flash Player in mobile browsers; no one was building browser based Flash Applications with mobile devices as the target. The fact that the iOS browser did not support Flash in any way decreases the ubiquity that the platform used to offer on desktop devices. With the release of Android 4.1, Jelly Bean, Adobe has removed the Flash Player from the Android store. There will be no certified implementations of Flash Player for Android 4.1 … Beginning August 15th we will use the configuration settings in the Google Play Store to limit continued access to Flash Player updates to only those devices that have Flash Player already installed. Source Although, this is sad to see; it is not a surprise. It is interesting to note that a few days after the app was pulled, the BBC pressured Adobe to return the app to the Android UK store; as they do not have another technology solution in place for browser based streaming on mobile devices, yet: Adobe's mobile Flash Player has returned to the Google Play store in the UK. According to BBC News, Flash's encore is the result of pressure from the BBC and "strategic partners" that rely on Flash for their Android apps Source It’s weird that an app with over 500,000 ratings, and a 4.5 star average could be considered a failure. Most of us independent developers can only dream of having that many people try out something we built.  Despite the news about Flash Player, I still believe that Adobe AIR, especially with captive runtime, is still a fantastic choice for building cross platform native mobile applications. Long Live Apache Flex In the original post, I spoke about Flex and how Adobe planned to donate Flex to the Apache foundation. At the time, details were very sketchy. We have plenty more information now. Adobe has successfully donated Flex to the Apache Foundation. They have contributed the Adobe Flex 4.6 code base, a testing framework named Mustella, and the Text Layout Framework used in many Spark controls. In a few weeks, Adobe is expected to donate a new ActionScript compiler, named Falcon. The Falcon compiler will be included in Flash Builder 4.7; which was recently released on Adobe Labs. But we’ll have the code, and hope to get it integrated with Flex in the future. In addition to the Adobe donations, there is a lot of new code and bug fixes done by the community. The Apache Flex team has released Apache Flex 4.8. I wrote about building Apache Flex 4.8 from the source last month. Since an Apache release must be source only; they have also put together an installer Application which will allow you to easily prep Apache Flex for use in Flash builder. Flex has a lot of dependencies, such as the AIR SDK and BlazeDS, which Apache cannot distribute due to licensing terms. This installer ta[...]

Thoughts On Flex, Business Models, and Apache

Mon, 27 Aug 2012 18:15:00 -0700

Over the past few years a few friends have told me that I always have a plan. I didn't think about it much until it was mentioned to me, but I guess that is true. I'm always trying to think two steps ahead and plan my next move and carve out a path in life. Sometimes this is a lot harder than it is. Gareth sent me a question through the Flextras site about the future of Flex, the availability of mobile components; and the viability of AIR. Hi Jeff, I know things are a little bleak right now with Flex (hopefully with 4.8 SDK release things will perk up with the community), but I was wondering if you'd thought about still doing the mobile component creation. I'm still making AIR apps for mobile and have found the landscape pretty scarce when looking for various components [snip]. [snip] ...the flex mobile component still seems to be a viable model. I'll keep using Adobe AIR to make my cross platform apps until Adobe decides to get rid of that too :) I do the app thing as a supplement to my day job, so being able to purchase low cost components that will help make my apps more "snazzy" is something I'd look into (even at $5-10 a pop would be better than having to write it myself). I've even considered the whole business model myself, but have not had the infrastructure set up to do it. Anyway, hope things are still going well with the Flex Components side of things. Just wanted to suggest something as I see your Flextras Friday Lunch, but haven't seen you on the "build" side of things recently. I responded to this email after a very long day and about 4 hours past my bedtime. I think I was a bit blunt. I thought I'd turn my response into this blog post, perhaps with a bit more polish than the "late at night" ramble I sent to Gareth. Things are a Little Bleak with Flex I think I agree that things look a bit bleak for browser based Flash applications, and that has affected Flex. I also hope that Apache Flex can help turn things around; and I believe there are many ways to do this including improving performance on mobile applications (with AIR) and targetting other runtimes (such as HTML5). There are also a lot of "little picture" things, such as bug fixes, that can help make Flex more pleasant to deal with. I have faith in Apache and I have faith in the community. I just hope we can prove ourselves while Flex and Flash Player are still relevant. Flex Mobile Components seem to be a Viable Model I have been doing some Mobile Component development, but not much. There are some things in my Apache Flex Whiteboard. I have not wrapped up any of those components into the Flextras component set, though. I wasn't sure what Gareth meant by Model in his original email to me. If he is referring to a "Development" model. Then, I agree. AIR offers a compelling offering. Right now it feels like there are lots of cross-platform development approaches for native mobile apps. AIR offers a good solution. I suspect over time, the market will condense and I hope that AIR is one of the success stories. I don't know if AIR will be the winner, but it has the potential to do so. If Gareth was referring to a "business" model in flex Components, then I'm not sure a successful one ever existed. Or rather, I haven't found it yet. Selling Flex Components was never a viable model for Flextras. It grew to a nice side business, making roughly $10K a year, but that was not enough for me to do it full time. Even though I did do it full time for 2 years or so, though. I had planned for a 70% drop in income to launch Flextras, then have it grow from there. But I actually had a 90% drop in income. At some point I stopped telling consulting clients to shove it. Flextras was growing each year, although slowly, but Adobe pulled the rug out from under that. Generally we did 20% of the sales i[...]

Random Thoughts from the 360|Flex Experience

Thu, 10 May 2012 09:00:00 -0700

After every conference, I like to put down my thoughts about it and get a blog post out. A few weeks ago I had the pleasure of being a sponsor, presenter, and attendee at 360|Flex in Denver. The conference was great, as always, and I walked away with very positive vibes for the future of Flex. Although no one is too happy with Adobe, they are positive about Flex and the Apache foundation. Being a Sponsor Flextras was a sponsor of the conference this year, promoting our line of UI Components. The components are now free for production use. It is one step in our switch to advanced support. People seemed very positive about the move. We put together [...]

Is Flex Dead?

Tue, 08 May 2012 13:04:00 -0700

This question comes in from a reader; and to be honest I've been at a loss as to how to respond without writing a book. I finally found time to devote some time to putting down some thoughts. I'll start by quoting the full question and then trying to answer points one by one: As I was viewing your blog I noticed you seem very knowledgeable about Flex. I've just become aware of Flex and bought a few books then realized that Flex is dependent on Adobe Flash which has recently been dropped from Linux support which affects Android and the growing mobile market. I was wondering what your insight, I know you don't have a crystal ball, is on Flex usage and could you tell me if you think it has a future. Also, what is Flex really good at? I've not been able to find any example Flex apps out there... only Adobe Air apps. Thanks! I'm going to answer the question in reverse order. First, ...what is Flex good at? Flex is a Software Development Kit used for building Enterprise Applications. It provides a component set and a framework for rapid development. By making use of the Flash Player runtime; it is easy to build a consistent experience across multiple desktop browsers. I've not been able to find any example Flex apps out there... only Adobe Air apps. An AIR App can be a Flex app. Most Flex apps that I'm aware of are internal apps used for browser based applications in an "big business". You probably won't find too many public applications. Now, Let's tackle this sentence; which is full of misconceptions: I've just become aware of Flex and bought a few books then realized that Flex is dependent on Adobe Flash... This isn't necessarily true. Flex is dependent upon Adobe Runtimes; however the browser based Flash Player is just one of them. Adobe AIR is a second runtime which you can use to build Flex applications. Adobe AIR can be used to deploy your Flex app as a desktop for Mac and Windows, or as a native mobile application on iOS, Android, or Blackberry's Playbook. I expect that, in time, we'll be able to use Adobe AIR to create Windows Metro applications and Native Applications for the Blackberry "next" phones. More info on Adobe and its runtime commitment is in the "Roadmap for Flash Runtimes" whitepaper. However, keep in mind that Flex is in the process of being donated to the Apache Foundation and the Apache Flex Project is in the process of creating their first release. There is interest in decoupling Flex from the Adobe Runtimes, so that we can use the same Flex code and deploy them to other languages or platforms, such as HTML5 / JavaScript, such as Native Android, or Native iOS. I think it will be a couple of years before we start to figure out if such endeavors are going to become a reality for building Enterprise Applications. There are a lot of smart and motivated people, involved in the Apache project; and I have faith they will do great things. ...which has recently been dropped from Linux support... Adobe has not dropped Flash Player support on Linux. However, as I understand it they will only be supporting the Flash Player on browsers which support a new plugin API that was developed in conjunction with Google. At the moment, only the Chrome browser will support the Flash Player on Linux; however if this API is implemented on other Linux browsers, it seems probable that this will also come with Flash Player support. As I understand it, however, Adobe AIR, will not have any support on Linux moving forward. I understand a lot of developers find this troublesome because they were using Adobe AIR as part of their build and test process; which run on Linux machines. In practical terms, this has not affected any of my clients. ...which affects Android and the growing mobile market. [...]

Flash Remoting won't connect "NetConnection.Call.Failed"

Wed, 04 Apr 2012 17:54:00 -0700

I've been doing some with for the Flextras promotions around 360|Flex. As part of the promotions I am creating a customized version of my Game; strictly for Flextras. It is going to allow people to login and will keep score on our server instead of internally to the app. Since this is a Flash app; I'm using Flash Remoting to connect to our ColdFusion server. Everything worked fine on my local machine. Everything worked fine on my development server (AKA Staging). However, my production machine was giving errors that looked like this:
faultCode: "Client.Error.MessageSend"
faultDetail: "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url:
faultString: "Send failed"
I've tried a lot of different things including not using http instead of https. I knew that Flash Remoting was working on the production server because I had other Flex apps working without problems. So, what was the problem? I've been working on this on and off for about five days; so tried a lot of different things. In the end I discovered two things:
  1. Make sure your Flash Remoting URL has a '/' at the end of it. '' was not working. It appeared to add a JSessionID on it; which was causing the server to throw a 404 error; causing the whole call to fail. However, if I changed this to '' that problem went away.
  2. Turn off the Flash Builder Network Monitor. The Flash Builder Network monitor was intercepting the call and causing it to fail. The calls appeared to work fine from a web browser with the Flash Builder Network Monitor enabled, but not from the mobile app.
I think--but am not completely sure--part of my issues related to using HTTPS on the server instead of HTTP. That could be the reason I had issues on the production server, but not my local or staging box.

Moving your Flex Components from MXML to ActionScript 3

Tue, 03 Jan 2012 09:00:00 -0700

I wrote two articles for InsideRIA when the site was still active. I'm purging my personal digital archives and came across them. I decided to repost them here for posterity. This article is about educating folks on how to move from MXML to ActionScript. I wrote the article in February of 2010; but it didn't get posted until later. You can find the original on this DevelopRIA site. I remember it being slightly controversial, but I'm not sure why. Sadly the comments do not seem to be archived. Here is the article. I often hear it said that all the cool kids write their Flex components using ActionScript without MXML. I'm not sure that I agree. MXML is great for layout purposes. It is great for building simple components quickly. The declarative syntax makes many development tasks easier, such as setting styles and adding events listeners. But, if you look closely at the Flex Framework source code or commercial grade components, such as what I build at Flextras, you'll notice they do not use MXML. Everything is built using ActionScript. Why is that? ActionScript gives you granular control over your code. MXML is an ActionScript generation language. The Flex Framework takes your MXML and turns it into ActionScript. That means the code you write, isn't the code that is running. If coding were cooking, using MXML would be like buying a cake mix from the store. You just add water and you're ready to bake. ActionScript is akin to starting with flour and choosing your other ingredients carefully. It takes longer, it requires more thought, but the results are often worth it. This article will show you how to move your component development from MXML to ActionScript. Along the way we'll touch on various aspects of the Flex Component Lifecycle. Often when you are building your own applications, in controlled environment, it will make more sense to build with MXML; and that is fine. But, understanding how to build from scratch using ActionScript will give you a deeper knowledge of how Flex works and help you build all your components better. Today's Application Today, I want you to pretend that your boss asked you to build a survey application. As with most surveys, this application includes a bunch of questions, and needs some way to collect answers. Many of those questions can be answered with a simple yes or no. In a normal situation, you would collect yes and no answers using radio buttons. Unfortunately, and try to stretch your imagination with me on this, your boss is a bit irrational. He hates radio buttons. You're never quite sure why, but it is what it is. Instead of a radio button, he insists that you use one of those dropdown select box thingies. Fine! We can work with that. Knowing that your survey is bound to have a lot of yes and no questions, you decide to make a component out of it. YesNoQuestion Component Version 1 Let's just jump in and create the first rendition of our component. You can use a Text component for the question, and a ComboBox for the 'dropdown select thingy'. Throw this all in an HBox and the code would look something like this: We are already making our first use of ActionSCript in this otherwise MXML component. The dataProvider of the ComboBox is coded in script. It contains two objects, one for yes and one for no. Unfortunately, this component is still lacking in functionality. When using this component, how do we specify the question text? Your developer could access "question.text", but it would be nicer if we gave them a simpler way. How do we know which answer the survey taker has chosen? We'll need to add a property to expose that value too. Add these two variables to your A[...]

360|Flex is Coming in April

Tue, 29 Nov 2011 14:33:00 -0700

If you're scared that Flash is dead; I can understand the fears. Adobe has been stomping us into the ground as if were the ashes of a freshly smoke cigarette. I expect 2012 will be a year of transition for Flash Platform Developers. It may be because we have bitterness towards Adobe, or that we want to "follow the jobs", or just because we love learning new stuff. We'll spend a lot of time learning new technologies, such as Objective C, Java, and HTML5. Learning all that new stuff will make us smarter, and better, developers all around. The 360|Flex schedule is full of sessions on these alternate technologies. If you're a Flex Developer and are looking for your next steps, this is a great conference to go to. I'll be speaking on building games with Flex, and explaining why that is probably a bad idea. There will be tons of good info you can take with you back to Enterprise apps, especially in the mobile space. I think there is a good chance that I'll be paying the bills by Flexing long beyond 2012; but that won't stop me from learning new stuff. Swing by 360|Flex in Denver this April 15th-18th and say Hi to me.

In Defense of Flash

Mon, 21 Nov 2011 09:00:00 -0700

This is a modified version of a letter I wrote to a client to defend the choice of using Flash. This issue has come up due to some recent PR heat that Adobe is abandoning Flash. I believe that Flash and Flex were the right choice for building Enterprise applications a year ago. I believe that Flash and Flex are the right choice for building Enterprise applications today. As HTML5 tooling, frameworks, and related resources improve I will reevaluate my needs and the needs of my clients on a routine basis. I had to remove some client specific information, but the bulk of the information remains the same. Here is the letter: Per our recent discussion, regarding Flash and Flex, I wanted to clarify a few things to in writing. In the recent weeks, many media outlets have reported that Adobe is abandoning The Flash Platform in favor or HTML5 solutions. This represents an incomplete understanding of the facts, and I hope to clarify that here. Such a statement would be like saying is going to abandon selling real world goods because they released the Kindle Fire. What is the Adobe Flash Platform? First, for completeness, I want to clarify what Adobe's Flash Platform is. The Flash Platform consists of multiple deployment runtimes, development tools, and frameworks that are integrated across the full Adobe Creative Suite. Here is a list of some Flash Platform elements: The Flash Player: Flash Player is a browser plug-in which allows us to deploy web based applications to Windows, Mac, Linux, Android, and Blackberry. Adobe AIR: Adobe AIR is a runtime that allows us to deploy native applications to Windows, Mac, Android, iOS, and Blackberry. Flash Professional: Flash Professional is a tool for developing timeline based animations. Flash Builder: Flash Builder is an IDE to help programmer's write advanced code. Adobe Flex: Flex is the Software Development Kit that helps programmers build, debug, and deploy Enterprise applications with the Flash Platform. Flex includes a UI Component library, a SWF compiler, a command line debugger, an application profiler. There are more aspects of the Flash Platform ecosystem, but I highlight these because they come from Adobe and are prominently used by Flash Platform developers. We have built our applications using Adobe Flex to target the Flash Player desktop runtimes. One part of this decision is the breadth of the tooling available to us decreases the time it takes us to deliver a finished application. The ease of styling the default Flex Components also provides the applications with some cross platform elegance. They will work without change on the Windows and Mac machines used by your employees. Is Flash Really Dead? I want to quantify some of the press announcements over the course of the past week. The first one is that Adobe will no longer, personally, develop the Flash Player for Mobile Devices. This means that Adobe will not produce version of the Flash Player for Android, or Blackberry devices. To quote: "We will no longer continue to develop Flash Player in the browser to work with new mobile device configurations (chipset, browser, OS version, etc.) following the upcoming release of Flash Player 11.1 for Android and BlackBerry PlayBook" Source If you look at my list of Flash Platform elements above, it is clear this affects a very small subset of the Flash Platform; and not one we have targeted in our development. Through Adobe's Open Screen Project, licensees are able to continue their own development of the mobile Flash Plugin. RIM has already stated they will do this for Blackberry devices. To quote: "As an Adobe source code licensee, we w[...]