Joshua Java

Why you might not want to use Flex

Posted on: November 23, 2008

At the time being I am doing a Flex project for my client. Alot of people has been praising Flex for being the answer in the RIA world. In one way and the other, it’s true: Flex is really sexy, because it can bring all of the interactiveness and statefulness from desktop app world to the webapp world. But there is a but. It’s good from user’s point of view. But from developer’s point of view, it’s a different story. You might have to think again whether or not to use Flex for your next project if you are currently considering to use Flex. What I’m saying here doesn’t mean that Flex is not good, but rather I’m saying there is a consideration you might have to think about before you want to use Flex and there is consequences to get all of those sexiness.

Flex is good for a reason, but it’s not for the other reason. Doing almost everything in Flex is quite different compared to regular web development using html, css and javascript (or web 2.0 as some people say). I’ve even made a presentation about this and shared it with JUG-Indonesia several months ago. For some people there will be some pains they have to go through when entering the Flex world. And for some people these differences might not be acceptable because in one way or the other it can affect the productivity of the developers in the team. Anyway, all in all the reason you might not want to use Flex is:

With Flex you would require extra efforts to do a simple thing.

That’s it. That’s the only reason why you might not want to use Flex. Even the simplest task that does not require you a web framework to accomplish it, Flex can introduce you an extra effort to do it. Not to mention also solutions that has been made simpler with web frameworks, is not available in Flex yet. If you can live with those hurdles because you are the code ninja and you’ve got plenty of time to do deal with it, then you might not want to read the rest of this blog entry and bugger off instead.

Note: At the time of writing this blog entry, I am using Flex 3 and Actionscript 3. So as time goes by you might find this post irrelevant.

