Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 426
Registered: ‎04-10-2011
My Device: Z30

AIR 2.0 Beta with Flex?

Now that a first beta for the AIR SDK 2 arrived, is it finally possible to develop Flex aplications with it? Or are all the containers and elements still ActionScript only?

I can try it right now, because the downloads aren't available due to maintenance.

-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blog alopix.net
BBM Channel: C0047B612
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: AIR 2.0 Beta with Flex?

There was nothing in the release notes about this, so you have to assume that it is only AS3 API.
BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: AIR 2.0 Beta with Flex?

We do not support Flex applications and likely will never based on the recent annoucenments surrounding the Flex framework.

Highlighted
Contributor
Posts: 45
Registered: ‎03-19-2011
My Device: Playbook
My Carrier: N/A

Re: AIR 2.0 Beta with Flex?

Why is that? Flex is going open source. Isn't that a good thing? Can't RIM contribute to the Flex framework?

Developer
Posts: 426
Registered: ‎04-10-2011
My Device: Z30

Re: AIR 2.0 Beta with Flex?

I don't understand that decision...
Not using Flex is like developing Android apps but not using XML to define the layout, or developing iOS apps and not using the Interface Builder, or developing WP7 apps and not using XAML...

It's very disappointing that RIM decides to ignore this great opportunity to differentiate between design and implementation. Everybody but RIM uses fourth generation UI frameworks - looks like RIM's afraid of progress Smiley Sad
-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blog alopix.net
BBM Channel: C0047B612
BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: AIR 2.0 Beta with Flex?

We have taking serious looks at Flex mobile in the past and have found it to be much slower and provides more overhead then we are willing to accept in our applications.

 

We continue to suport Flex on our devices and if you feel that Flex meets all our needs for your application then you have that option. It provides most of the same components that our SDK provides. You can continue to use all of the device API's from a Flex application. After all the Flex framework is written mostly all in ActionScript.

 

Separating design and implementation does not mean forcing people to use markup for their design. I am sure we could have a massive thread on why one is better then the other, but that is not really your point as Interface Builder is not markup but a design tool. Your point is to separate your design from your implementation, which I agree is a must. There are many ways to do this though.

 

The goal of our SDK was to provide a light weight component set to help developers, including our own internal teams, build applications. One of the biggest things we tried to do was to not make an application framework and force developers to do things in a specific way. In order for our components to fit in nicely with the Flex Framework and have them get laid out correctly in the Flex containers and layouts, it would require a very big dependancy on the Flex Framework. In doing so it would increase the memory and file size of applications greatly. This is something that we where not prepared to do. A blank Flex application is somewhere between 700-800K. That is pretty big for not having added anything to the stage yet.

 

At the end of the day if you want the most performant application on AIR Mobile you will need to use only ActionScript and this is where we and our SDK are focused.

 

 

Contributor
Posts: 45
Registered: ‎03-19-2011
My Device: Playbook
My Carrier: N/A

Re: AIR 2.0 Beta with Flex?

[ Edited ]

Nice thought out answer, jdolce!!

 

Has RIM considered participating in the flex development now that Adobe is planning to open source Flex - that way the overhead issue that you pointed out can be eliminated?

BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: AIR 2.0 Beta with Flex?

We haven't thought about it too much. A massive re-architecture needs to occur in order to remove a lot of the dependencies. I am doubtful that this would occur. We will be keeping an eye on it as it makes its way into the Apache Foundation and continue to evaluate it as things change.
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: AIR 2.0 Beta with Flex?

I second the performance and app size issues in using Flex. When I started to look at mobile apps for the PB, I compared Flex via pure AS3. Prior to that, I was all about Flex. But the performance and initial startup was much to slow. Now I do everything in AS3 and have been very happy about the performance.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: AIR 2.0 Beta with Flex?

While it is true that Flex has more overhead than pure AS3, and that in you should optimize your components and especially item renderers for performance-critical parts of your app,  there is no reason not to use it for non-critical parts or for prototyping. This is true for any framework - the more powerful, the more overhead it will have. The choice is yours. 


Contrary to popular belief, Flex works just fine on PlayBook. In fact, it works much better on PlayBook than on other mobile platforms. The Spark (=Flex mobile) component suite has seen remarkable performance improvements since introduction. For small-scale projects the QNX/AS3 approach work just fine, but for large scale projects I'd personally recommend a mixture of both.

 

It is a fairly trivial task to wrap most QNX components in Flex wrappers. Once wrapped they can be re-used in multiple projects. Here is an example from Renaun Erickson:

http://www.codeproject.com/KB/Blackberry/MXML-Playbook.aspx

 

You may need to skin your Flex components to look QNX-ish, if your app requires it.

 

You can also add QNX components to Flex containers at runtime from AS3.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands