سؤال

I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time I had no prior experience of ActionScript/Flex and it took me some good 3 months to get started with seriously developing an application. That time too, I was skeptical developing an app based in Flash, which won't be viewable on all the PC browsers(not without updating flash), leave alone iphone/ipad. But I want to see what kind to application can be built using Flex, so took the challenge.

But now I am again starting to wonder why should I muddle into Flex, when I have jquery/ajax, various fast php frameworks(which I am comfortable with unlike ActionScript/Flex).

How, if I decide to, should I convince my clients that website in Flex can be much better than ones built in HTML/php etc.

Can somebody throw some light on this?

Regards

هل كانت مفيدة؟

المحلول

You should ask yourself why you need to use flex. Are you developing a game? A 3D graphics application on the web? Something that actually cannot be achieved with HTML?

If not, there is no reason of using flex instead of HTML. HTML is an open and standard specification, you don't need plugins, your application will run on any platform with a browser supporting html, and it will be faster and less resource-consuming. Don't fall in the error of developing in flash/flex something that can be done perfectly with HTML/AJAX. I saw some developers creating applications with flex or silverlight that consisted in just a series of forms, and it was a ridicolous waste of time and resources.

So the only way to convince your clients to use flex should be finding something you actually can't do with HTML.. and having in account that HTML5 is almost here and hardware-accelerated HTML5 browsers will be launched at the end of this year.., it will be difficult to convince people to get tied to flash/flex! :)

نصائح أخرى

There are more reasons than just these, but some major ones are:

O&M costs: Most "engineers" don't give a rats A about this because they are development-centric, but the fact is that O&M is by far the leading cost of running IT systems. With a VM approach like Flex (or Silverlight, or JavaFX) you don't have to worry about updating libraries, testing, applying fixes, and so on every time a new browser comes out. Using legacy technologies which are harder to keep running day-to-day directly hurts your clients' bottom line.

Performance: Flash (Flex) is JIT compiled, (wouldn't be surprised if SL is too), and Java is as well. Interpreted JavaScript dependent libraries such as GWT simply cannot hold a candle to the performance you get out of a compiled VM client--it's not even a close comparison. "AJAX" (esp when using XML) is not "fast". (Just look pay attention to how slow Gmail typically loads--a very simple AJAX-enabled script.) The proof is in the benchmarks.

Consistency/Reliability: Everyone knows that when you write anything using JavaScript or HTML, it has to be tested in every browser (including some older versions if you really want to be safe). No such problem when you're targeting a VM platform. With AJAX: worry whenever a new browser or version of a browser is released. If there's problems, it'll create work for you.

Richer components and a better user experience: This is one of Adobe's big selling points, but it's true. While some of the stuff that has been done purely with browser scripting (JavaScript) is impressive, Flex or Silverlight components are just better. It's also easy to create your own custom components when you don't need to write (and maintain!) cross-browser JavaScript magic.

Flex specific, but worthy of mention--AMF: This is the Flex Data Services binary protocol which can be used to talk to servers. Benchmarks (ask Google) have demonstrated this protocol to be much faster and more bandwidth efficient than protocols used by AJAX frameworks. In today's world where networks are becoming the major bottleneck (if not clearly already), this is quite a big win.

It's a sensitive topic for many. Most AJAX/DHTML/JavaScript 'engineers' or whatever they call themselves will howl and throw feces at the mere suggestion that this 1990's technology they have spent years becoming an expert in is outdated and flawed (quite frankly they have a lot to lose). But based on pure technical merit, even HTML5 is a counter productive waste of time compared to any mature VM based solution. I'm sure some will show up shortly to defend their cult of denial by voting this down. But it's hard holding back the future.

AJAX/DHTML frameworks all rely essentially on legacy hacks and complex, slow, fragile, constantly maintained libraries to keep them running reasonably well in multiple browsers. HTML5, when it's finally "complete" in 2022 (!!!) won't even be caught up to Silverlight 2 in terms of features--never mind the huge amount of stuff Flex will have out there by then. Basically the AJAX stuff is a maintenance quagmire and a fragile development environment that you can completely avoid by using a VM solution like Flex, Silverlight, or JavaFX.

Comparing to HTML/AJAX/JavaScript with using Flex you get no headache with cross-browser problems, you get fancy animation and filter effects, very handy IDE (Flash builder), ActionSctipt 3 (IMHO much handy and more like Java then JavaScript).

And you should forget making app work on mobile platforms.)

The way I see it, the components in Flex and the ability to create a custom component that fits your exact needs (and all of this is done by a fully object oriented approach) cant be matched by the AJAX frameworks. The AMF protocol is also a big advantage since its amazingly fast. The animations are easily created to give each component a feeling that enhances the user experience and can give to your interface a life of its own. Everything mentioned before my post also should be considered.

The open source solutions are there to use them whenever its right, and I would also use it if I wanted to build a simple site with some server side code perhaps.

But when you pass from the "website" and get to the "web application" then I think that in order to be successful you have to create material that stands out. Flex is there exactly for that.

If you can build the same experience without it go ahead and do it, good for you. :)

A project shouldn't be defined by the tools you use, rather the opposite, define your project and choose the most appropriate tools to achieve your objectives.

maybe a first good step ( which you seem to have taken when you decided to "muddle into Flex" ) is to have a better understanding of these tools.

why would you compare Php frameworks with AS3/Flex? what's wrong about updating flash? or if you prefer, what's wrong about updating?!

it's great to have choice, let's not put unnecessary limitations when there's no need to do so. why not decide on a per project basis ;)

Its not an either or decision. Flex components should be viewed as part of a page but do not - I repeat DO NOT make the mistake of building a monolithic app in flex. I just got off a project building a massive flex app. Will never do it again. It has its uses but again, flex widgets should complement an html framework. Not the other way around.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top