Thoughts on development of RIA (II.)-flash VS Ajax

Source: Internet
Author: User
Tags array object config string
Ajax talks about Flash and Ajax will inevitably provoke a lively debate. Google search is a lot of such articles, here I do not quote. However, I still want to mention Luar wrote ' Looking forward to 2006, Flash has not come! ' This blog, I agree with the view. At the same time Luar as a senior flash developer, his comments are very insightful.
After reading Luar's article, you must be a little pessimistic. How far can flash go in the end? Well, let's not think of such a problem. My view is still more optimistic.
First, look at Ajax. After a few months of attention, my understanding is that Ajax has two focal points, one with no refresh delivery message to the server, and the other is an extension of DHTML (or deep development). Ajax, JavaScript in the browser, like Flashplayer in the As2.0,flashplayer is like a mm browser. I think this analogy is very suitable. Think like this will understand that in the browser environment JS can do a lot as can not do, and JS more mature than as. So the advantages of JS and the broad prospects are very obvious.
Through the development of the Flash Platform client, I found that some of the advantages of flash overlap with Ajax. For example, there is no refresh delivery message with the server, and seamless switching of user off-line and online status. In addition to CSS support and text table performance disadvantage, Flash can be comparable to Ajax. In addition, Flash's biggest bit is the low threshold of development. Flash has a complete IDE and debugging environment, while also can meet the MVC design pattern, it sees the development environment obtained by Art's favor.
In addition to the above comparisons, I imagine that I like flash enthusiasts so that the main reason for supporting him is still with the speed of his growth. Almost every upgrade from 4.0 to 8.0 makes people excited.
Appendix: Here, I used the platform development of the webserver communication with the class file. Import Andyclass.arraytoxml;
Import Mx.events.EventDispatcher;
Import Org.okyere.util.XMD;
Class Andyclass.flashconnasp extends MovieClip
{
This class is used to accept the array variables sent by flash
The array variable is converted to the XML to be sent through the Arraytoxml class;
If the call succeeds, it returns the contents of the My_xml!!!!
Property fields
private Var m_url:string;
private Var M_params:array;
private var m_params_str:string = "";
private Var m_result_errormsg:string;
private Var m_nodename:string
private Var m_urlhead:string;
private Var M_xmd:org.okyere.util.XMD;
private var mylistener:object = new Object ();
private var m_result:string//Specific results
Property fields
public Var addeventlistener:function;
public Var removeeventlistener:function;
private Var dispatchevent:function;
private static var _mixin1 = Eventdispatcher.initialize (AndyClass.FlashConnAsp.prototype);
Public Function flashconnasp ()
{
Trace ("flashconnasp structure");
}
Setter Getter
Public function set URL (txt:string): Void
{
M_url = txt;
}
Public function Get Url (): String
{
return m_url;
}
Public function set Params (A:array): Void
{
M_params = A;
}
Public function set PARAMS_STR (a:string): Void
{
M_params_str = A;
}
Public function set Resultmsg (a:string): Void
{
M_result_errormsg = A;
}
Public function set NodeName (a:string): Void
{
M_nodename = A;
}
//
Public Function Sendandload ()
{
if (M_url!= null && m_url!= undefined&&m_urlhead!= undefined)
{
F_sendandload ();
else if (m_urlhead = undefined)
{
Trace ("M_urlhead Not Defined")
F_load_urlhead ();
}
}
//
Private Function F_load_urlhead ()
{
var owner:object = this;
M_XMD = new XMD ();
M_xmd.load ("Config.xml");
var mylistener = new Object ();
Mylistener.onxmdload = function (evtobj:object)
{
Trace ("Get config.xml parameter Urlhead success:" + EvtObj.data.url);
Owner.m_urlhead = EvtObj.data.url;
Owner.f_ondataloadxml ()
Owner.m_xmd.removeEventListener ("Onxmdload", MyListener);
Owner.f_sendandload ();
};
M_xmd.addeventlistener ("Onxmdload", MyListener);
}
Private Function F_sendandload ()
{
var eventobj01:object = {
Type: "M_onloadvars", Target: _parent
};
Dispatchevent (EVENTOBJ01);
var owner: &NB

[1] [2] Next page



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.