Some task that turns out would require you another extra effort in Flex compared to many other Java frameworks in general are:

  1. Selecting combo box value
  2. You know how in HTML there’s a master page where you would have result list and you click the row in that list to get into the detail page and in that detail page there is a combo box where its value is assigned based on the the result from the master page. This is not so much work in HTML right? If you are using Java web framework like Struts or Tapestry it’s even easier to assign a value to a combo box.

    In Flex be prepared for some extra work since you need to make a helper code, for assigning that value to a combo box. Okay to get the idea what I’m talking about, let’s just have a look at the code.
    Here’s the Flex ComboBox component look like:

    <mx:ComboBox id="catCombo" dataProvider="{categories}"/>
    

    dataProvider is a list of objects that will be displayed on the combo box, it can be an Array or ArrayCollection. Now we will use these list of objects to be selected based on the value from the master page. This ComboBox also has a selectedIndex attributes which we will use. Now we must make a helper function that I’ve told you about to get the selectedIndex of the object. Here’s how it would roughly look like:

    public function changeCombo(list:Array, label:String):int{
    	var i:int, index:int;
    	for(i=1; i< list.length; i++){
    		if(list[i].label == label){
    			index = i;
    		}
    	}
    	return index;
    }
    

    We pass on the Array object, in this case the categories and the String label we want to get. We then make a loop to match which object from the Array that has the same String label that we want to get. From there we can get the index and use that as the selectedIndex as such:

    catCombo.selectedIndex = changeCombo(categories, product.category);
    

    This is the simplest pain you’ll get in Flex. But don’t worry, it can get much worse than this as we move on. Just hold on to your seats if you still can handle it.

  3. Formating data in DataGrid
  4. I have a scenario to format a data with type Number inside a data grid. In JSF I would just use the formatter component for this and nest it inside the DataTable, but in Flex it is slightly different. Instead of using an mxml component and nest it inside the DataGridColumn component you would actually make a function for it. Let’s take a look at the code to get the gist of it:

    <mx:DataGridColumn labelFunction="priceLabel" sortCompareFunction="sortPrice"  headerText="Price" textAlign="right"/> 	
    

    This is the DataGridColumn component that is nested inside a DataGrid component to display a data with type Number. Now since I want to format this data with a thousand and decimal separator, I need to make a label function for it:

    private function priceLabel(item:Object, column:DataGridColumn):String{
         return fNumber.format(item.basePrice); 
    }
    

    But hold on, that function need to actually call a formatter component that actually define the format of the number:

    	<mx:NumberFormatter id="fNumber" 
    		decimalSeparatorTo="." 
                    thousandsSeparatorTo="," 
            useThousandsSeparator="true" />
    

    Well, that’s quite a work just for the sake of formatting data huh? But are we done yet? Of course not. By default DataGrid component are able to sort data by clicking the DataGridColumn header, since we have formatted the data that is inside it, we need to make a function to sort that data. That sorter function would kinda look like this at its simplest:

    private function sortNumber(item1:Object, item2:Object):int {
         	if ( Number(item1.basePrice) > Number(item2.basePrice) ) return -1;
        	else if( Number(item2.basePrice) > Number(item1.basePrice) ) return 1;
        	else return 0; 
    }
    

    Now we can relief since we are really done. It took quite a while just to format a data inside a DataGrid hey? If you have used JSF, you would know how easy it is to do this.

  5. Validating data from input fields
  6. How would you normally validate data from input fields in your framework? In Tapestry 5 I would only need to add one attribute called ‘validate‘ and use it as such:

    <input t:type="TextField" t:id="firstName" t:validate="required"/>
    

    And it is an Ajax enabled validator too.

    In Flex you can achieve the same thing, by adding a Validator component. So if we want to re-write the above example in Flex, it would be as such:

    	<mx:StringValidator id="vFirstName" source="{firstName}" required="true" property="text" />
    	<mx:Form id="form2">
    		<mx:FormItem label="firstName">
    			<mx:TextInput id="firstName"/>
    		</mx:FormItem>
    		<mx:Button label="Submit" click="save()"/>
    	</mx:Form>
    

    But unfortunately the above code doesn’t actually prevent user from submitting the form. It will just give a message that there is a validation error but the form will still be submitted. Now you must make an extra effort to prevent user submitting form. One way to do this is by disabling the button until it is validated. To achieve this, it will introduce you several lines of codes. First we must make an event listener for listening to user typing in the entry field and validate the input:

    [Bindable]
    public var formIsValid:Boolean = false;
    
    private function listener(event:Event):void{
    	formIsValid = true;
    	focussedFormControl = event.target as DisplayObject;
    }
    

    In the listener we define the current ‘on focus’ field that is being validated. We will need the value from this flag for the next function.

    private function validate(validator:Validator):Boolean{
            var validatorSource:DisplayObject = validator.source as DisplayObject;
    
            var suppressEvents:Boolean = (validatorSource != focussedFormControl);
    
            var event:ValidationResultEvent = validator.validate(null, suppressEvents); 
    
            var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID);
    
            formIsValid = formIsValid && currentControlIsValid;
            return currentControlIsValid;				
    }
    

    The above function is to actually call the validator to validate the source. Now we need to get the source of the validator and we match this validator’s source to the currently on focus control, if it is not the same then we will suppress the event. After that we check whether the form is valid, if it is valid we will enable to button and user will be able to continue submitting the form. For that we need to change a bit of our view code by adding the change attribute to the TextInput and the enabled attribute to the Button as such:

    	<mx:Form id="form">
    		<mx:FormItem label="firstName">
    			<mx:TextInput id="firstName" change="listener(event); validate(vFirstName);"/>
    		</mx:FormItem>				
    		<mx:FormItem label="lastName">
    			<mx:TextInput id="lastName" />
    		</mx:FormItem>
    		<mx:Button label="Save" click="save()" enabled="{formIsValid}" />
    	</mx:Form>
    

    This is where Flex differs from other web framework. It provides flexibility in the validation, but its going to cost you several lines of codes. The example I’ve given you is just the simplest example. Of course it can go wilder from there. The wilder it get, the more code you have to write.

  7. File upload
  8. The last point in this article is File uploading. So how do we do file uploading in Flex? As you may have known already, there is a fileupload input in html for uploading files and in some Java frameworks like Tapestry 5 defining a file upload component is a matter of typing one line of code:

    <input t:type="upload" t:id="file" validate="required"/>
    

    In Flex … unfortunately there isn’t any file upload component. So what if you want to upload a file with Flex then? Flex only provides you with a FileReference object which you can use with other component and massage it to be a custom file uploader component.

    To make the file component first we should make the button and the textfield to be referred by the file. We’ll create a simple one as described below:

    <mx:Application
    	xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:local="*" creationComplete="creationComplete()">
            <mx:Form id="form">
    		<mx:FormItem label="Image" required="true">
    			<mx:TextInput id="image"/>
    			<mx:Button label="Browse" click="fileRef.browse(allTypes)" />
    		</mx:FormItem>
    	</mx:Form>
    </mx:Application>
    

    So what happens here is, a FileReference object will browse an array of file type that is allowed to be uploaded. Here’s the script for it:

    /** Image uploader */
    import flash.net.FileReference;
    import flash.net.URLRequest;
    import flash.net.URLVariables;
    
    private var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
    private var textTypes:FileFilter = new FileFilter("Text Files (*.txt, *.rtf)", "*.txt; *.rtf");
    private var allTypes:Array = new Array(imageTypes); 
    
    private var fileRef:FileReference = new FileReference();
    

    During initilization we must also tell the application to add an event handler when a file is selected and when a file has been successfully uploaded as such:

    private function creationComplete():void{
           // Listener when user selects the file
    	 fileRef.addEventListener( Event.SELECT, selectHandler );
    
    	 // Listener when file is uploaded
    	 fileRef.addEventListener( DataEvent.UPLOAD_COMPLETE_DATA,completeHandler );
    }
    

    Now the function for the event handler itself are as such:

    private function selectHandler(event:Event):void {
    	image.text = fileRef.name;
    
    	var params:URLVariables = new URLVariables();
    
    	var request:URLRequest = new URLRequest("/product/uploadImage.do");
    
    	request.method = URLRequestMethod.POST;
    	request.data = params;
    	fileRef.upload(request, "fileName");
    }
    
    private function completeHandler(event:Event):void {
    	// Do something here upon completion
    }
    

    In the file select handler I basically tell Flex to upload my file asynchronously on the background to the URL I’ve defined. That URL can be a Java controller for uploading the file, or that could be a PHP or Rails code or anything to upload your file to the server. For the ‘complete handler’, I didn’t do anything there. But you can do whatever you want there, like giving a message to the user that the file has been successfully uploaded etc.

