Compare between FLEX, JavaFX and Silverlight - apache-flex

Has anyone built application to compare the performances of them?
(performances like speed, different between GUI etc.)
If no, Can anyone recommend me which function (in each of them) should I use to compare them?
Thanks

Try the Bubblemark animation test: http://bubblemark.com/
It runs with multiple versions of Silverlight, JavaFX, Flash/Flex, and even includes DHTML and some other frameworks.

I used all three.
From my experience I can tell that Flash output (Flex produces) is fastest. Silverlight is also OK. JavaFX is again slow like applets.
The best gui is provided by Flex. But this is about taste. JavaFx also has great features about ui. But it is really slow. Noone would want to wait for it.
If you use Flex the output will be flash so nearly everyone will see it. But some may not see silverlight since they don't install the plugin or some does not have jre so they can't see the javafx.
And also there is "Open Laszlo" It is opensource and may output flash or dhtml. Does good job.

You should try RIABench: http://www.timo-ernst.net/riabench-start/
It's much more sophisticated than Bubblemark because it's split into multiple tests and is based on true scientific methods of performance testing.

Related

Flex UI testing automation

We have a flex based UI whose functionality (eg: login, logout) needs to be tested periodically in IE 7. Manual testing takes a lot of time and hence we want to automate it.
EDIT: We dont have the source code of this app uder test so cannot use something like FlexUnit. Is there a way to automate this testing?
I have heard of FleXmonkey, but have read negative reviews of it and hence wary of trying it.
EDIT: source of negative review:
Automated testing of FLEX based applications
(Comment by Ryan H)
Please suggest if theres a way to go about it.
EDIT: An open-source solution is preferred.
Thank you.
You won't get very far in your development adventures if you avoid reviewing things just because you read negative reviews. ( Please provide a source for said negative reviews ). I've also read bad things about Flex and Flash Builder and the Flash Player. Yet, you still ended up using Flex?
That said, I strongly suggest checking out Flex Monkey.
RIATest is another option.
I believe you can also do this sort of testing with QTP. I couldn't find a specific source for QTP info, but there are a few links if you google.
http://www.learnqtp.com/does-quicktest-professional-support-flashadobe-flex-applications/
http://vishnuagrawal.blogspot.com/2009/04/flex-automation-testing-with-qtp.html
Without recompiling the source code, it is not possible to test Flex in all cases. Saucelabs IDE claims that it can test Flex without recompiling the code. You may check that.
I think FlexMonkey is pretty cool and worth judging on your own. Most of these tools use the same underlying automation framework provided by Adobe, and thus have many of the same pains and challenges. We've actually done a lot the last few months to make it easier to work with and have been working to provide more documentation on dealing with common challenges.
If you do have problem, you will find that our Forums are very active with questions and answers: http://www.gorillalogic.com/forum/7
-Jon Rose -
Gorilla Logic, Inc
Some Flex automation tools support testing of Flex applications without requiring to recompile it.
RIATest definitely supports it (called runtime loading) and if I am not wrong QTP does it as well. AFAIK there are no open source tools that support it.
Beware though that runtime loading is not for every application. If for example you are using custom html wrapper you cannot use it with runtime loading.

Testing flex with selenium without updating code

I have been asked to check how to load test a flex application.
I've though about using Selenium, since it's precisely its job. I've also found that testing Flex with Selenium requires extensions to Selenium. I've seen that there some of these :
sfapi
flex-ui-selenium
First, it seems that both requires me to rebuild my Flex application to test it. is it true ? Isn't there any way to automatically add handles ?
Second, when doing so, will I be able to do all kind of tests ? Load tests ? Performance tests ? All these in a continous way ?
Thanks
Yes there is one another way, but that is too complex to care or to implement. It's called OCR or http://en.wikipedia.org/wiki/Optical_character_recognition
Also you could use image recognition.
Alas, of course you can't automate a flash or a flex you need to rebuild it to use ExternalInterfaces to make some methods publicly available. That is how it is. The flash is one big chunk of an object there are no tiny parts that you could catch with anything else.
So you have these options only, nothing else i'm afraid.
Adobe Genie can be used for testing flex apps without rebuilding the flex application, and its free.
However, only Actionscript 3 is supported. AIR, AS1 & AS2 is not supported. Currently MX and Spark components cannot be tested, the doc says it can be done, but doesn't say how.
Another option is Sikuli, this is a image based testing tool. Its strength is its image heuristics, and does not use coordinates for comparison, unlike most image based testing tools.
No you don't need to rebuild your application. There is an option to do this, but there are also options not too. The manuals clearly describe both approaches.
Check out also:
RiaTest
Flex Monkey
Neo4J

