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?
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
We have a very big application which built on flex 3 SDK. What are all the pros and cons if we don't migrate and continue using flex 3 SDK.
Here are some questions:
1.Can we sustain without migrating from flex 3 to flex 4 for at least 5 years?
2.Can we upgrade to Flash Builder 4.6 + SDK 4.11 ?(but continue to run the flash builder in backward compatibility mode)
3.Is there any future support issues for application that are built on Flex 3 SDK.
Here are some points i read in stackoverflow:
If Adobe didn't seem to be pushing so hard for us NOT to use Halo, I think I'd be comfortable with that. But since they say in the actual docs that we "shouldn't use such and such" Halo components and should use the Spark ones instead, it's worrisome. It also seems like support for Halo in FB has become an afterthought (I can't get design mode to display a Halo style, even with Halo selected as the theme), so Adobe's making it difficult just to continue using it. Personally I don't see why we can't have two parallel component sets since Halo's design may work better in some use-cases. – Crusader Aug 21 '10 at 2:59
1
Actually the wording Adobe authoritatively uses (say if you're going to use "Canvas") is "use spark.components.BorderContainer instead". Well what if we don't want to? They haven't explained why we should use Spark instead, and due to it's "half complete" status now with tons of missing components, I don't really like the idea of almost guaranteeing maintenance work and updates needed to my code once SDK 5 comes out. On the other hand if we just use Halo permanently (assuming Adobe isn't going to pull the rug from it later, who knows), the code is "done" the first time. Frustrating
Thanks in advance.
Two things I particularly like with Flex4 in contrast to Flex3 (No matter if Adobe or Apache Flex) is that the new Flex4 components (Called Spark components) are much more lightweight implementations. The coolest new concept introduced with Flex4 however are the skinnable components.
It allows you to implement your components completely independent from the look & feel of the component (Skin). You can locate a components skin in separate modules which allows you to implement an application and depending on the client to load a "desktop", "android", "ios" or whatsoever skin-module which completely changes how your component looks and is used. Most skinning approaches of other frameworks merely allow one skin or can only change the formatting (colory, borders, margins, font sizes). In flex you could have a dialog displaying 20 Input fields at once in the desktop skin, but on mobile one, you have a step-by-step wizard approach only displaying 5 of them per page (just as an example).
Especially with the FalconJS initialive at Apache Flex it will be possible to have the compiler generate not only flash, but also a HTML+JS+CSS based output. I doubt this will be possible for the old Flex3 components.
The downside is that if you get used to Flex4 and you have to work with any other technology, you will be missing a lot of stuff. I at least got addicted to some of the concepts pretty fast.
Adobe Flex 4 is dying, Adobe Flex 3 is already dead (hard to find developers, no patches, no new frameworks etc...), the only option I think is durable is to migrate to Apache Flex 4 as Adobe has stopped developping Flex and given it to Apache that actually has upgraded it on some points.
For the "Halo" case, if you want to use it in Flex 4 with your Flex 3 codebase you will probably get troubles such as layouts / fonts / texts that will need to be fixed. This is due to a change in font management in widgets and on some components whose properties have changed.
Also, the dependencies have changed in the SDK, be careful with produced swc as they can sometimes be only compatible with Flex 3 of only with Flex 4 (which is a pain). It will be more and more difficult to find libraries that will work with Flex 3!
There was a question a few months ago on Flex 3 with FB debug not working anymore with last Flash Player Debug, I don't know if you met this case.
To sum up, Flex 3 is already deprecated and Adobe won't support it anymore, maybe Apache will but it is not their main aim. Even Flash Builder development could be stopped, be warned. There are alternatives such as Flash Develop or Intellij hopefully.
I do agree mostly with the mail above about FLEX 3 as such it seem to be dead if it comes to the web item yet I myself will continue using it as long as it is possible! OK there mite be not much new yet I think that it has still enough life in it. People just talk too much about it all yet without that there are or where many Application on the web which seem to be build in FLEX!
I just saw on a German FLEX forum something Interesting which mentioned the very same as here discussed, but what came up and what I did not knew was that the FLEX AIR Application development is still with ADOBE & that it is fully further developed by them even so they gave FLEX itself away! regards aktell
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.
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.
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.
How much of an impact will migrating to Flex 4 have on our code base? We have about 40k LOC written in Flex 3. I'm hoping that there are no breaking changes in the Flex SDK, and that we can smoothly transition to the new features of Flex 4 while minimizing any disruption. From what I've read Adobe is developing a new set of GUI components called 'Spark' but I'm hoping our existing stuff can co-exist with the new components.
Spark and MX components can co-exist within the same application (and even within the same MXML files). There are some changes to how CSS works because CSS namespaces are now supported, and you will encounter a small migration step there.
In terms of choosing Spark versus MX, Adobe recommends keeping your existing code that already uses MX components the same. There's no need to make everything Spark immediately. You can make incremental changes as the need arises. For new development, you should use Spark when possible. However, the Spark components in Flex 4 will not have 100% feature-parity with MX, so you will likely encounter some situations where you need to continue MX components for the time being.
You can move to Flex 4 without adopting any of the new stuff. You can keep the 2006 namespace so that you don't have to update your MXML files. Also you can optionally use the Spark components. The only major benefit of doing this is the faster compiler. It will also allow you to progressively move to the 2009 namespace and Spark.