4 ms·
It's different in that before you might have: home.html profile.html group.html and all of those pages are literally different views and you use ajax to grab
by lbotos 12y ago
It's different in that before you might have:
home.html
profile.html
group.html
and all of those pages are literally different views and you use ajax to grab the data.
Now you build:
index.html
with subviews and essentially index is doing all of it. Picking your subviews, handling making urls, rendering, making the requests.
I still haven't found a "class" of app that is "better" with SPAs. Just about anything you would do with an SPA you can do another way. SPAs are just the "cool new thing".
- bduerst 12y agoThis is a pretty good explanation, and I'd also add that SPAs move away from the traditional server-structure URL path mentality, which wasn't very user friendly and never really needed. Now URLs are kept mostly for sharing or bookmarking. i.e. www.domain.com/user/profile/update.html can just be handled in index.html
- acjohnson55 12y agoBy "traditional server-structure URL path mentality", do you mean the mapping of URLs directly to static files on the filesystem? If so, I'd argue that's a separate issue from SPA vs. MPA. After all, most MPA frameworks, like Django and Rails, break that equivalence. URLs map to controllers, rather than particular templates.
- bduerst 12y agoI meant the mentality, which started with URL static file mapping and continued with web routing. Not all URL path routing is bad, but with SPAs you get more focus on what the customer uses URLs for (i.e. URL paths for sharing a picture, etc.) rather than parsing page functionality out across different paths. It's my opinion this URL simplicity makes a better user experience, but that's just my opinion.
- deleted 12y ago[deleted]