Flex automated acceptance testing tools

I am looking for recommendations for tools for automated testing of a web application with some flex components.
To provide some background we have a web application that was entirely developed in AJAX+HTML and we were somewhat successful in using Selenium for testing that application end to end. We recently added some flex components into the mix and it got complicated.
We tried using Selenium Flex but we are disappointed with what it can do. So now we are looking for some alternatives. Ideally the tool would be able to drive both the web and the flex parts simultaneously, but we can also settle for just testing the flex components on their own. We prefer open source but good commercial tool is also an option.
I've heard about Fluint and FlexMonkey but haven't tried them yet. Anybody has any experience with using those? Any advice for someone who is just starting? Any gotchas?
Are there some other tools that could be used?
Thanks.
i'v try FlexMonkey.
It was great, until he get lost in the recording of interaction with huge and complex Flex Component.
For me, and for now, it's great in the demo or with small app, but not ready for production.
BUT : seems to evolve quickly.
I've had much success using FunFX to automate a fairly complex Flex application. FunFX is built off FireWatir, which is another web automation framework similar to Selenium. So together that should cover the entire AJAX/HTML + Flex bits of your application.
Since both FunFX and FireWatir are Ruby-based, I also recommend something like Cucumber as your testing framework to glue everything together.
We've had some success using Fluint for unit testing and Quick Test Professional (with the Flex plug-in) for functional end-to-end testing. QTP is pretty heavy-weight, but once you've got it set up and have created a few tests, it works pretty well. It works with Flex as well as vanilla HTML/Javascript, so even if your app is a mix of the two, it should be able to handle it.
Fluint works great for unit testing, but given the amount of code required to test a component, I wouldn't advocate it for functional testing (it's too low-level). FlexMonkey is more of an automation framework for Flex Unit. You basically use it to record test cases, and it generates code using Flex Unit to perform the test. I've tinkered with it, but ultimately decided to use QTP.
As for tips to using Fluint: Learn how to use Sequences if you want to test a Flex component - it will make your life considerably easier.
RIATest. This thing rocks. It blew away Flex Monkey (at least in my evaluation)
Our app is fairly large and complicated with custom components and all. RIATest could recognize and manipulate almost everything. Others needed small tweaks since they were custom composite components.
RIA Test has the right balance between features, price and ease of use.
Down side. Paid commercial product.

Alternative to Flex Framework

Is there an alternative ActionScript 3 lightweight framework out there similar to Flex, but not as huge. Flex is fairly large, and SWF's being no less than 150Kb big, I'm just thinking it must be possible to get something that have smaller SWF files as an end result.
I've come accross AS Wing, and was curious if there's more.
Thanks for the replies in advance!
This may be what you're looking for :
http://code.google.com/p/flit/
I haven't tested it yet so I can't really say if it's worth it or not
You can change some settings when compiling to reduce the size of your .swf. Here is a blog posting showing how.: Reduce Flex 3 File Size. Basically you compile the sdk into a separate .swf that gets cached by the flash player.
http://www.openlaszlo.org/ is an open source alternative that can generate swf8, dhtml, or swf9.
The GraniteDS framework provides a clean-room re-implementation of the MXML->SWF compiler, and it may possibly give you options to generate smaller SWF files. It can also do that compilation on the fly, which is pretty cool.
Why don't just use Flash? You can dump your logic in AS class file.
Swf from Flash can be pretty small, can down to 8kb, or even smaller.
Correct me if I am wrong, I see Flex as a Flash with XML Layout Manager (which can position components well during resizing). If you are willing to spend time on designing a Layout Manager for Flash, i think Flash is a good choice. Flash supports AS3, pureMVC.
Of course, Flex is free :)
check out http://www.weaverfx.com/index.php?option=com_content&view=article&id=13&Itemid=6
they claim that applications built with there framework are of the tune of 20 to 100Kb
AS3Commons UI Invalidation & LifeCycle provides an entire component life cycle framework similiar to that of Flex but written in pure AS3 an hence small and independent. If you are about to create your own components you should give this library a try.
Edit: self-plug
Another component libary:
AS Data Provider Controls is a new set of standard UI components built with plain ActionScript. Open source.
Edit: self-plug
Thanks for all the helpful replies. I'm busy experimenting a bit with an ActionScript 3 project in Flex Builder, and I think I might just create the components I need myself and make them modular for re-use in other projects.
That way, I can include exactly and only that what my application is using, and not worry about an additional x00000Kb of data that gets dragged along either as an RSL, or merged in my code.