To sum it up, let me rephrase what I have said in a simpler statement:

Flex is not agile (enough)

If you are into an agile framework that can boost up your developers productivity, Flex might not be for you and you might be happier with something else.

I can go on and on with this as there is more in the list to what I have written here. I’ve only covered some basic stuffs that turns out requiring another extra effort. But we must also remember that Flex is still relatively new, so we still have hope in the future. There just hasn’t been many frameworks that is built around it yet to solve this common issues. This is the same situation in Java when there was only Java servlets back then, but things has gotten better now right? You can even see new Java frameworks rise up to the surface everyday. Perhaps the engineers at Adobe are looking at it at different way: though you must go through those pains but on the other hands Flex is able to offer you greater flexibility and control. As they always say: No pain, no gain.

That’s why don’t just take my word for it, try it out first and see how far you can deal with it. If you’re okay with it, please don’t hesitate to use it. Cheers.

Tags:

33 Responses to "Why you might not want to use Flex"

If you are looking for a RIA -framework that gives a lot of thought to agility of the development, take a look at IT Mill Toolkit :

– You only write Java: no XML, no HTML, no JavaScript needed
– Using high-level OOP language gives you the power of modern IDE:s for refactoring and developing code (Eclipse, Netbeans, ..)
– Free. Open Source. Under really liberal Apache 2.0 license.- Really rich widgets, just look at the demos at: http://itmill.com/
– Full-blown Ajax UI supporting all modern browsers (without writing any Ajax code yourself)
– No plugins needed
– Mature: lots of apps written with the toolkit since year 2001
– All of you code is securely executing on server-side: integration with backend is just a method call – just forget perils of writing and maintaining separate server and client
– Strong data-bindings built in, easy deployment as a servet or portlet, useable from any IDE as the library is just one JAR-file, no dependencies
– Easily extensible in Java using Google Web Toolkit

