PDA

View Full Version : What is the point of Flex?


snapcount
01-17-2009, 12:33 AM
I've been using Flash since version 4. Right now I'm making sites using Flash CS3 and Actionscript 2 and I think I'm pretty good at it. Now, why should I learn Actionscript 3 and Flex? It's totally different and I'm not sure what would I need it for. What's the difference between Flex and Flash? Why did the morons at Adobe make Actionscript 3 so different anyway?

I tried to install Flex 3 SDK in Linux but nothing happens when I run mxmlc
I just get a blank line where I can type, even if I run mxmlc somesource.mxmlc
What is ant and why did I have to install it? Why did I have to install Java? I don't want anything to do with Java and I hate ants as well.

Today even the most impressive Flash sites are nothing that couldn't be made in Flash 9 + AS2, how exactly does Flex make things any better and why can't it compile the simplest of scripts under Linux?

atomic
01-17-2009, 12:39 AM
Selling more software!

drkstr
01-18-2009, 01:01 AM
If you have to ask what it's for, then it's not for you.

Flex is for software developers creating RIA's. I would rather eat my arm then use Flash CS3 and Actionscript 2 for this kind of work. If you're not feeling Flex, then stick to what you know.


Best Regards,
~Aaron

BruceND75
01-18-2009, 08:52 AM
My, someone's having a lousy day!

I understand your frustration. I'm jumping into AS3 for the first time, and doing so from Flash and AS2. I am a bit luckier in that the windows environment appears more stable.

Not sure what the Linux options are IDE-wise, but FlashDevelop is free. If you think about it, that it a pretty incredible thing, opening up what was to many people (especially students) a prohibitively expensive realm of Flash. And Builder is free to students.

Down the line, that Could mean a real surge of creativity and expansion of the AS base.

As for why the big change, it is making ActionScript truly object-oriented. It means that AS isn't just an island unto itself, but ready to be intregated with other systems out there in yet unimaginable ways.

Think of the object as an atom. AS3 unleashes the full 'atomic' power of the object.

(Excuse me, that must all be from the Guiness I just finished.)

snapcount
01-18-2009, 10:19 AM
If you have to ask what it's for, then it's not for you.

You sound like my girlfriend. :)

Yes, I've been making database driven Flash websites (oooh sorry, applications) since 2001. So now Flex and AS3 require learning stuff all over so I can do stuff I already know how to do in Flash and AS2. Adobe (or Macromedia) felt the need to compete with Java and .NET so they took what was essentially a very simple and powerful web design tool and tried to make some serious enterprise platform out of it.


I am a bit luckier in that the windows environment appears more stable.
Not sure what the Linux options are IDE-wise, but FlashDevelop is free.

Oh, I installed it on Linux just for kicks, I do my web dev work in Windows. And yes, I finally got it to compile (the problem was it was using the wrong version of Java - I still don't understand why it needs Java in the first place) and get this - the simplest Hello world application (using the panel control) is 180 kilobytes! I made complete websites that were less than 180 KiB. I guess I just don't understand the point of Flex - and I haven't seen any impressive (and high profile) Flex websites.


As for why the big change, it is making ActionScript truly object-oriented.

As for OOP, I've been introduced to this amazing :rolleyes: concept back in 1994 when I started dabbling in C++ and guess what, I've been making a living programming for ten years now without practicing OOP (or really knowing what it's good for) so as far as I'm concerned the market has spoken - it doesn't care about OOP. As far as I can tell, the market also doesn't care whether I'm using AS2 and Flash or AS3 and Flex as long as I make good looking websites that do what they're supposed to... so I'll stick to what I know for the foreseeable future.


Thanks for your replies. :)

wvxvw
01-18-2009, 12:05 PM
The fact that you've been doing something for the very long time doesn't prove you've been doing it right or efficient.

The main reasons to use AS3 are:
- faster development
- better performance
- better security model
- work with binary data
You need Flex for rapid development of complicated RIA where time is important. Because it offers a set of common controls + RPC library + data visualization components. Also, there're a lot of 3rd party libraries designed solely for Flex, which make your work even faster and the result even more impressive :)

You need Java because Flex compiler is written in Java, this is what makes it platform independent. You need Ant to put together the resulting SWF, but Ant isn't mandatory. Technically, if you understand what it is doing, you can achieve the same with any other automatization tools (I believe Windows Server 2003 / 2008 has some alternative solution, though, it's not open source and not free).

The smallest site I've made was 6Kb, so what? :confused: You surely don't need to import the framework for the site that displays the "hello world" message... I thought that's obvious... you need the framework, when you're planning to use extensively the components it provides, otherwise it's pointless.

https://www.photoshop.com/index.html?wf=testdrive&ref=px
This is the example of what you're likely to use Flex + framework for.

snapcount
01-18-2009, 02:25 PM
The main reasons to use AS3 are:
- faster development

What makes faster development possible? Anyway, they said that about C# and .NET but after a while I just reverted to PHP, regretting the 6 months I wasted becoming proficient in .NET and never using it again. Same with Ruby on Rails.



- better performance

This is very important to me... if you mean graphics related performance then on that merit alone I might invest the time to learn Flex and AS3.



Because it offers a set of common controls

I avoid using controls I didn't write myself whenever possible. And who needs Flash for boring data grids and forms and boring default scrollbars anyway?



+ RPC library

I've looked this up and it sounds suspiciously like having the client send a request to a server-side script and receiving the response. I've been doing this with Flash since like 2001. What is a special library needed for? What wasn't I able to do without it?



You need Java because Flex compiler is written in Java, this is what makes it platform independent.

Too bad it's not Java independent. And why should I need Java to run an application (in this case compiler) that's been written in Java? I don't need to install Delphi to run an application made in Delphi. :confused:



You need Ant to put together the resulting SWF

I don't get this. Shouldn't the compiler put together the SWF? :confused: What does the compiler do if Ant puts together the SWF?



you need the framework, when you're planning to use extensively the components it provides, otherwise it's pointless.

Ah, now I understand. For me it does seem pointless. :)



https://www.photoshop.com/index.html?wf=testdrive&ref=px
This is the example of what you're likely to use Flex + framework for.

Oh, that's nice but is there some high profile company (other than Adobe) that actually used Flex for their website or some web service? Web based photo editors are nice but they're a rather niche market considering my business is primarily web development for companies.

snapcount
01-18-2009, 02:35 PM
And I'm sorry if I'm coming off like an asshole but I'm very suspicious of any new technology being pushed on me (and Adobe is pushing AS3 to replace AS2). I've wasted a lot of time learning technologies I never got to use (because I never needed them) so I'm very careful about what new stuff I get into.

Sekhar
01-18-2009, 03:49 PM
You're bringing up two separate issues. AS3 vs. AS2 and Flex vs. Flash. Going with AS3 is a no-brainer: better code organization, design, maintainability; strong build-time error checking; consistent event model; etc. to add to what's already been pointed out - search the AS forums/Google for more. Don't dismiss it out of hand.

Now coming to Flex, it depends on what you want to build. If you do web banners or simple sites, may be Flex isn't for you. But if you're building a complex RIA like say a Salesforce interface, you definitely need it. You sound like a device driver writer who insists assembly language is all you need.

If you do plan to create RIAs, check out Flex for at least a week before calling it pointless (or calling the Adobe guys morons). I'd start with the Flex Builder trial (lasts 60 days). Flex Builder is what really shows the power of Flex development. Get the Eclipse plugin. You'll be learning a LOT of new stuff and will feel like a hillbilly in New York City for a while, but you'll "get" it pretty quickly.

wvxvw
01-18-2009, 07:13 PM
@snapcount:

Hehehe... are you calling some technology, that's been on a market for 3+ years new? Not in the programming / computers world, I'm sure.