Do I need Flex Builder?

I am completely new to Flex.
Can I realistically develop, say, a medium complex application with the Flex SDK alone, or do I need Flex Builder?
Also, apart from the SDK, what will I need to get started?
Thanks for any help.
I was there a year or two ago, so here's my experience. In order by subquestion:
I am completely new to Flex.
I was new to Flex too - and Actionscript (although it's a superset of javascript, which I know pretty well; although it sure doesn't feel like javascript to me).
Can I realistically develop, say a medium complex application with the Flex SDK alone, or do I need Flex Builder?
Maybe, if you already know Flash and Actionscript pretty well. I didn't, so I found it sure helped. But it isn't any different from any other IDE-or-not decision.
Also, apart from the SDK, what will I need to get started?
Nothing, unless you want to use AIR, which is only a simple download. Everything else is in there. I was completely happy with my experience; no unpleasant surprises, and you're asking the same questions I did. YMMV.
You don't need it, but it can be helpful.
I've found FlashDevelop to be a much better IDE for coding ActionScript. It ties in with the (free) Flex SDK, so as long as you don't mind coding the MXML by hand then it should work great. I've created a number of smaller Flex apps using this, and it's worked great. I generally shy away from graphical GUI designers anyway, so it worked quite well for me.
FlexBuilder gets you two things that (afaik) you can't get elsewhere. A visual designer for the MXML, and a debugger. If you get the more expensive version of Flex Builder you also get a profiler.
The visual designer is good if you want to quickly prototype something, or if you're used to designing UI stuff that way (and I can see where it would be helpful once you start getting into more complex UI stuff).
The Flex SDK comes with a command line debug tool, but the GUI you get with FlexBuilder makes using it a lot easier. This is what made getting FlexBuilder worth it for me. I generally don't use FlexBuilder for everyday development, but when I need to debug it makes things much easier.
If you're the one who would have to pay for FlexBuilder, try it without FlexBuilder. If you start running into a situation where you feel having the graphical designer or debugger GUI would be helpful, grab the FlexBuilder trial. You'll have 30 days to try it out. If it helps you enough that you think it's worth the cost, then buy it. If you're getting along fine without it then you don't have to worry about getting it.
If your employer would be purchasing it and has the budget for it then it might be worth getting it sooner, but you could probably do the same thing I mentioned above so as to possibly save your company some money.
You don't need FlexBuilder to develop Flex applications, I use:
Flex SDK
Editor of your choice ( I use emacs on Linux, Notepad++ handles ActionScript well in Windows)
Ant (Flex SDK comes with Ant tasks)
I wrote a entire blog post on how to set up a Flex development environment:
http://blog.apterainc.com/software/setting-up-a-flex-development-enviroment-in-gnulinux/
While I blogged about setting this environment up in Linux, most of the steps can be directly transferred to a windows environment.
As to the other posters: Developing GUI components in Flex is no different or harder then using HTML to design a webpage. If you require a WYSIWYG editor for that, then you do not know Flex or HTML well enough.
FlexBuilder has been well worth the investment for me personally; it's probably paid for itself tenfold or more. No, far more. Easily.
A few key fetures I've most enjoyed:
Intellisense/code-hinting: Especially if you're new to Flex, this'll speed your learning process along surprisingly well;
The Profiler: The live memory/app profiler really helps keep an eye on what's happening inside the box;
The Debugger: It's tough to beat being able to set breakpoints, trace the stack, watch variables, etc. -- great stuff here;
Eclipse: Eclipse is just an excellent IDE, and Adobe has extended it beautifully for Flex and AIR.
Incidentally, I don't do any drag-and-drop stuff, myself; I code everything manually, and I still can't recommend FlexBuilder enough. If you can part with the cash, chances are you'll be happy with the product.
Flex Builder is really useful if your application involves lot of GUI. It provides you a nice IDE do draw GUI. If you are just building actionscript that transforms to swf, you don't need Flex Builder. Flex SDK with your favourite editor is enough.
You may have to learn Actionscript and MXML DTD.
It's not required but it certainly makes things easier.
However, having said that, when you're using the FlexBuilder, you'll probably still end up doing minor tweaks to the UI in the mxml code and not in the IDE.
G-Man

Resources