about meWedia Ajax
How to choose between Flex and Ajax ? ... Bing ... Flex ... 4 /1554 ... 1 year 2 months ago
I have been a Flex and Ajax fancy for a long time. As the development of Adobe and Internet, Flash player becomes more and more powerful and popular, especially after importing ActionScript3.0 as it's script language. And we can aslo find that Apollo is going to be a powerful desctop developing tool by combing traditional techonlogies like XHTML, CSS, Ajax, Flash and Flex. At the same time Ajax seems to become most devlopers' favourite web developing techonology. Ajax is nothing new, but a new concept of web developing. Then how should we choose between Flex and Ajax?

First, I'd like to talk about why more developers would rather choose Ajax. What advantages does Ajax own? First of all, Ajax is based on Javascript, XMLHttp and HTML which cant' be more familiar to the devlopers. So the developers needn't to learn new techonlogy. And we know that the HTML is base of the current web. It's quite good at text rendering while Flex is not so good at it. So some kinds of websites, such as Blog and Forum system, we have no choice but Ajax. What's more, although Ajax is not good for Search Engine's searhing, it's much better than Flex. So some websites that need to searched, such as bank websites, it's much better to use Ajax. What's more, it's much easier to position the different elements in the HTML page using javascript and CSS. Flex has css too, but doesn't work well like HTML, and sometimes you will find that it's hard to position the controls in the right place. Ajax brings new User Experience and people's desire to communicate with the machines. There is no refresh any more on the web, and it greatly reduce the web traffic and the server side response time. How cool it is!

Second, I'd like to talk about what disadvantages Ajax has. As we know, javascript has some terrible problems that we sometimes cann't bearing, such as the different support on different browsers and on different versions of the same browser. You can hardly image how raging we are when the javascript codes run perfectly in IE whlie it even cann't run in Firefox. However, people find some bright ideas to encapsulate the javascript to make it work on all kinds of browsers. That's what we know now, which is called "Ajax Framework". But in fact it doesn't completely sovle all the problems, for we have to spend some time to familiar with the Ajax Frameworks' APIs. And for the javascript language itself's problem, it's not good at designing the application using MVC design pattern, though some people and som companies have found out some ways to make it, but not good enough. Till now we still don't find some really useful debugging tools for javascript. So you will find it's so troublesome to write javascript codes and don't know what's wrong when it won't work. Then you can image how hard it is when we want to maintain and expand our products, especailly when the data is based on XML, for javascript's troublesome functions and low efficiency on parsing XML.

On the other hand, it seems as if there can't exist both lot's of text and media at the same application. HTML is good at text rendering. However you will see how hard it is to draw a circle in the application. We can hardly control the display of an image and the motion of objects. If the application has to display audio or video, we have to embed add-ins such as flash.

Now let me talk about the advantages that the Flex has. Flex is designed to replace some applications that originally developed by Flash. It has much more components for the web developing, and it greatly improving the capability of text rendering. For it's based on Flash, it's quite good at multimedia, such as charts, sounds and vedios. Flex Builder 2.01 uses ActionScript 3.0 as it's script language, which is a completely OOP language, and it's designed for MVC developing. So In Flex developing, you will find how easy it is to write ActionScript codes to parse XML data that returns from WebService or HTTPs Post or Data Service. And, of course, it's easy to maintain and expand our products by importing MVC design pattern. A little problem of Flex is that the swf file it generates is a little big, most of often, it's greater than 3M. However, when you want to make some cool effects, like dragging and wiping effects, it's much easier to do this using Flex than Ajax. And you will aslo find that there has been well designed components, such as Menu, Accrodian, Table Navgiator, Tree and DataGrid. That's really simple enough for us to use it and develop powerful functions applications. So in this way, I'd like use Flex other than Ajax.

Last, I'd like to have a summarize for "how to choose between Flex and Ajax ".
  1. If we're developing some applications that mainly based on text and need search engine's support, there is no wonder we should use Ajax.
  2. If we're developing applications that requires high interation with clients and with little text for some special clients, I suggest use Flex. And, of course, we can use Ajax if we have excellent Ajax coders
  3. If we just develop serivce needs to control images or sounds, it's better to use Flex
  4. There do exsit some applications that Flex can make while Ajax cann't, so in this situation, Flex is the only choice. Such as 3D translation.
  5. If we're considering much about the perfermence and different clients, Ajax is first choice
  6. If the project is big enough, and there is no well encapsulated Ajax Framework to help you developing, it's really not a good idea to use Ajax
  7. We'd better consider what we need and what our clients need before we start working on the whole project, and if we can, we'd better to find a already exsit Ajax Framework to help us developing. It's really hard to rewrite all the codes again.
Bing ... 1 year 1 month ago
......你华丽的把我的名字打错了......

你后台用c#写的么?
yzl ... 1 year 1 month ago
@lyz
哈哈,你说的那个Ajax异步调用,我还真不太明白你的意思呢。。。这个Blog就是纯Ajax的,你可以移动鼠标到任意一个连接上,可以发现:“WediaAjax.Call(a=105)”这样的链接,后台要做什么事是根据参数“a"和“15”做的。当然这个Ajax是我自己写的,至于ASP.NET Ajax怎么做,这个我还并不太清楚。不知道理解对了没有。。。
Bing ... 1 year 2 months ago
@过客
谢谢,这一路走来,真的很感谢你们这些陌生人的鼓励的,让我总是以饱满和自信的方式继续我的生涯。Merci beaucoup~~~
yzl ... 1 year 2 months ago
@yzl

Don't you think it's too early to talk about SilverLight with Flex and Ajax? It's cool to catch up the latest technologies, but it's not a good idea to use them in our latest applications. Before our developings, we should well consider about the technologies, and that's depend on what we know.
Name*
Email
Website
BoldItalicUnderlineJustify LeftJustify CenterJustify RightIndentOutdentBulled ListNumbered ListInsert LineCreate LinkUnlinkInsert Face
Submit