OK, I'll try to explain in-depth.
So, if you want to compare .NET + ASP to something in Flex, then a closest analogue would be MXML + AS, though it's very far from being exactly the same. But this isn't the main cause of faster development. The main benefit of AS3 is runtime errors reporting. So, while in AS2 complex application you could spend hours finding the place where it decided to concatenate strings instead of adding integers, now it'll pop up in a window telling you the name of the misbehaving function + all the stack trace, so, you don't spend time finding those error. Another great speed-up is due to the strict typing, which allows for normal atocompletion (though if you ware familiar with FLASC / MTASK and FDT / FlashDevelop before, that's not that big a bonus, but there's some speed-up anyway).

Hm... I don't understand why are you so negative about Java... firstly, you don't need the Java IDE to run the compiler... none of them :) You need only JRE, and that's true for AS2 / AS1 too, because AS2 / AS1 Adobe compilers need JRE to run. And, if there wasn't Java, there's no other environment that allows for the same code to run on different operating systems... so, you'd need to compile for every system separately, and then have a different behavior of the same code on different systems... say, take the total of bug reports on compiler already submitted (which is a 3 digit number) and multiply it by 3 at the very least :)

What the ASC (Action Script Compiler) does - it only generates the ABC files (ActionScript Byte Code), but you also need to transcode the resources you want to embed and to put them into the file. Also, SWC files, for instance, need to have an XML file generated along with them, + maybe some icon images + notes etc. And it would be wrong to make a compiler do all that by itself as long as there're tools for it already. Another thing, you may want to automate the file generation (say, you need to compile SWF's in runtime, depending on what the user requests + have a comfortable way to change compiler settings (and there're lots of them). Ant is needed there because it will read the XML files it needs to build the SWF, find the resources, set the paths to the libraries it needs, set compiler configuration parameters etc.

And lastly, RPC is only one library of a plenty that may be used with Flex. I find it very convenient to use it instead of writing it on my own. That's the purpose of the library - to let you have some code already written for you :)
Ugh... and here're few other examples of using Flex:
http://flex.org/showcase/

Or just check www.thefwa.com there're really a lot of sites built using Flex framework... You should be more specific when you ask, because what you ask is kind of "show me the cool site on the Internet" :)

charlesshoults
01-19-2009, 02:17 PM
Alrighty, just a small comment:

I've been using Flash since version 4. Right now I'm making sites using Flash CS3 and Actionscript 2 and I think I'm pretty good at it. Now, why should I learn Actionscript 3 and Flex? It's totally different and I'm not sure what would I need it for. What's the difference between Flex and Flash? Why did the morons at Adobe make Actionscript 3 so different anyway?

The first thing this makes me think of is an old man asking "Why do I have to buy a new fangled DVD player when the VCR works just fine? Companies are just trying to take advantage of me and get me to buy things I don't need!" They don't realize that disks last longer and the picture and sound are better. Their real complain is that they have this huge media library that they now feel is a wasted investment and are fighting the change. The second thing it makes me think of is a report I read a week or so ago, the percentage of companies who use Microsoft Office as their primary document platform, because it's what they're used to, not because it's the best platform for the job. They don't want to switch to something better, or cheaper, because they don't want to teach their employees something new and they fear compatibility issues. What happens in nature when things don't change? Stagnant environments develop disease, sometimes deformity and eventually irrelevance.

Everyone else here has provided very good information about why AS3 and Flex now exist. If you're one to produce banner ads and movie clips, maybe it's not for you, but if you're building an ambitious content management system or complex standalone applications, it's worth a look. Look at the examples and materials that others have recommended, do some leg work, then decide which direction is best for you. Don't badmouth a product from a lack of familiarity. I came from Visual Studio 2005 and VB.NET. I've never used Flash CS3. While having no background in Flash has caused me some frustration and at times, Flex has been a pain to work with, Flex is much better than Visual Studio. When I learned about Adobe Air, I dropped Microsoft immediately and will never go back.