Pergunta

I am a WPF developer and few days ago I came to know about Flex. Now,I got Following list of questions.

  1. Both of them to be used for creating rich GUI application. So, are
    they competitors to each other.**

  2. If both are to be used for same purpose, then which one should be preferred.**

  3. Moreover, I was also wondering that WPF is based on DirectX for rendering as it does vector-based rendering, but at the same time I am also keen to know that How Flex renders, Flex is based on what??**

  4. Does Flex can also use GPU based rendering... Is there anyway to use Shader in Flex.**

I am very much confused about Flex, because I am very new to Flex........So, Please clear my doubts, as I might be having totally incorrect perception about Flex

Foi útil?

Solução

1 Both of them to be used for creating rich GUI application. So, are they competitors to each other.

Only to a certain extent. As far as I know WPF can only be used to create windows-based applications. Flex' initial primary target was the web and most Flex applications were so-called "Rich Internet Applications".

Later Adobe created AIR, which is a virtual machine that lets you run the same applications on the OS itself, often by reusing 99% of the code that was written for the web apps. Some API's were added to access native functionalities of the OS (client-side database, file I/O, running/accessing native processes, etc.). AIR applications can be deployed on Windows, Mac and Linux alike, though development of the AIR vm for Linux has been stopped.

The last step in this story is that AIR applications can now also be packaged as apps that can be deployed on mobile OS's. Again because it t runs in a VM, this offers a "write-once, deploy-everywhere" solution. Both Android and iOS are supported (not sure about BlackBerry but who cares). On the Flex side of things, some mobile-specific UI components were added to the framework.

2 If both are to be used for same purpose, then which one should be preferred.

The choice is entirely up to you and depends on factors like knowledge about the framework, specific requirements that you might have, etc., etc.

3 Moreover, I was also wondering that WPF is based on DirectX for rendering as it does vector-based rendering, but at the same time I am also keen to know that How Flex renders, Flex is based on what??

Flex is a framework that compiles to ActionScript which in turn compiles to abc bytecode. That bytecode will be interpreted and run by the Flash VM.
The roots of Flash lie in vector-based rendering (it was the solution to render vector graphics on the web for the two previous decades). All stock graphics for the Flex UI components are thus vector-based.

4 Does Flex can also use GPU based rendering... Is there anyway to use Shader in Flex.

GPU acceleration has been added to the Flash/ActionScript API somewhere in the last 5 years, but because the Flex framework was created long before that, and porting it to the new GPU-accelerated system would be too complicated, Flex does not benefit from that evolution.
But you can use a Flex UI side by side with GPU-accelerated components. You could for instance create a normal Flex application with just one component that renders a 3D model that kind of lives outside the Flex display list.

Usually only games written for the Flash VM do leverage the GPU acceleration. Most of them use the Starling framework. For mobile UI's you also have the option of the FeathersUI framework, which provides a GPU-accelerated mobile component set on top of Starling.


Note that @Vinodharajan's answer is not entirely correct in that the Flex framework is no longer property of Adobe. Adobe donated it to the Apache foundation about two years ago and it has been evolving there ever since.

Outras dicas

Flex is a Adobe base front end product. This internally uses Flash to render its content on the browser or Adobe Air for standalone application. This can use hardware rendering. You can just think this as a alternate from Adobe for WPF.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top