http://www.itmill.com

Good post! I share the PITA :)

I would echo some of the comments above for GWT. These RIA frameworks can help build some extremely complex UIs faster than good old HTML/JavaScript but they do make it harder to do some of the simplest things. Given that there are so many convention over configuration frameworks out there now, it sometimes feels like Flex/GWT are a step backwards from that perspective. As for anything, there is always a trade-off of course. Hopefully, as these frameworks mature, they’ll embrace some more conventions to facilitate getting some common things done faster.

“Hitting a nail with a hummer” rule applies to all the technologies/frameworks (not only to Flex). Flex is rather a good thing for a niche UIs that are intended for a target audience. Thanks for the article!

Sorry but your blog post shows you have too little experience and expertise with Flex to be making recommendations to the rest of the world about whether or not to use it. Seriously… point by point:

Item 1: Just use comboBox.selectedIndex and comboBox.selectedItem… you can compare your index number like “index == comboBox.selectedIndex” or you can compare objects using “item == comboBox.selectedItem”. No big deal and no helper functions.

Item 2: Here’s your drop-in solution (if you really need it):

There’s nothing wrong with the labelFunction. Personally I don’t see that the sort function is anything but trivial… however if you prefer the inline itemRenderer that works. Adding the dataField attribute to the DataGridColumn means that sorting will continue to work without adding a custom sort.

Item 3: Apples to oranges… you said yourself, Flex applications are more like desktop applications than web applications… so complaining that they handle validation differently than an HTML-based application is a bit insincere. If the economy of code is so important you could just use programmatic invocation and a function behind your button to call validate() on your validator and then fork execution based on the result.

Just keep in mind that Flex is _not_ HTML and isn’t a rapid application development platform. It’s a lot more like doing Java desktop application development than it is HTML and comparing it to HTML is just plain wrong.

Item 4: OK, you got me. There’s no Flex analog to the tag like there is in HTML. HEY, wait a sec… no you don’t. Dude, Flex != HTML and Flex doesn’t even use the request/response cycle like HTML does. It’s a whole different paradigm… sure it may cost you a few extra lines of code, but when was the last time you saw an HTML-based file uploader that had an accurate, realtime status bar? Seriously… with greater power and greater flexibility comes a bit more code.

I think this post should be titled “Why Flex sucks when you’re used to HTML” or even “Being a Flex n00b is Time Consuming” not “Why not to use Flex”. If you expected Flex to be exactly like HTML it’s no wonder your disappointed.

GAH! Now I’m so glad I copy/pasted a backup of that comment before I sent it. Here’s the drop-in solution for item 2 with entities:

<mx:DataGridColumn dataField=”basePrice” headerText=”Price” textAlign=”right”>
<mx:ItemRenderer>
<mx:Component>
<mx:Text id=”albumName” width=”100%” selectable=”false” text=”{outerDocument.fNumber.format(data.basePrice)}”/>
</mx:Component>
</mx:ItemRenderer>
</mx:DataGridColumn>

Jared. Thanks for the comment. I really appreciate it.

But you are missing my point. For whatever reason, the economy code is the main concern. As I said on the last section: more code, more flexibility. But I don’t need flexibility, I need something that is agile. And perhaps others might be in the same situation as me.

Cheers.

I understood your concern on the productivity. But why did’t you choose Silverlight as the paltform if the graphic effects are not so important?

