AJAX - The Complete Reference

(avery) #1

PART II


Chapter 9: Site and Application Architecture with Ajax 451


No matter whom we wrap things for; the same mechanisms will eventually be
employed. We’ll talk more about this later on in the chapter but as of for now let’s move
away from the concept of just a little bit of Ajax within a page that a user might take or
leave and move to building a system that could be quite different with Ajax available or not.
This is going to introduce a whole host of architectural challenges to surmount, so why
wait? Let’s go full-site Ajax now!

Full-Site Ajax


Traditional Web applications have tended to uniquely associate a single URL with a single
piece of information or application state. However, Ajax applications, particularly those
which aim to fully embrace the communications pattern, will likely break such a pattern
without modification. The reason for this is that most complete Ajax applications tend to
follow a single page application (SPA) pattern where the URL stays fundamentally the same
as the user moves around the application. This apparent cosmetic difference comes with a
significant price, as we have broken with one of the key architectural traditions of the
Web—that is, one URL equals one resource or application state.

NNOT EOTE The architectural challenges when moving beyond the one URL equals one page or state are
not new. In the past, Web designers who employed complex framesets or built their entire site or
application within a binary technology like Flash or Java faced similar problems. The solutions
presented here are quite similar, if not identical, in approach.
Free download pdf