Source code for /src/remote_compare.htm.txt

//======================================================================//
// Author: Mark Qian <markqian@hotmail.com>                             //
// WWW: http://www.coolshare.com                                        //
// Copyright (c) 2006, Mark Qian                                        //
//                                                                      //
// You must contact Mark Qian to get a permission of use                //
// in case you want to make any use of the codes except viewing it     //
// on Mark's site.                                                      //
//======================================================================//


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><META http-equiv="Page-Enter" CONTENT="RevealTrans(Duration=4,Transition=23)">
<META NAME="descrtion" CONTENT="New Framework - Old problems and new solutions"><META NAME="keywords" CONTENT="mark, qian, coolshare, web, new, framework, application, Cocoon, Struts, ATK, Achievo, ToolKit, BinaryCloud, BlueShoes, CakePHP, Catalyst, Django, eZ publish, Fusebox, Helma, Horde, Interchange, Java EE, AJAX, hidden frame, JavaServerFaces (JSF), Jerrata Backbone (Jerrata Corp company info), Jifty, Mach-II, Maypole, Millstone, OpenACS, OpenMocha, Ozone, PHP Framework,PageKit, PRADO, Quixote, RIFE, Ruby on Rails, Seagull, Symfony, Tapestry, TurboGears, web.py, WebObjects, WebSphere, Zope, ZK, java, javascript, integration, database, jdbc, CSS, J2EE, Java, J2SE, J2EE, JSP,  Helma, Hibernate, Spring Framework, CSS, Custom Tags, Swing, Servlets, JDBC, RMI, CORBA, Web Services, EJB, TogetherJ, UML, JINI, DHTML, XML, XSLT, Perl, CGI, Shell Scripts, Visual Basic, Visual C++, VBScript, C#, C++, C, Data Island, ASP, ASP.NET, WebLogic Enterprise Server, MS Project, SQL Server, Oracle, PL/SQL, ">
<script language="javascript" src="/RemoteScriptGuru/html/coolshare/html/js/repair.js"></script>
<script language="javascript" src="/RemoteScriptGuru/html/coolshare/html/js/cross_browser.js"></script>
<script language="javascript" src="/RemoteScriptGuru/html/coolshare/html/js/expand.js"></script>