I agree, the learning curve is steep, but familiar enough that you can be productive. I chalk this up to unfamiliarity

Wow! You should really remove this post.

There are ton of features that you have so clearly missed. If anything, the simple stuff is even easier in Flex than in DHTML.

Rule of thumb, “if it seems a too complicated, you’re probably over thinking it.” Read up on ArrayCollections and ItemRenderers, they will save you tons of time. And if you need something that seems common, it has most likely been created and is publicly available on someone’s blog or the Adobe Exchange.

Finally, if you need to totally customize something, read up on the “display list” by looking at the source for some of the Flex SDK.

A good post with some valid points. I think it is more than fair to compare flex to a web framework even though they aren’t necessarily aimed at the same class of applications.

@ Jared Rypka-Hauer

1) “item == comboBox.selectedItem”, comparing objects like that is not always reliable. Go develop a flex application with a java backend and then tell me comparing objects like that is the way to go.

2) Why would the average developer of ANY application implement validation on a form without actually checking the result? Get real.

3) Go to: http://www.adobe.com/products/flex/overview/. No wait… let me quote it for you “Flex is a free, open source framework for building highly interactive, expressive web applications that deploy consistently on all major browsers, desktops, and operating systems.”

Yep that’s right ‘web applications’. You might want to look up the definition of a web appplication (http://en.wikipedia.org/wiki/Web_application) because interestingly enough it talks a lot about HTML.

Seems pretty fair to compare web applications to web applications in my opinion.

4) I honestly can’t believe you consider yourself a community expert. How about next time you feel like lecturing someone you choose a topic that you actually know something about.

In my Flex project, we use Web services (because of some specific requirements) and we had a lot of problems with the code generated from WSDL. There are compiling errors and many bugs inside. I was surprised when I figured out there are too many issues with code generated from WSDL by Flex Builder.
My idea is “When you use Flex, avoid using web services”. With a complicated WSDL file, you will have a big trouble to resolve.

Hey Joshua, what happens to your productivity when you factor in all those extra hours testing your JSF/HTML solution across all major browsers? Even if it’s just CSS tweaking, any productivity gains that you may have made are lost there and you end up with a less functional product for the same or greater amount of time. Developing in Flex gets more productive the longer you do it as you build up useful libraries like your number formatter. Look at as3corelib as an example.

Regarding the DataGrid example, can you tell me how easy it is to create a sortable, scrollable, drag and drop-enabled DataGrid with a few hundred rows in JSF? It must be pretty easy if it’s easier than in Flex.

@Darren:
So far I had no problem dealing with cross browser if using JSF. :-) As long as I conform with standard CSS, I’ll be alright. Anyway, I make webapps and what user is looking for are more to the business logic and the usability. So far there’s a little chance they’ll ask for pretty faces.

Regarding the DataGrid, perhaps you would really use Richfaces or Icefaces for that.

To sum things up …the easy things in other frameworks are still easy in flex… but … the difficult things are also still easy in flex

I find it a good effort in your part to try and compare some functions from Flex to other frameworks. But you need to invest alot more time into Flex and correct some of your statements.
Web frameworks like JSF, Tapetry etc.. all have their shortcommings too.
Personally I think Flex/JavaFX or Silverlight are the future to go. Simply because they utilize the good of the web (the transport part) and leave behind the evil (the browser). The bowser was never intended for application usage, and even with Ajax is still not that usable.
Using the web is becoming transparant on the desktop and the new technologies like Flex/JavaFX and Silverlight will replace HTML/Ajax applications in the near future.
Why would I want to use a crappy illequipped browser when i can have a real platform in which i can develop applications.

I don’t see a point that Flex is coming somewhere in b/w as being Agile.

[…] Why you might not want to use Flex At the time being I am doing a Flex project for my client. Alot of people has been praising Flex for being the answer […] […]

It’s not about how convenient it is for developers. It is about how it works for the end usrs, the customers.

