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
New Contributor
malcolmchalmers
Posts: 5
Registered: ‎02-07-2011
My Device: 8800

Should I learn ActionScript or Flex ?

I'm new to Playbook programing and am in the process of learning ActionScript as I write my first app.

 

Allot of examples and tutorials seem to use Flex though, so it got me wondering should I continue to learn ActionScript or go with Flex.

I have a fair bit of programming expierence in other languages so ActionScript looks a bit easier, it seems to make more sense but would I be better of learning Flex ?

 

what are your thoughts ?

---
Tech Tips Blog : http://www.malcolmchalmers.com
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Should I learn ActionScript or Flex ?

I have no strong opinion about Flex (nor experience with it), other than a general distaste for things that mix code with XML like it does. (I object to that on several levels, some practical some merely subjective.)

I can say, however, that in the IRC channel (#playbook-dev on freenode.net) there are a handful of people migrating away from Flex to pure AS3, and so far (I believe) nobody going the other way.

Also I understand (consider this rumour unless someone else confirms it) that with Flex the resulting apps can be much larger and may suffer from worse performance. Even if true, the significance of this may be much less in larger apps (e.g. Hello World might be huge in Flex, but a real app may be closer to the same size) and possibly experienced Flex programmers know how to make any performance differences vanish too. I don't know.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
KenSalmon
Posts: 114
Registered: ‎08-09-2010
My Device: Tour

Re: Should I learn ActionScript or Flex ?

I am with Peter on this one. My work on PlayBook has been 100% actionscript. I started out with a code base that was in Java for the BlackBerry smartphones, and so the transition from existing Java to actionscript was, while not trivial, at least manageable.

As Peter said, I don't care for the code/XML mixture. I looked at Flex and it seemed to me like it didn't know what it wanted to be, so decided to be everything. Maybe that's just me being a purist.
Please use plain text.
Developer
Brandon_Appetizer
Posts: 146
Registered: ‎03-27-2011
My Device: Blackberry Playbook

Re: Should I learn ActionScript or Flex ?

I would also agree with Peter and ken's assessments and fall on the side of pure AS3. I also don't have much Flex experience, but as a seasoned developer AS3 was easy to pick up, Flex didn't look like it would be...
----------------------------------------
If this post solved your problem, please click the 'Accept as Solution' button.
If you found this post useful, please provide a Kudo. Thanks.

Approved Apps: Celestial Slingshot
Please use plain text.
Developer
Acenet
Posts: 249
Registered: ‎11-02-2010
My Device: PlayBook

Re: Should I learn ActionScript or Flex ?

Hello,

  Flex SDK is ActionScript really. So if you "do" some Flex, you must know ActionScript in the first place.

So the question if I may, would be: "Do I stick to ActionScript, or do I go further, and decide to use the incredible benefits of Flex SDK ?"  (well, maybe a question less subjective....)

 

I'd say try Flash Builder, and you'll see by yourself if you like it or not... but you'll need to know ActionScript either way.

 

 

 

 

JC
Please use plain text.
Trusted Contributor
bdaemon
Posts: 152
Registered: ‎02-23-2011
My Device: dev alpha playbook 9500 8300

Re: Should I learn ActionScript or Flex ?

 

 I don't think  the  AS based app will be strongly supported by RIM or Adobe , in future.

 

I 'am waiting the Native SDK for playbook.  

 

other thread:

I have made  two app, almost have same function,  using Flex Mobile and pure ActionScript

got this result :

Flex Mobile  size : 700K.

Action Scrip size :360K

and the  launching of  Action Scrip version  is also  faster than the Flex app .

 

 

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Should I learn ActionScript or Flex ?

 


bdaemon wrote:

I don't think  the  AS based app will be strongly supported by RIM or Adobe , in future.

I 'am waiting the Native SDK for playbook.  

 

other thread:

I have made  two app, almost have same function,  using Flex Mobile and pure ActionScript

got this result :

Flex Mobile  size : 700K.

Action Scrip size :360K

and the  launching of  Action Scrip version  is also  faster than the Flex app .


 

I see no evidence or reason to think you are correct about your thought on that.  Everything they've said suggests they firmly back AIR, and QNX has a pretty extensive history with Adobe.

 

Also, that app is tiny... it would be interesting to see if in a more complex program the difference stays the same (e.g. around 340K) or if the ratio stays the same... seems likely it would be more like the former (difference) than the latter (ratio).


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
pablosbrain
Posts: 16
Registered: ‎01-27-2011
My Device: Playbook

Re: Should I learn ActionScript or Flex ?

definitely learn actionscript 3. Flex (mxml/flexbuilder) and Flash (fla/ide) are the editors used to build or describe assets or ui via drag and drop or xml coding. AS is the code that brings the functionality and is used in both. Most of the apps I build are more graphical than forms based so I use the Flash CS editor and illustrator for building my UI's. The same could be built with flex (mxml) but would take more effort. But to build business or forms based apps flex is a wiz and speed demon. So.. Learning actionscript would benefit you for both sides.
Please use plain text.
New Developer
siaukia
Posts: 16
Registered: ‎04-25-2011
My Device: Playbook

Re: Should I learn ActionScript or Flex ?

I'm a web/flash designer by nature, which I learned the hard way in order for me to grasp the knowledge I had with actionscript today

I had few tiny experience with flex but it has never been a fruitful or happy one, which I always ends up with using the IDE, or my new found love for Flash Develop (that has best of both world)

Looking at how flex's future are so hazy (they even decided to renamed it to Flash Builder!) Go figure to amount of time that you will speed adapting to its transitioning period , you may as well spend more time with ActionScripting entirely
Sliding Puzzle Playbook Game - http://bit.ly/hgvZIG
Please use plain text.
New Developer
killerspaz
Posts: 199
Registered: ‎12-29-2010
My Device: Not Specified

Re: Should I learn ActionScript or Flex ?

I originally wasnt going to post, but it's clear that no one that has posted so far actually has given the full picture.

First, let's get something straight... FlashBuilder is NOT Flex, it is an IDE. It was renamed to FLASHBuilder due to the fact that so many people have used it to create pure AS3 projects in, and calling it FlexBuilder was misleading.

Second, Flex is an AS3 library. If you look at the source you'll note that it's written in AS3. QNX is ALSO an AS3 library, and in was in fact built solely because Flex Hero (4.5) was not in public beta by the time QNX decided to put so much heft into AIR.

Next, Flex projects output to a SWF nearly identical to one generated by Flash Pro. Flash Pro is an IDE traditionally for animators, but has adapted over the many years to support development in some interesting ways. Essentially, a Flex project consists of two frames: 1 for a preloader, and one for the actual application. This in turn allows the Flex framework to load certain things like themes and parts of the larger frameworks such as CSS stylesheet support, module support, advanced font rendering engines (Text Layout Framework, or TLF) and a plethora of other things. As you add components to your project, you can expect your filesize to grow, and initial load times to as well.
One may argue that its bloat or overhead, but considering you didnt have to take months (and for some of you, years) to build this framework, it saves time. This is where Flex is given the coined term "RAD RIA" or Rapid Application Development Rich Internet Application.
Some of the features you get from Flex gives you flexibility, pun intended, in how you architect and implement your application; particularly layouts, and styling your application.

Next, the XML (or rather MXML) that someone mentioned is NOT Flex, but rather a declarative implementation best suited for views in your application. Much like VB, PHP, and JavaScript, it can be abused and used incorrectly, thus potentially giving it a bad rap. But in the end, the Flex compiler will convert these to AS3 classes and injected in place of the MXML. Personally, I try as much as possible to stick with AS3, but for simple views like an alert popup, or form, the markup is so much easier to understand that it is silly to implement in AS3. It's basically equivalent to HTML in the DOM. You COULD technically create 100% of your website in JS, but who wants to do that??

With the advent of Flex 4, we are more easily able to create components that define functionality, but skin based on the platform/screen size of choice. I can build a numeric stepper that just has a skin change based on a phone vs tablet.

If utilized correctly, Flex is a great SDK to utilize in both personal projects, and enterprise. Not to mention the market for a Flex dev right now is excellent.
Please use plain text.