Re: Sending html via ajax -vs- building html in js (was: jQuery Ajax request to update a PHP variable)

From: Cary Gordon <listuser_at_nyob>
Date: Thu, 8 Dec 2011 09:44:16 -0800
To: CODE4LIB_at_LISTSERV.ND.EDU
For the last year or two, we have done apps that return HTML.

I don't have the energy to jump into this, and although I think that
the HTML method is more efficient (at least in our case) and possibly
more flexible, I don't have hard data to back that up.

Cary

On Thu, Dec 8, 2011 at 9:24 AM, Brian Tingle
<brian.tingle.cdlib.org_at_gmail.com> wrote:
> On Thu, Dec 8, 2011 at 9:11 AM, Godmar Back <godmar_at_gmail.com> wrote:
>
>>
>> Let me give you an example for why returning HTML is a difficult
>> approach, to say the least, when it comes to rich AJAX applications. I
>> had in my argument referred to a trend, connected to increasing
>> richness and interactivity in AJAX applications being developed today.
>>
>
> don't get me wrong; I love hipsters and JSON.  JSONP callbacks are esp.
> handy.  I still would not consume it from a source I did not trust.
>
>  ...
>>
>
>
>> If we tell newbies (no offense meant by that term) that AJAX means
>> "send a request and then insert a chunk of HTML in your DOM," we're
>> short-changing their view of the type of Rich Internet Application
>> (RIA) AJAX today is equated with.
>>
>> sure, fair point -- I just don't think there is anything wrong with
> generating HTML on the sever and injecting into the DOM if that makes the
> most sense for what you are trying to do.  And for things that work that
> way now, I don't see a need to rush and change it all to JSONP callbacks
> because of some vague security concern.
>
>
>>  - Godmar
>>



-- 
Cary Gordon
The Cherry Hill Company
http://chillco.com
Received on Thu Dec 08 2011 - 12:45:45 EST