Try to implement the charting funcitonalitu in html/dhtm :) Not to mention interative charting functionalities.

I think this blog post brings up some good points.

I blogged a comparison of Wicket vs GWT recently and one of my conclusions was that it was not possible to implement the example used in Flex.

Flex is good and has some powerful feature. I have used in past in 2-3 projects.

But main issue why we did no go for it in big enterprise projects, was mainly speed and performance.

Even in Flex 3 (RSL caching) it is still not as good as it should be.

Portal and WSRP support is very immature.

Bookmarking URL is not easy.

Developing in IDE is time consuming not agile as save and referesh.

MVC is not trivial.

We used JSF1.2.10 with Facelets and SEAM and JBoss RichFaces.

Joshua, i really think that you should document yourself on Flex before writing this kind of articles.
And, please, don’t talk about JSF. The whole Java community hates it, and they’re wright. This technology is at least crap and should be throw into a black whole, juste like EJB < 3.
I was part of a team in 1M$ project using JSF, and now we know that we sould never do JSF ever again.
Flex is a real good technology if it’s use correctly (i.e. not like you seam to use it).

@Thai Ha
I really doupt that we shouldn’t use Flex with W-S. Although REST or AMF may be a better choice, SOAP W-S can be relevant. I made a full interface for a PHP e-commerce solution, using its SOAP API, and all went just fine (on Flex side). Maybe the is one more time between the chair and the screen… :-)

Waddle,
Provide me with solution please instead of telling me to read documentation. Flex docs is not really useful as it only covers basic usage and doesn’t cover the points that I brought up.

Your example is kind of trivial. If you are considering using Flex to replace basic HTML forms – you are right – you don’t want to use Flex at all… use HTML forms.

Now, I would be very happy to see you talk about how you implement an interactive vector graphics canvas in fewer lines of code than it takes you in Flex, or in seeing you show off some audio playback in fewer lines… Even better – I’d like to see you show me some javascript code that will take a screenshot of the user using their webcam and allow them to manipulate it using ANY number of lines of code.

Or, to meet you on a more even ground, lets see you code up an image gallery script in Javascript that will take a list of thousands of images and dynamically handle paging them in an elegant way – and allowing you to smoothly scroll through those images. The TileList does this very easily with minimal code (and it cleverly only creates objects that are about to be scrolled into view and disposes of ones that aren’t around anymore to make it not be a memory hog either).

There are many things that flex does very easily that are a pain or impossible in javascript. If you don’t want to do any of these things, then obviously you shouldn’t be using flex and you should be using what works best for the task at hand.

This is an interesting post. I did a direct comparison of HTML code vs Flex code in my article “Getting started with Flex and PHP”.

I see his point. In HTML to download a file you would just link to it. You set the location of the file in the href tag and that’s it. When the user clicks on the link a dialog prompts you to download it. To do the same thing in Flex you have to add an event listener and in that listener you have to create a URLRequest and then either navigate to that using the global function navigateToURL or use the FileReference class and pass in the URL Request instance into the download method (you can see the code in the article).

Do you see the difference? One is very straight forward. But to be fair that is only in this specific example. Some things in Flex are not straight forward. For example, AS3 uses the name “addEventListener” to handle mouse click events. For one, the description is BAD imo for learning. The term listener has no immediate meaning. For someone learning Flex you are introduced them to the Observer design pattern concept and terminology on day 1. Most students struggle with this concepts in my beginning Flex sessions. All you have to do to correct it is give it a name with some meaning. For example, name it addEventHandler or addEventResponder or callFunctionOnEvent(). That way you are not hard coding the description of the most basic requirement of using Flex (click handler) to a design pattern concept :P. Anyway, back to the topic.

The problem is that some functionality requires low level knowledge of the framework and its concepts or a complicated (to a newbie) series of procedures to get it to work.

If you look at this from a high level birds eye view and ask “how would you like this to work in a perfect world?” you can see things where it needs to “level up”.

