

Ask HN: Flex or JavaScript.  Which way to go? - russell

I am adding features to a large web based enterprise application shared by several companies.  The sever is Jboss/Java/Spring/Hibernate.  The client side is HTML/JavaScript with a small amount of AJAX.  400K lines total. The appearance is ugly as sin and performance is slowed by too much page loading and 200k of JavaScript libraries( fixable).<p>5-10% of the application has been converted to Flex and the client loves it.  The interface is stylish, clean, and responsive.  The client wants the new part done in Flex.  Nothing in the Application uses any advanced features like video or animation.<p>My objections to Flex are several.  The full conversion will take a year or two, because it needs to be rewritten.  For that period there will be a Flex interface and a JS/HTML interface, right now in different windows.  I think this will be awkward for the other companies participating.  The HTML interface can be cleaned up using a little design and CSS and rewritten as needed.<p>In any event the client side needs to be rewritten.<p>I think, but have not verified, that there are a lot more third party JS widgets than Flex.<p>Flex and JS can talk to each other, but they use different DOM implementations.  I wonder how easy it will be to keep a client side global state while loading different sub-pages.<p>And I dont know Flex.  This is not insurmountable, but it will slow me down.<p>Thoughts?
======
mahmud
I briefly flirted with Flex and it reminded me of the era when I waited on a
corporate custodian to release features that I needed yesterday. Flex might be
open source but the culture is really hard to stomach; Adobe runs the show
every step of the way, and nothing gets done without their blessing.

JavaScript improves at the pace of your users; i.e. you can roll out next-
generation features by edict :-) it's free, portable, well-established,
pleasant to work, and it's _ours_.

------
mtarnovan
Maybe you could use ExtJS or ExtGWT (<http://extjs.com/>) since you're already
developing in Java?

------
cosmo7
You might want to consider separating your front and back ends with an API
that could be accessed by Flash or AJAX.

You can then introduce a simple client and progressively enhance it according
to your client's sensitivities. If you use AJAX I recommend jQuery.

------
triplefox
If you want Flex/JS interoperability: haXe.

~~~
russell
Have you used haXe in a production environment or enough to see if it works as
it promises, truth verses wishes, and warts? Does it deliver on the promise to
seamlessly compile to different target languages? It looks promising.

Thanks.

------
PaulMorgan
The client wants the new part done in Flex.

The Customer is always right - use Flex.

