Migrating from flex 3 to flex 4 pros and cons [closed] - apache-flex

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

Related

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.

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 ;)

Too early to move to Flex SDK 4?

I'm beginning to learn flex, and it seems that now is right around the time when the sdk is moving from v3 to v4. I'm noticing that there's not much support or tutorials for the v4 sdk, or maybe it's just me. Is it too early to use the v4 sdk? have most people not caught up with it yet?
If you're not releasing a 'for real' product soon, I personally would go with Flex 4. Obviously, it's still in beta and things change frequently in the nightly builds (which is kind of fun ;-); in fact, a major namespace changed not too many builds ago. However, if you're just starting and have some time, the Spark framework components seem to me to be much 'lighter' and certainly separate the logic from the skin styling in a very nice understandable way. If you want to play a bit, Google "Flex 4 Beta in a Week" and work through the exercises.
On the other hand, if you've not done much OOP or Flash programming before, I'll vote for Flex 3 too as there's a ton of resources out there.
If you are learning, then I think it is good to stick with version 3 since, as you say, there are more tutorials and support for it. I don't see any problems in transitioning to version 4 when it is released or you feel comfortable with using software that is still being developed.
If you haven't started working with the Flex Framework yet, its best you start with Flex 4. There has been a major namespace change, but its for the better. You can also integrate other cool Adobe tools like Flash Catalyst only with the new Flash Builder.

Flash versus Flex

I've tried looking everywhere for a concise list of the advantages and disadvantages of using Flex vs. Flash.
Coming from a programming background, I absolutely love Flex. It's easy to pick up, and since it can use flash classes, why would I want to use Flash without flex?
Flex:
Pros:
good for RIA development
provides many user-input options out of the box
Build in lay-outing system
the MXML is easier for non-programmers
You can quickly combine components to create small applications
components can provide an advantage in large-scale projects because of their modular
nature.
can be developed using linux
has a nice component lifecycle for validation, etc.
Cons:
increases the size of your .swf
Customizing the look of components can take a lot longer than anticipated, depending on the visual style you're looking for
when you find out you need a custom component that doesn't exist, you might need to go back to Flash to do the real programming work and packaging of the component
The "flexibility" of Flex means you will be reading a lot of documentation
Bugs in the Flex framework
You eventually will need to compromise with the architecture of the Flex framework
Flash
Pros:
good for making movies/animations
Timeline can be easier for designers/animators to conceptualize
when working from scratch, provides a great deal of control.
easier for someone with a programming background
You can program whatever you like; no compromises with existing frameworks
Cons:
only provides basic user input (text box) out of the box.
timeline can be daunting for programmers (although you can quite safely ignore it)
Development of certain types of applications will be slower than with Flex
can't be developed using linux
user input validation must all be handled in the code. No built-in validation.
need to implement your own lay-outing system
Please correct me if I missed anything said so far.
Flash and Flex both use the same underlying rendering engine, just with different front-ends. Flash is better suited for making movies and animations. Flex is better for application development.
From a programmer's viewpoint, the big difference between Flash and Flex is not so much which IDE/application you use for programming, but whether you program in ActionScript (AS) only, or use the Flex framework and MXML to program your applications.
I would say pure ActionScript is better for programming (whether you use Flash IDE or Flex IDE is not that relevant), and MXML is better for non-programmers to combine the components programmed in AS.
I would add to your list these pros/cons:
Flex:
Pros:
Easier for non-programmers to get into application development
You can quickly combine components to create small applications
Components can provide an advantage in large-scale projects
Cons:
Customizing the look of components can take a lot longer than anticipated, depending on the visual style you're looking for
When you find out you need a custom component that doesn't exist, you might need to go back to Flash to do the real programming work and packaging of the component
The "flexibility" of Flex means you will be reading a lot of documentation
Bugs in the Flex framework
You eventually will need to compromise with the architecture of the Flex framework
Flash (or Flex IDE in ActionScript project mode):
Pros:
Easier for someone with a programming background ;)
You can program whatever you like; no compromises with existing frameworks
Cons:
Timeline can be daunting for programmers (although you can quite safely ignore it)
Development of certain types of applications will be slower than with Flex
In short: pick the right tool for the right task.
Flex is a library of code written in ActionScript3, so it adds lots of capabilities and standard-library-like stuff to Flash. The downside is that it a is a huges amount code that gets included into your application. If you use any Flex at all in your app, the download size of the SWF goes up by 100's of K.
If your application has any kind of user interface widgets, then you almost have to use Flex as Flash itself only has the most basic things like text boxes. Flex has a whole XML GUI with layouts, data binding and XML setup etc.
Doing that in flash, you end up having to write from scratch things like list boxes...
In my opinion, the most important feature of the Flex framework is the component lifecycle, which provides a really elegant model for validation/invalidation of properties, component size, and hierarchical rendering.
The benefit to developers is that it creates discrete application phases for business logic and rendering, avoiding expensive geometry & rendering code until the last possible moment before drawing a frame.
Here's a really good presentation, explaining how it works:
http://tv.adobe.com/#vi+f15384v1002
The model is so well-designed that the component lifecycle remains almost entirely invisible during the majority of Flex development, when you're using the framework default components and containers. You only need to learn the inner-workings when you start developing your own components.
Developing in the Flash environment, or in pure Actionscript, you don't get any of that. Anyone developing pure AS3 applications either needs to code very carefully to separate business logic from rendering, or will suffer severely decreased performance.
[...] why would I want to use Flash without flex?
Flex is a new product, whereas Flash existed from the Macromedia days. Designer, animators and most anybody who is not brought up on a staple diet of programming education will probably find Flash easier to master than most other such solutions.
Target is different.
Flex is more dedicated for programmer while Flash is more friendly to Artist / web designer.
Flash is the IDE used (generally) to create animations and things that work well on a timeline.
Flex works better for creating internet applications which have interactions more akin to a desktop.
Why use Flash? Well, if you need to do something more specifically attached to a timeline, of course!
I see Flex as more of a solution for doing RIA applications where you need to develop application based solutions. There's quite a lot you get right out of the box with using Flex but it also comes at a price in terms of file size, granularity, etc.
If on the other hand you are working on a totally custom solution such as a game then perhaps Flash is the way to go because you can start fresh with a blank canvas. Many people still use Flash because they don't need all the app based bells and whistles of the Flex platform.
I like the freedom of Flash, and its really simple to embed assets in Flash, a little more confusing to do in Flex.
One thing that I love about flex is the ability to make a fluid application with minimal effort. Which would take forever in Flash.
Anything you can do in flex you can do in flash, just may take a lot longer to do. You can't do everything in flex that you can do in flash though.
Flex takes care of all the UI programming for you and lets you focus on the business logic, with flash you will spend a majority of time programming the UI.
You can develop Flex applications under Linux easily but with Flash you simply can't.
Another solution that was not suggested at here, will be to use them both. You can add flex components to flash movie clips using ContainerMovieClip. And you can add flash movie clips to flex components using SpriteVisualElement. Another thing that wasn't mentioned was lay-outing your application. It will be flex pros against flash disadvantage, because you got build in flex lay-outing system. But again when you are using them both, you can layout your movie clips with flex lay-outing system.
Also flex become Apache top-level project. And it become more and more excepted by the community now.
Flash and Flex are 2 complete different things, one is a design tool with support for action script, the other one is a framework that also has action script but is maily built around MXML which is a XML based UI definition "Language".

