0

I'm working on a big website at the moment and the designers are talking about making a facebook-like content area.. By this they mean that they want to keep the header loaded at all times and then only reload the content area when a link is clicked. Still we want to change the url to keep the framework working as well when accessing some page directly.

I'm not sure how to explain this any further - check out facebook and take a close look at the header whenever you navigate to another page..

Thanks..

Simon
  • 174
  • 4
  • 18
  • It's all done via AJAX, and manipulating url fragments for maintaining state: http://code.google.com/web/ajaxcrawling/docs/getting-started.html – Marc B Jun 29 '11 at 21:55

1 Answers1

3

I'm not sure if you're even asking a question, but here's my response.

Facebook, like most other major websites, use frameworks (custom built, or not) to separate a template into components, separate code logic from design, and more.

The reason why the url and the header will not change is because one of the designated areas of the body is acting as a container. When links are clicked, the data is gotten via remote procedure calls... via their facebook API. The content that is returned is then loaded into that container via javascript.

keywords: ajax, rpc, rest api, javascript, mvc, framework.

all of those things are important to that style of web development.

Kristian
  • 21,204
  • 19
  • 101
  • 176
  • the one bit you're missing is that the window location hash is used for links that don't reload the page, rather than event listeners on the link. So the links are like `Foo`. Here's an SO post with more: http://stackoverflow.com/questions/680785/on-window-location-hash-change – Ian Jun 30 '11 at 01:16
  • oh, and also I believe FB uses AJAX push to keep the stream updated without polling. So that's another thing for the OP to google. – Ian Jun 30 '11 at 01:17
  • @Ian, since ajax uses http, it is a request-response style transaction. So, isn't push and ajax contradictory? I mean, PUSH implies that there is a truly persistent connection and that ajax isn't long polling on an interval. your thoughts? – Kristian Dec 29 '11 at 16:38
  • I've usually seen the term "AJAX push" used interchangeably with "HTTP server push". It may be a bit of a misnomer as you point out, since AJAX technically has a pretty specific meaning, but this wouldn't be the only place AJAX has become commonly used with a broader meaning than its original "Asynchronous Javascript And XML." I think "AJAX push" would be as good a term as any to start googling the whole panoply of technologies that provide similar functionality. – Ian Jan 02 '12 at 05:15