4 ms·
Here's one of a million scenarios i can think of: Say someone is browsing nodes on the meta64 tree, then decides to edit one. I popup an editor and let them edi
by ClayFerguson 10y ago
Here's one of a million scenarios i can think of: Say someone is browsing nodes on the meta64 tree, then decides to edit one. I popup an editor and let them edit, they can then cancel out and go back EXACTLY where they were, without a page reload and scrolling back to where they were. SPAs are all about the fact that everything maintains state in a Javascript app until it's changed.
A javascript application is like a computer program running in your browser. Whether you realize it or not, every page reload is a 'restart' of that app. Do you think an app needs to RESTART just because someone changes screens or soemthing? It's insane right? Without an SPA that is that is genuinely whats really happening.
- ec109685 10y agoThe browser will maintain the history if you opened the editor in a new page like HN does. For example, if I hit the back button or if there was a cancel button when composing this comment, I would return to exactly where I left off in the full list of comments. I agree you can get into a slightly weird situation if you hit the back button after composing a new comment but your site would suffer the same.
- ClayFerguson 10y agoIn my site, the back button takes you to the app you were at BEFORE you went to meta64. If you want to call that a problem fine. Most SPAs abhor the back button, don't want it, don't need it, etc. There is a reason native apps don't use the 'back' feature, but simply have 'cancel' buttons to get out of things etc. The fact that the back button is such a thorn in the side of non-spa apps is a good hint that non-spa apps are not ideal, unless browsing static documents. BTW even hacker news has a 'back functionality' that sucks. You have to go back then refresh. Meta64 is already vastly superior to other online social media experiences including wikipedia and including better than this HN site.
- ec109685 10y agoMost Native apps do have a back button. On android it is built into the phone. Also, serious question: if I navigate your rss outline, how do I go back and chose a different section to browse? Right now you are stuck in the section you chose and the back button closes the app.
- ClayFerguson 10y agoMy GUI design is definitely not yet perfected. I experiment with lots of different things. The website is not ready for users, but mostly DOES work. The RSS is pretty much usable however. One of my own main news sources. The triangle icon at the top is what takes you to the Parent node. BTW, i'm 49yrs old so my definition of "native" still means "desktop". lol. Apps like MSFT Word (and all others) don't have back buttons, becasue the back button was invented for web browsers showing static documents, back in 1993. It just still exists, but today but is valueless (and even problematic) for SPAs.
- duval 10y agoThis guy has gotten it so wrong I'm verging on mistaking it for a troll.
- ClayFerguson 10y agoNewsflash for ya: The whole world is moving to SPAs.
- flukus 10y agoYour world maybe. I'm not using any of those resources hemorrhaging nightmares..
- ClayFerguson 10y agoSwitching to an SPA will cause resource problems, if you have leaky memory use (i.e. maps or arrays that continually grow). An app that refreshes pages a lot (non-SPA) will have those bugs masked, because essentially every page refresh is a clean slate (release of memory). Don't blame the SPA-pattern itself for that problem.
- duval 10y agoI spend all day writing SPA code and would be fired if my boss saw me do anything like that
- ClayFerguson 10y agoI tried to reply to your post replying to this about using BACK button, but that is also a disaster for apps. Back button is NEVER used in SPAs. Anyway HN is not showing me a reply button so I can't reply to your actual post to the child node of this.
- Isofarro 10y agoOut of the browser navigation facilities, the back button is the best understood feature. Users know how to use it, and what it should do. Perhaps, where this goes is that Single Page Apps and web browsers aren't a good fit together?
- ClayFerguson 10y agoWe all know the web was invented for static document browsing, and that was the REASON the back button was invented. Nowadays with Javascript everywhere on all devices everyone is writing APPS that run in the browser. It is simply bad design to have those apps rely on a browser-level back button, for anything at all, because the back button assumes your previous URL 10 seconds ago was different, and that's a very stupid assumption. If you can define what "back" even means in a way that applies to all APPs go for it. You can't. It's a nonsensical type of question for an APP.
- flukus 10y agoAs they said, perhaps browsers and SPA's aren't a good fit. It's not a good idea to have a control on screen that will potentially break the app. If you want to run in a browser environment then you need to adhere to the browser environment.
- ClayFerguson 10y agoWhat most SPAs/apps do is 'tolerate' clicks on the back button, by taking you to some reasonable prior place, within the same site/app. Now that I think about it more, i might even support this in meta64 just to appease the masses. I could just make it where it sets the url to the NODE-permalink (maybe changing the hash part only), so that if some rogue person hits the browser back button they just to go whatever prior node they were looking at before. You talked me into it. thanks.
- flukus 10y agoThat scenario is already handled (and arguably a lot better) by the middle mouse button and existing browser functionality.
- ClayFerguson 10y agolmfao. Maybe Microsoft Word hasn't figured out yet how much more usable Word would be if it scrolled you to the top every time you opened a dialog and closed it. That's hilarious.
- ec109685 10y agoBrowsers maintain scroll position when clicking back.
- ClayFerguson 10y agoAre you guys actually arguing that closing a dialog or popup in a web-app should be done with the back button? Or merely that the back button should DO that functionality? Once you write a true "application-like SPA" you see the flaws in the back button, for anything other than static docs, but unless you have the experience you won't "just get it". There's a reason no "back button" was ever invented for "desktop apps" and ONLY came into existence in web browsers browsing static docs.
- flukus 10y ago> There's a reason no "back button" was ever invented for "desktop apps" and ONLY came into existence in web browsers browsing static docs. It exists in quite a few dekstop apps (explorer and control panel on windows to name a couple). Android also has an ubiquitous back button.
- ClayFerguson 10y agoApps which have a meaning for "the previous place I was at", benefit from a way to go back. I do plan on a "back button" in meta64 that takes you to the prior NODE (and will be a full history of nodes), but this most definitely will not be a page refresh of the entire page. Will be a button INSIDE the app, just like all other APP functions. Meta64 is a mobile APP also, so relying on a browser-level back button is not an option.