<body bgcolor="transparent"> 
<script src="/html/js/expand.js"></script>
<table width="100%"  border="1" cellspacing="0" cellpadding="5" summary="XMLHttpRequest Compared to the Dynamic Script Tag" style="background-image:url('http://www.coolshare.com/html/images/rulebk2.jpg')">
  <caption>
  <Font size=4>Table 1. <b>Comparison among a variety of Remote Scripting means</b> (used by Mark's Communicator) by Mark Qian on 9/5/2006 </caption>
  <tr style="background-color:lightgrey">
    <th scope="col">&nbsp;</th>
    <th scope="col"><code>XmlHttpRequest (AJAX)</code></th>
    <th scope="col">Dynamic Hidden Iframe</th>
    <th scope="col">Traditional Static Hidden Frame</th>
    <th scope="col">Dynamic <code>Script</code> Tag</th>
    <th scope="col">Cookie + Image Src</th>
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Is it cross-browser compatible?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>    
  </tr>
  <tr  onMouseover="showtip('\'Same Origin\' policy prevents document or script loaded from one origin from getting or setting properties of a document from a different origin. The policy dates from Netscape Navigator 2.0.', '')">
    <th style="background-color:lightgrey" scope="row">Can it break the Same Origin policy?</th>
    <td><font color=red>No</font></td>
    <td><font color=red>No</font></td>
    <td><font color=red>No</font></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>    
    <td><font color=red>No</font></td>   
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Can it receive HTTP status codes?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#EAFFE4"><b>Yes (not directly)</b></td>
    <td style="background-color:#EAFFE4"><b>Yes (not directly)</b></td>
    <td><font color=red>No</font> (fails on any HTTP status other than 200)</td>
    <td><font color=red>No</font></td> 
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Does it supports HTTP both <code>GET</code> and <code>POST</code>?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td><font color=red>No</font> (<code>GET</code> only)</td>
    <td><font color=red>No</font> (<code>GET</code> only)</td>
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Can it receive XML?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>           
    <td style="background-color:#EAFFE4"><b>Yes</b> (but only embedded in a JavaScript statement)</td>
    <td style="background-color:#EAFFE4"><b>Yes (not directly)</b></td>     
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Can it receive JSON?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>     
    <td style="background-color:#EAFFE4"><b>Yes</b> (but only embedded in a JavaScript statement)</td>
    <td style="background-color:#EAFFE4"><b>Yes</b> (but only embedded in cookies)</td>     
  </tr>
  <tr>
    <th scope="row" style="background-color:lightgrey">Does it offers synchronous and asynchronous calls?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#EAFFE4">No syn(but archievable)</td>
    <td style="background-color:#EAFFE4">No syn(but archievable)</td> 
    <td style="background-color:#EAFFE4">No syn(but archievable)</td>
    <td style="background-color:#EAFFE4">No syn(but archievable)</td> 
  </tr>
    <tr>
    <th scope="row" style="background-color:lightgrey">Can it transfer any size of data?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td> 
    <td><font color=red>No</font> (Limited by url size limitation because of Get only)</td>
    <td><font color=red>No</font> (Limited by cookie size limitation)</td>
  </tr>
  <tr  onMouseover="showtip('the larger the number is, the more restricted', '')">
    <th scope="row" style="background-color:lightgrey">Turning off level - when </th>
    <td style="background-color:#EAFFE4"><font color=red>5</font> - ActiveX off in IE6</td>
    <td style="background-color:#EAFFE4"><font color=red>2</font> - iFrame off</td>
    <td style="background-color:#EAFFE4"><font color=red>1</font> - Frame not supported</td> 
    <td style="background-color:#EAFFE4"><font color=red>3</font> - Script not supported</td>
    <td style="background-color:#EAFFE4"><font color=red>4</font> - Cookie not supported</td>
  </tr> 
  <tr>
    <th scope="row" style="background-color:lightgrey">Is it Back Button (losing history) problem free when used "As Is"</th>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4"><font color=red>No</font> or Yes (Browser depended but archievable)</td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td> 
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
  </tr>  
  <tr>
    <th scope="row" style="background-color:lightgrey">Is it Back Button ("garbage" history) proeblem  free when used "As Is"</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#EAFFE4"><font color=red>No</font> or Yes (Browser depended but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
  </tr> 
  <tr>
    <th scope="row" style="background-color:lightgrey">Is it bookmarked problem free when used "As Is"</th>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
    <td style="background-color:#EAFFE4">No (but archievable)</td>
  </tr>  
  <tr>
    <th scope="row" style="background-color:lightgrey">Is it server-side support free?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td> 
    <td><font color=red>No</font> (The server has to return script)</td>
    <td><font color=red>No</font> (The seever has to write the response to cookies)</td>
  </tr>   
    <tr>
    <th scope="row" style="background-color:lightgrey">Is it client-side support free?</th>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td><font color=red>No</font> (The callback reference has to be preserved and and triggered at client "menaully")</td>
    <td><font color=red>No</font> (The callback reference has to be preserved and triggered at client "menaully")</td> 
    <td><font color=red>No</font> (The callback reference has to be preserved at client "menaully")</td>     
    <td><font color=red>No</font> (Cookie needs to be checked to get response)</td>
  </tr> 
  <tr  onMouseover="showtip('\'No\' means that the scr'+'ipts included in the response won\'t be executed. You have to parse and eval the script yourself in case you want to run the return script', '')">
    <th scope="row" style="background-color:lightgrey">Is the response processed by browser's renderer?</th>
    <td><font color=red>No</font></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td>
    <td style="background-color:#DFFFD6"><b>Yes</b></td> 
    <td><font color=red>No</font></td>
    <td><font color=red>No</font></td>
  </tr>   
  <tr>
    <th scope="row" style="background-color:lightgrey">More to come soon...</th>
    <td>...</td>
    <td>...</td>
    <td>...</td> 
    <td>...</td>
    <td>...</td>
  </tr>       
</table>

</body>
</html>