For example,
<DownloadButton url=”myfile.zip” text=”download file”/>
<UploadButton url=”upload.php” text=”upload file”/>

OR

<DownloadClass url=”myfile.zip” id=”download1″/>
<UploadClass url=”upload.php” id=”upload1″/>

<Button click=”download1.download()” text=”download file”/>
<Button click=”upload1.upload()” text=”upload file”/>

What level are you on? You need to be on level 5 to know how to do that…

Good article about your struggles on using Flex! There are indeed no silver bullets to deal with complex web UI development. Even JSF also has its own shortcomings which can make development even more difficult compared to traditional web development using plain old HTML, Javascript and CSS.

Another framework worth looking at is Zk. I would guess that it has its own unique set of issues but looking at the samples from their website, it seems that the framework is quite mature and very easy to use compared to popular UI frameworks used for Java development.

Dear Joshua,

I’m also a Java developer for a long time. I have tested a lots of RIA frameworks (even Silverlight). And I can say Flex is a lot better in a wide variety of situations as I have seen. Javascript sux. It’s full of flaws and is prone to make us mistake, all the JSF components require Javascript coding for custom things and that’s just not productive. All the examples you cited here show you have little experience with Flex 3 to make a comment of why people shouldn’t use it.

I wonder if you ever had usability problems and had to make a desktop app with only javascript and JSF components, that is surely not a agile and efficient kind of thing is it?

The problem I’ve seen with Flex is that sometimes is difficult to separate MXML in a MVC pattern (as it is in some of Java projects if you don’t architect it right).

Try Silverlight and ZK Ria as well and read about Flex 4 and you will see some features you can do with Javascript but consuming a lot of time developing.

Hi, I want to add some more comments, actually these are only few reasons that are saying not to use flex compare to hundred of reason to choose flex when developing Rich Internet Applications (RIAs) and anyother development envoirment is not even giving anything like it yet also flex and as3 applications are relatively new as compared to java and others and it will continue to improve but if you want to develop a good RIA you will definately choose FLEX for the development.

Hm, I think Flex and html is something like java and c.
Ones is object oriented, and other is not. So with object oriented, comes more power also more work. Just like java, which use a lot of typing as strong typed language.

So, is that fair if we compare flex with html? Both has its own strength and weakness. Just find the best suit to our need.

Comparing always bring pro and conts, but it’s really good to bring a clearance about the strength and weakness for each of them.

You could simplify validation process, other example:

Necesitas mas experiencia con flex, porque estas poniendo codigo de mas, para algunas cosas que muestras.

thank to make me laught today joshua. seriously, you should post other bullshit like this and become famous.

It’s a running gag theses days hearing people coming from HTML and saying “flex is bad”. You know why ? Because they spend years to become experts in HTML ecosystem and now all of theses efforts are transformed by a waste of time using flex.

same things happened when java came and all C/C++ developpers complained about it (about performances for example).

virtual machines inside browser are the future guys. wake up !
Microsoft understand this and bring silverlight not for the fun
believe me !

HTML5 is the last attempt of a dying world to survive.

by the way, do you know why steve jobs complain about flash ?
this is because AT&T cannot handle the bandwidth of youtube clients. They ask him to avoid flash because of that. So don’t say HTML5 is the future because of steve. It’s plain bullshit.

There are many advantages of ActionScript and Flex over JavaScript and HTML. One is that in ActionScript you can get most of your errors out at compile time. You can also use the IDE to understand the code with greater confidence. You get these two advantages because ActionScript can be used as a statically typed language. You can also use dynamic features if and when you want to. Another big advantage is if you use BlazeDS, you can avoid a lot of code–code to generate HTML, XML, and to code to map HTTP requests and their parameters to code handlers on the server. This code is unnecessary with BlazeDS because BlazeDS allows you to replace this all with simple method calls from the Browser to the server. Flex Builder also has a UI visual designer and and excellent debugger.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: