[thelist] refreshing content like twitter

Renoir B. renoirb at gmail.com
Thu Sep 6 16:14:32 CDT 2012

It is not an easy task what you are asking.

Nothing of that sort exist as a pre-built package but is basically what a
programmer would have to do in a site.

You have to consider

*1. Expectable HTML pattern*
Meant to represent each entry, being consistent is key.

Nicolle Sullivan adressed this issue at Facebook and explains the concept:

A much recommended talk to look for.

*2. JSON-providing endpoint*
A URL that you can ask stuff much like REST is all about anyway and it
returns a JSON formatted string of already formatted (date, comment in an
already minimal html, etc)

But beware, I strongly suggest you create a static version of that URL or
cache it somewhere. Otherwise each time you call it it gets a database
query and. Really. Do you really need latest state version?

*4. Caching*
As said earlier, this is very useful. And decouples de need for database
query. A key for performance.

*3. Javascript to handle*
Once you have a JSON string you can parse, you can map into DOM object
creation and implement those HTML patterns.

Hope this helped.

*Renoir Boulanger*
Frontend developer &
Software designer

Nouvelle *version *de mon site sur


2012/9/5 Bob Meetin <bobm at dottedi.biz>

> I've got some content bits that folks will be regularly adding comments
> and such to, very similar to how Twitter works. Registered member adds a
> comment. The comment is dynamically posted to the page along, it shows at
> the top of the list, and other comments scroll down until it reaches a
> limit.
> I dabble little enough with AJAX to know how to update a <div>.  I did a
> number of searches and found some 'periodic' update scripts, but this will
> be more of a whenever. Something like a daemon is watching the queue and
> wakes up when new content arrives.
> The second complication is scrolling as opposed to simply redrawing.  My
> JavaScript skills are weak. Figuring out how to do this in jQuery or
> Mootools will be a perilous journey.
> Can anyone point me to a pre-built script which will handle the
> requirements - 1) update/adds as new content (mysql) arrives and scrolls
> like Twitter?
> Thx, Bob
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_**evolt/<http://evolt.org/help_support_evolt/>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list