News for hackers. Stuff that matters.
Re:Ask HN: Why not Flex? by nostrademons on Thursday September 03, 2009 @05:43PM (#803636)
It's user-hostile.

Flex code runs inside a sandbox element, much like Java applets. It doesn't feel native to the browser - the Flex app can change things only within its own little canvas. (Okay, there's ExternalInterface as well, but then you're back to writing JavaScript and DOM manipulations.) It's not aware of browser resizing - you're locked into a fixed width layout. It can easily result in horizontal scrolling if you have a full-width Flex app in a small browser window. It generally doesn't show up on mobile devices. It takes forever to load. It disables UI conventions - like being able to right-click on the page - that users are used to. Hitting Ctrl-T when a Flash app has focus does not open a new tab. It's not easily indexable by search engines.

I look at it as Flex:Javascript::Swing:native GUIs. It makes development easier, but at the cost of never quite meshing right with the rest of the platform. You may like it, but your users probably won't.

Re:Ask HN: Why not Flex? by moe on Thursday September 03, 2009 @06:49PM (#803760)
I'm sorry but most of that is FUD.

It doesn't feel native to the browser

Most advanced javascript apps don't feel particular native to the browser either because HTML still lacks basic widgets like a combobox or -button. How many native browser buttons do you see in your Gmail or Google reader interface?

It's not aware of browser resizing - you're locked into a fixed width layout

Wrong. Flex handles browser resizing out of the box, see for example http://www.grooveshark.com

Moreover the Flex layout manager is heads and shoulders above the box model madness of HTML/CSS.

It generally doesn't show up on mobile devices.

That's one valid point. But then again, how many AJAX apps can you name that are really useful on (which?) mobile devices without a special mobile version?

It takes forever to load.

Nonsense. http://omgpop.com feels quite zippy, no?

It disables UI conventions - like being able to right-click on the page - that users are used to.

Point taken. It replaces the browser context menu with a customizable flash menu. That sucks but it's hard to imagine how it could be done otherwise.

Hitting Ctrl-T when a Flash app has focus does not open a new tab.

Works fine here (OSX/Firefox).

It's not easily indexable by search engines.

Neither is AJAX content.

You may like it, but your users probably won't.

That depends very much on the application. Right tool for the job.

Re:Ask HN: Why not Flex? by poppysan on Thursday September 03, 2009 @07:02PM (#803790)
"You may like it, but your users probably won't."

At my job we hold focus groups for all of our projects. Never once has a layman not liked one of our projects because it uses flash.

Most flash hate comes from developers who favor other platforms. Mac vs Windows all over again...

Re:Ask HN: Why not Flex? by papersmith on Thursday September 03, 2009 @10:22PM (#804139)
Just a personal gripe, flash plugin runs subpar in Linux, which I developed flex in for a few months.
Re:Ask HN: Why not Flex? by coderdude on Thursday September 03, 2009 @11:35PM (#804223)
>>>>It's not easily indexable by search engines. >>Neither is AJAX content.

You typically wouldn't load your entire layout via Ajax.

Re:Ask HN: Why not Flex? by moe on Friday September 04, 2009 @08:29AM (#804684)
You typically wouldn't load your entire layout via Ajax.

Depends on the application. Flex doesn't compete with your average listing-based HTML webapp. It's competing with GWT and Ext in the field of complex, desktop-like GUIs ("RIA").

Re:Ask HN: Why not Flex? by eldenbishop on Friday September 04, 2009 @03:45PM (#805545)
Clicked on omgpop.com just to see and it took 25 seconds before I was able to click something. So uh, flex does take forever to load. Twenty five seconds is your idea of "zippy"?
Re:Ask HN: Why not Flex? by hy3lxs on Thursday September 03, 2009 @07:13PM (#803808)
This is like the DIV vs TABLES argument. It really doesn't matter. Use what's best for your target audience and application. If you're writing a game, use flash. If you're making a traditional website, use html+javascript. For everything else in between, some key decision points off the top of my head:

(1) do you care about mobile browsers? if not, flex works on 99% of desktop browsers, and looks almost exactly the same on all platforms with no additional code.

(2) do you need real, bidirectional, binary-friendly sockets or is long-polling with json/xml parsing sufficient?

(3) do you need to make extensive use of tables, images with flowing text, and other complex forms text layout that are trivial to do in html but difficult to do in flex?

(4) do you plan on creating a lot of sound / video / vector animations that need to perform reliably and consistently across browsers and platforms?

(5) does your application need to do a lot of client-side processing?

(6) can you combine the two approaches? example: gmail uses flash just to play the "ding" sound in chat or to show the file upload progress bar; video sites mostly use flash only for the video element and do the rest of the layout in html/js; etc.

Here's an interesting one: compare the rendering speed of maps.yahoo.com (flex) versus maps.google.com (javascript). And the fact that on the smartest mobile devices -- iphone, G1, blackberry -- they all have native versions of the maps app, because the javascript on maps.google.com is so intensive that it's an incredibly poor experience in any mobile browser.

Full disclosure: I work on voxli.com, where the UI of the chat room is 100% flash, but the rest of the website (registration, login, intro, etc) are in html/javascript.

Re:Ask HN: Why not Flex? by lhorie on Thursday September 03, 2009 @06:40PM (#803745)
I really don't buy the user-hostile argument. You write your code and you get a SWF. Youtube has SWFs. Newgrounds has SWFs. DeviantArt has SWFs.

Normally the thought of whether something is running in a sandbox is not a concern if I'm using any of these sites. The only times I would get annoyed by load speed issues had nothing to do with the SWF format, it would usually be of the magnitude of the whole site being overloaded.

I could say Meebo doesn't feel native to the browser either, but I think we're way too much into the opinion territory to be saying that, generically speaking, x or y technology is hostile to all users (especially without knowing what the app is to begin with).

Re:Ask HN: Why not Flex? by jawngee on Thursday September 03, 2009 @05:59PM (#803661)
Flex is aware of browser resizing.

You can also handle right click/context menus.

Re:Ask HN: Why not Flex? by mrshoe on Thursday September 03, 2009 @05:45PM (#803642)
In trying to answer my own question I had come up with some of the same ideas, but you put together a great list. Gracias.