ASync (2011)

ASync is a Drupal module providing a purely asynchronous environment on a single full bootstrap.

Origins

ASync is basically a port of Zeke, a homebrewed all-Flash Drupal framework. All those years of Flash left me with a lingering belief in the need to do away with having to reload the entire page when going from one page to the other, to have a website behave more like an application.

How does it work?

The whole page only fully loads once, then Ajax takes over. One of the main, if only, difference between an application and a website is that the latter requires multiple points of entry: we can't just funnel users through the homepage. As with Zeke, Asual comes to the rescue: Flash has SWFAddress, HTML has JQuery Address. Roughly put, the page loads the basics, then Address takes over and fetches the main content and subsequent loads using Ajax. The result is something like http://example.com/#/your_page instead the typical http://example.com/your_page. Granted it's slightly less elegant but the benefit certainly outweighs that minor discomfort in the long run. And your typical user doesn't really give a rat's butt about the URL.

"What about'em Google? Everything is going through the homepage -- Google sure won't like that, no?" Well, that's where the poundless URL comes in: ASync redirects http://example.com/your_page to http://example.com/#/your_page immediately using Javascript detection; as far as i know, search engines bots aren't Javascript-aware, so they should see the site in typical HTML fashion.

Is this going anywhere?

I'm hoping i can find the time to take a peak at what the Drupal 8 Web Services team is cooking up for us -- the very little i had the chance to read leads to believe they're heading the asynchronous way. A better ASync may already be in the works, no need to duplicate their effort.

But i needed a quick and dirty single-bootstrap solution, so in came ASync. In its current state, the module is in embryonic phase, this site barely standing as a proof-of-concept; so until i pull the plug on this thing, this website is likely to be the only combat this module will ever see. If you feel there may something more to it, let me know.

Update - May 11, 2015

Four years later: Drupal 8 still isn't officially out yet, standing at beta 10 at the time of writing. As for the topic of purely asynchronous environment, it is being considered in the fringes in the shape of "Headless Drupal", but nothing taking hold in the mainstream as far as i can tell, presumably due to the fact that developing a pure Javascript front-end is not an endeavor for the faint of heart.

To be honest, i never thought i would revisit this project -- in fact, this page was being considered for redirection to /dev/null. However in the process of updating this sorry site, i ended up updating jQuery Address as well, which now allows to ditch the darn anchor-based redirection, http://example.com#your_page, for the infinitely more elegant http://example.com/your_page, making address handling perfect, reviving my interest this little side project. Now the only problem remaining is form handling: get it to work out of the box out-of-the-box, the idea of a quick and dirty headless Drupal become a definite possibility. More to come?

Final Update - April 20, 2015

More to come? Naaaaah... found something better: React (https://facebook.github.io/react/). Exactly what the doctor ordered -- and then some. As mentioned in my earlier update, a pure Javascript front-end is no walk in the park, but React makes it definitely a great deal easier, to the point of debating whether i should trade in PHP for Javascript (ok, that may require a little pondering first, but it's that good). So in short: no, this is it for Async. So long!