Flex 3, 4 and 4.5 Components and Containers - apache-flex

This page has tables about Flex 3 MX components and their Flex 4 Spark counterparts as well as Flex 3 classes with no direct Flex 4 counterpart. Could anyone share the same for Flex 4 and Flex 4.5? The nearest I can find is New Spark components in Flex 4.5 SDK at page Introducing Adobe Flex 4.5 SDK but not in table form. Comparing 3 versions side by side in table form is most appreciated.

In Flex 4; Adobe introduced a new architecture for building components. This architecture was designed to help make skinning and styling easier. It introduced a two class architecture, separating the business logic from the display logic.
The page you link to is really comparing the MX/Halo architecture components with the Spark architecture components. More info on the architecture differences.
It is important to keep in mind that the MX/Halo architecture did not go away. It still exists in Flex 4 and can be used in conjunction with Spark components.
I would have sworn there was an explicit table somewhere in the docs talking about component differences between spark and Halo, but I can't find it. The best I can recommend to you is to read through this section of the documentation.

Related

Write a custom spark datagrid component?

I am a newbie and really stuck with this. The company I just started working for has a full MVC based application written using Flex and we have our own component library which was written using Flex 3 and these are all MX components. Now I am asked to slowly start migrating our components to Spark?
I searched everywhere on internet. There are a lot of articles on how to moving the applications to Flex 4.5 but no article on what would be the step to write a custom spark component from a mx component? As far as my research goes the only difference between mx and spark is the css layouting for both components is different.
Can anyone please help?

What are the pros and cons of migrating an application from Flex3 to Flex 4?

I had many issues found in migration from Flex 3 to Flex 4. I had done some logic in flex 3 but while migrating the same code to flex4 it is not working. Please help me out how to do the exact migrating or have any tool for migrating the code from flex3 to flex 4.
There are many advantages of Flex 4, one of which is Skinning, which is a huge plus for code reuse but also separation of concerns (separate the view/styling from the component behavior). There's also FXG (mxml based vectors) that can be used with Catalyst to easily skin components from illustrator.
Flex 4 is definitely the future and what you should strive for, but it does bring forth a lot of changes, so the con here is that it's very hard to convert a Flex 3 app to Flex 4 without redoing some code. It's a different mentality altogether and it needs to be adhered.
There are no quick tool to convert your component logic.
On my expirience most of the things I had to fix on my project when migrated to Flex 4 were related to parts of code that were actually work arounds for some strange behaviour with scaling/resizing of components in Flex 3, which was resolved in Flex 4. Overly it wasn't hard, there are no major changes in logic, just improvements and some bugs fixed, and possibly few new bugs made :)
When migrating to Flex 4 it's not neccessary to change your components to Spark ones, you can still use your MX structure.
New components use a different layout, you build them a bit differently
* you cant use Spark's ComboBox/DropDownList as in MX, since you need IList objects as data provider
* Resize/Scale and measures work as they should now, in both MX and Spark components
* you can't add directly some of MX components to Spark containers as you could in Flex 3
* you use addElement instead addChild for Spark components
* in Flex 4 they introduced FTE, with superior text render quality, lifting the limit of 127px font size, but now if you embed fonts on runtime (I do) you have to use CFF flag
I think that migrating to Flex 4 worth the hassle, just if you decide to use the latest SDK build (4.5) you may encounter some issues, 4.1 is a safer call at the moment, tho I'm using 4.5 knowing of the risks.

Flex Builder 3 or Flex 4 (Flash Builder 4 aka Gumbo)

In order to learn flex as a beginner, which version should I go for or start i.e. Flex 3 or Flex 4 ?
As you might have noticed that both have different components and architecture.
Kindly advise it in details
I'd recommend starting on Flex 4. However, as you allude to, there are two component architectures within Flex. One is the Halo architecture. Halo is used prominently in Flex 2 and 3. The second one is named Spark and was introduced in Flex 4.
At this time, here is not component set parity between Halo and Spark; so you'll probably have to learn both component sets for some applications.
I would strongly suggest reading up on the Flex Component LifeCycle for Halo and Spark. Learn both of them--they are similar. When you start developing, start with Spark and then bring in Halo when Spark leaves you in the dust.
I would also go with 4 but first, for a beginner I would recommend to learn the life-process of the controls in a flex application, each time I find a colleague struggling with something if flex 4 or 3 it usually because not understanding how flex works behind the scened with the entire life-process like :updateDisplayList, commitProperties and more.

Migrating from Flex 3.2 to 4.0

I have an app built in flex 3.2, and would like to start using some spark components within that same app. Are there any pitfalls to look out for.
Is it possible to use the old 3.2 components in the same app or Will I have to rebuild them.
Would like to get the heads up from anyone that has done the same, before I make the plunge.
Thanks
This post has some pretty good info - Migrating to Flex 4
You may run into some small issues with mixing and matching Halo/Spark components when it comes to some of the layouts, but in general they work pretty well together side by side.
The major issue is CSS because the Spark components are less CSS-friendly than Halo.
=Ryan
AFAIK, custom components extending / based on Halo components of Flex 3.2 will continue to work as will the default Halo components.

Starting with Flex right now - should I go for Flex 3 (stable) or Flex 4 (beta)?

I apologize for making my first question not the hard-hitting code-related question I was hoping for, so I apologize if this question is out of bounds of SO:
I'd like to get started with Adobe Flex development. I've seen that there's been a Beta 2 of Flex 4 available since October (with Flex 4 supposedly being "even better!" than Flex 3, naturally), but obviously, most learning material (books, on-line tutorials etc.) available seem to focus on Flex 3.
This makes me a bit unsure about which version to go with in order to get started.
I realize Flex 3 would be the safer bet, but maybe Flex 4 is already stable enough? I would very much appreciate pointers from developers more experienced with the technology.
Thanks,
Hendrik
It depends on whether you think you need any of the new features for your particular application:
Remote services – autogeneration of
data models.
Flash CS4 support
Event handler autogeneration
Declarative graphics
Unit testing, Network monitor
If you don't need any of these, Flex 3 is the clear choice.
http://www.psyked.co.uk/adobe/flex/talking-about-flex-gumbo-new-features.htm
I don't know if it's so much a question of stability but one of market penetration. As you said most learning resources out there focus on Flex 3. That said the Adobe Devnet is filling up with new tutorials and resources for Flex 4.
I haven't moved towards Flex 4 because the libraries are targeted latest versions Flash and AIR, and my apps need to be targeted for older versions of the these runtimes. That and I have all the features I need using the Flex 3 along with FlexUnit, Degrafa, and other third party libraries.
I have starting with flash builder with the beta 1!!!! It's much better/easier/nicer as Flex Builder... But the important think is u can use the new sdk!!!!
that's much more iportant... because in the new compantents has many change u have in sdk 3 some components what u can't use in sdk 4...
so my result:
use the new flash builder and use the imortant think SDK 4 ;)

Resources