从介绍看,还是很有吸引力去了解一下这个JAHAH,http://www.blogmatrix.com/tls/jahah/

What is JAHAH?

JAHAH is an AJAX-like technology for 'mashing' web pages together.

  • It is easy for web page authors to include JAHAH documents
  • It is easy for content producers to create JAHAH documents
  • JAHAH documents can be included "cross-domain", unlike most AJAX technologies
  • JAHAH documents are search engine friendly

Where does JAHAH come from?

JAHAH is based on existing ideas and technology:

  • AHAH is technology for directly including HTML fragments using AJAX
  • JSON is a scripting-language friendly way of transmitting data across the web (that works cross-domain)
  • JSONP is an incremental improvement to JSON that allows the document requestor to specify an arbitrary prefix to be returned prepended to the result

JAHAH Web Service Description

A web service that provides JAHAH documents must behave as following:

  • If there is a 'jsonp' parameter, it must return:
    • the value of that parameter, followed by
    • if everything's OK: a JSON dictionary with 'html' containing the payload
    • if there's a problem: a JSON dictionary with 'error' containing the error message
  • If there is no 'jsonp' parameter, or it is empty, the webservice must return an HTML document, where the BODY of the document is the payload

It is also acceptable, though not encouraged, to return only a string with the payload rather than a dictionary. It is OK to return other values with the dictionary, excepting that all single letter keys are reserved.

How do I include JAHAH in my document?

You are free to do this anyway you like if you don't care for what we've done here. However, we do provide some pretty nifty tools if you want to try them. Note that do not add the 'jsonp' parameter to URIs here -- our code provides this function automatically to callback to the correct places.

NOTE: our JAHAH tools use MochiKit. We include a copy in our little source distribution for now, but we may take it out if this thing starts rolling.



Trackback: http://tb.donews.net/TrackBack.aspx?PostId=685324


[点击此处收藏本文]  发表于2006年01月06日 3:44 PM




正在读取评论……
添加评论
大名
网址


验证码
评论