knowledge.lapasa.net

Greater Toronto Area Flash Platform Developer Blog

Reduce Flex compile times by a factor equal to # of CPU cores

TAGS: None

Clement Wong of http://stopcoding.wordpress.com was a speaker at yesterday’s Flex Camp Toronto. If you have been working with the Flash or Flex IDE’s for any significant time, you would walk away from his talk with a deeper appreciation for the tools that we use everyday. Clement’s intentions were never to show the small audience to become experts in compilers. He just wanted to show us the door to the Java-based Compiler API which to the average Flex Developer is overlooked. It was a very valuable and highly technical insight. Arguably, the best presentation of the day aimed at a 200-300 level audience.

Even more importantly, he’s promoting the latest addition to the Flex ecosystem called the HellFire Compiler Daemon. The compiler that is bundled with Flash/Flex builder does not scale beyond a single core. HFDC uses out of order processing to delegate compilation tasks to unused cores and memory. For all you >1 min compile time sufferers whose software is destined for legacy at some point in the SDLC, check it out at http://bytecode-workshop.com.

I started following Flex from an end-user developer perspective starting at Flex 2 Beta 2. Clement shared Allaire/Macromedia anecdotes about how the Flash Authoring tool’s compiler was rebuilt in Java and made faster than it’s predecessor. As a long time Flash Developer, I found it extremely interesting what was going on behind the scenes at the times before the Macromedia/Adobe marketing machines started spinning it’s message to developers like us. Even if compiler design is not your thing, learning about the history behind the compiler that we invoke everyday was entertaining. It was a rare opportunity to interact with a speaker who has been a part of the team that makes the tools we use everyday.

Having attended a number of Flash/Flex conferences in the past, Clement’s ranks as one of the better ones based on a criteria I just realized just now:

- A good presentation has familiar parts: There are concepts and ideas that I knew about a long time ago and they are being re-enforced now. If there is an excess of this part, the presentation is mostly a waste of time.

- A good presentation has unfamiliar parts: There are concepts and ideas that I had no clue about and now I am aware of them. I am far from mastery but at least I have access to resources to learn more about it. If there is an excess of this part, the presentation is mostly a waste of time as maybe the studying the resources is beyond my interest.

- A presentation has a return on investment of time spent: Acquisition of new skill sets or tools that will help me everyday. This is more important the first two. Having attended this presentation, HFCD may shave compile times, help me discover bugs earlier, and deploy software faster.

If you have a chance to see him speak, I highly recommend.

I hate this new Google background on the search page

TAGS: None

At first i was like cool. Then I notice my Mac Book pro start to lag with everything else loaded in memory. What pisses me off even more is that there is nowhere on the page that says “We want your feedback” so that I can say “Why do I need to be logged in into my Google Account to ‘Change background image’? Is this a trick to put a face on an anonymous user?”

Solution: Getting a Spark List’s itemrender instance

Tags:

Problem: A list is visually made up of as many itemrenderers as the height of that control allows. There are times where you want to do an action on a previously itemrenderer focus that is about to be closed or out of focus. The problem is that there needs to be a reference to that old itemrenderer instance when the user selects a new instance.

Solution: On click of the list, remember the previous list.selectedIndex. Then access the list component’s datagroup property. Then extract the itemRenderer

protected function list_clickHandler(event:MouseEvent):void
{
var dataGroup:DataGroup = list.dataGroup;
var itemRenderer:IItemRenderer = dataGroup.getElementAt(list.selectedIndex) as IItemRenderer;
}

Now you can invoke public methods or public properties on that itemrenderer instance

How To Plan For The Next Iteration

Tags:

Look at the backlog - Review and update it to see if there is anything previously mentioned that should find it’s way to the forefront because it will add better value at this time than when it was originally discussed.

Look at any critical defects - Be of those found in the current iteration that would not be completed by the end of the sprint.

Identify new features that will add the most value and can be completed within the internal of the next sprint - Prepare the bare bone requirements for each of these new features as user stories.

Notes: AS3 JavaScript communication

TAGS: None

There are number of examples on the web. Last time I had to do this was back in the fscommand days. Some of the the key things I need to remember the next time I deal with JS<->AS communication are

When Flash is calling out to the external JavaScript, the ActionScript code must have:

ExternalInterface.call(”{externalJavaScriptMethodName}”, {parameters});

When calling from JavaScript into the internal Flash client, the Flash client must expose methods using:

ExternalInterface.addCallback(”{jsMethodName”, asFuncObjReference);

and the JavaScript code must properly reference the movie

function thisMovie(movieName) {
if (navigator.appName.indexOf(”Microsoft”) != -1) {
return window[movieName];
} else {
return document[movieName];
}
}

function playClip(url)
{
alert(url);
thisMovie(”${application}”).playClip(url);
}

Review: FlashinTO Gathering v86.0

TAGS: None

Last night’s FlashInTO’s meet was great. Saw Matt Fabb speak on HTML5 and how slow it’s coming along. Dayton Pereira and Cam Warnock presented on what looks like a pretty solid iPhone app. The discussion panel on Apple vs. Adobe was both entertaining and informative.

From Matt’s research., we learned HTML 5 is not going to be a Flash killer. To be honest, I don’t know too much about HTML 5 because there is so much innovation elsewhere in the Flash world. Some take away points I learned were how the Video tags expose the file location of movie. The advantage in a crafted swf is that the swf app can be cognizant of the file location and download the movie from within the app from a URL it only knows. Firefox, Chrome and Opera are very HTML5 friendly. IE is not. It might be in IE9. Full-screen video is delegated to the HTML5 browser implementation and there is no JavaScript interaction with the movie.

Dayton and Cam from the sidelines presented their company’s latest project for the Olympics and CTV. I don’t own an iPhone but the application looked great. Their company has been known to create some pretty compelling Flash stuff. What made it an interesting presentation is how they were able to leverage core client-side development skills and apply it to iPhone app development. I thought it was great to learn about the trials and tribulations from the perspective of long-time Flash designers/developers. Learned about some of the obstacles they faced while working with Apple’s tools and how they over came them.

The final session of the night was a round table of developers arguing over Apple vs Flash. The idea was to pit the two in conflict and see what kind of rants would come of it. Some take away points were quite a bit of mobile surfing is done on the iPhone however surfing on mobile only makes up like 1% of the world’s traffic (or some other insignificant number). Apple should lose it’s mobile momentum when Flash-friendly devices start to put a good fight for eyeballs. There is nothing certain about this industry in that will be doing Flash or ObjectiveC 10 years from now. If history is any indicator, they’ll likely be some innovation that developers will flock to when it becomes the hottest technology to learn. Clearly, at the moment, there is no winner.

Solution - Error #2010: Local-with-filesystem SWF files are not permitted to use sockets.

Tags:

Trying to run through Elad’s tutorial “Test Driven Development using Flash Builder 4 beta and FlexUnit” and I couldn’t run the most basic fail test because of the following error:

Error #2010: Local-with-filesystem SWF files are not permitted to use sockets.

My project properties have compilation arguments for -use-network=false. Turns out the solution is to configure your Flash Player to trust the swfs in the project’s /bin-debug directory

1) Goto http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
2) Under “Always trust files in these location”, add your project’s /bin-debug folder
3) Run tests again

A brief history of Flex and the Cloud

TAGS: None

The following is a short summary of what (little) I know of Adobe’s commitment to the cloud from the perspective of a developer.

2007 - AIR Bus Tour Toronto
I first learned about the cloud from a presentation on the Salesforce AIR toolkit. The audience was presented with a demo of an AIR application that did CRUD operations against the Contact table on Salesforce. Nothing special … until he pulled the network plug out of the laptop and performed CRUD ops without being connected. When he reconnected, the data that he manipulated locally was then syncronzed to the Salesforce cloud. No tweening balls here.

The next month, I had joined a company that did Salesforce customization. Little did I know the next few years I would be dealing with configuring an environment with the ease of not having having to deploy one.

The toolkit used in the demo is alive and well today:

http://developer.force.com/flextoolkit

We didn’t end up using it because of the amount of SOQL that had to exist on the client-side. Instead, we rolled out our own.

2009 - Flash Builder for the Force.com
Adobe hacks up a beta of Flash Builder to support an integrated development experience. Developers can take advantage of the Data Services tab and drag and drop webservices on to abused controls like the data grid. Pretty cool stuff. I ran through the demo but did not have an imediate need or a new project to apply this on.

2009 - Adobe MAX/RIA Unleashed Boston
Kevin Hoyt announces Adobe Flash Collaboration Services which would go on to be renamed as Adobe LiveCycle Collaboration Services. It was Flash Media Server with a hosted managed solution so that businesses did not have to worry about setting up supporting infrastructure.

Developers could sign up for a free account that allowed 15 minutes of real time collaboration.

I wish this existed 5 yrs ago when Java engineers we were working with were trying to push the limits of messaging for the in-game chat.

2010 - LCDS Managed!
This is awesome news. But what would be better news is if they made it cheaper. Last I checked, they made it even more expensive. Anyways, businesses now have an additional option of leveraging an Amazon cloud instances to run pre-configured LCDS instances.

I wanted to jump right into this today. The entry point is through Adobe LiveCycle Developer Express. Here’s an excerpt from the FAQ:

Q: How is a LiveCycle Managed Services deployment different than LiveCycle Developer Express?

A: LiveCycle Developer Express can be considered as a “sandbox in the cloud” for developers that want to develop their LiveCycle applications in the cloud rather than incur the costs of setting up a development environment on-premise. LiveCycle Developer Express is not intended for deployment of applications in production. In contrast, a LiveCycle Managed Services is intended for LiveCycle applications to be deployed in production in the cloud.

So I try to get my hands on something like an LCDS SDK and I run into this major obstacle that you have to be a paid member of AEDP, the Adobe Enterprise Developer Program. This is a problem. A $1500USD problem!

This really blows. At least on Force.com, you can get a Developer account for like $0.00. They give you a pretty fair amount of liberties to play with. The only pitfall is that your app can be used like 10minutes a day at most.

Anyways here’s the links on today’s big news with LCDS and the cloud.

Deployment Info:
http://www.adobe.com/products/livecycle/cloud

Development Info:
http://www.adobe.com/devnet/aedp/dev_exp/

www.playerversion.com

Tags:

This is probably old news but I just discovered it now. I wish I had this URL all those times I received a bug from the field and we could not reproduce it in house. We would ask the client or the support person on the client side to right click on our applcation and select About Flash Player 10.

Flex Developer Available For Hire

TAGS: None

I am a senior level Flex/ActionScript developer looking to take on new and interesting projects. Please review my LinkedIn profile to learn more about my work in the Financial CRM and Online Gaming industries. Whether you are hiring or not, please do not hesitate to add me on LinkedIn. I would be more than happy to refer you to a candidate or discuss an opportunity down the road.

My Resume

© 2009 knowledge.lapasa.net. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.