title | tags | |
---|---|---|
SPA apps in Obelisk |
|
Cale explains how Obelisk is suitable for writing Single-Page Applications (SPA):
For one, you could have just a single frontend route, and then depending on your needs, some backend routes, maybe one to serve a websocket, and some for XHRs.
Moreover, once your Obelisk application is loaded, if you use routeLink and related widgets to change between frontend routes, even though the browser history and URL bar will be adjusted, the application won't reload, and instead the frontend will simply adjust its current state -- so in some sense, Obelisk is specifically geared toward producing single-page applications (along with their mobile counterparts). If any of the frontend routes are loaded, the same application is served, and the state that is reflected in the URL is automatically restored accordingly.