What features do you need the most in Adobe Air?

I recently started to develop using Flex 3 and Adobe Air and I wanted to know what features you want to be in futures releases of Adobe Air ?
The ones that I miss are:
Cross-systems way of launching a local file (shellExec) right from an Air application (although you can do this using workaround at least under Windows)
Ability to setup dynamic paths for Embed statement (e.g. Embed[(variable+"/path/to/file")] ). I didn't find any way to do this properly.
Some way of setting Flex object's positions with absolute values from CSS (that sounds more Flex related by the way)
Don't hesitate to add your workarounds to theses limitations if you know somes.
Ability to call out to native code - you currently have to ship a server written in another language and make calls to that to do anything more than Air gives you.
Modal windows. There's a hack you can do which involves setting Application.application.enabled = false, setting dialog.nativeWindow.alwaysInFront = true and then re-enabling the application when the dialog closes, but this is long-winded and doesn't disable any native menus you may have! It's crazy that something so simple is made so difficult.
A usable way to set the application's icon. I spent 2 hours trying to do this the other day and gave up after persistent "303" errors that gave me no idea of what I was doing wrong. Again, really basic stuff.
"Call native code", "Modal windows", agree-agree.
loadLibrary would be really great :)
ps.:
if we can not have this features in AIR, if would be awesome to have an opportunity to embed flash(AIR) graphics engine into your own app. in that case we'll get great performance improvement and liberty of choice what to write (not only small gadgets).

Resources