8 ms·
IMHO the whole advantage of single-page apps is about separating the UI and the data + using the browser as a cross-platform UI toolkit, runtime and deployment
by qwerty456127 8y ago
IMHO the whole advantage of single-page apps is about separating the UI and the data + using the browser as a cross-platform UI toolkit, runtime and deployment engine. The reason for SPAs to exist is that browsers are the only way to deploy an app that runs on every OS, looks pretty, automatically updates in an instant every time you run it and can be discovered and ran by everybody in a single click. Just imagine a world where something like WPF was made a truly free standard with full-featured 100%-compatible open-source implementations available on all the major OSes (Windows, Mac, Linux, Android, iOS) from the beginning and packed with efficient support for apps to be ran straight from a URL.
- ct520 8y agoI imagined a world of apps designed with xaml /me shudders
- qwerty456127 8y agoWhy? Doesn't it suit designing apps better than HTML or anything?
- ct520 8y agoyou tell me. Real world examples lead me to believe otherwise..
- pjmlp 8y agoAfter doing that for the last four years, the prospect of focusing again in Web is what makes me shudder.
- colde 8y agoInteresting, i've had the exact opposite feeling with XAML. I've written a bunch of Silverlight and WPF, and always felt it to be probably the best UI framework i have worked with. Certainly beats all the web frameworks, and imho it was also better than Swift and Interface Builder.
- mrfredward 8y agoI mostly like WPF (and use it a lot), but there are a few design issues that drive me nuts. The most common one is ObservableCollections--if I have a List in the model that is going to update as something happens, how do I bind that to something in the view? Does my model throw events that trigger the Viewmodel to update an ObservableCollection? In Angular it's trivially easy to bind to an array and have it update. In WPF, it's hard enough that I architect my applications around that one single problem.
- chosenbreed 8y ago> I imagined a world of apps designed with xaml /me shudders Mmm...XAML/WPF has one thing going for it though...you can be assured that a code-base you haven't touched for year will still work :)
- ct520 8y agoGreat point!
- AnIdiotOnTheNet 8y agoJava is pretty much all these things, except the highly subjective "looks pretty". It's kinda funny how Java was hated for not using native widgets, and now using native widgets is considered a negative.
- qwerty456127 8y agoJava WebStart has been discontinued and never worked fast. JavaFX is great but it seems it's too late for it already and Oracle seems having no enthusiasm about promoting it (did they ever have any interest in anything Sun but the patents anyway?). "Pretty" is indeed subjective but it's not hard to understand what does it mean for the majority of non-geeks.
- pjmlp 8y agoDespite the Oracle hate from developers that actually never placed Java applications in production, the Java community appreciates the work of Oracle and in many domains they have delivered a better work than Sun was doing in the last years. JavaFX has been separated from core JDK, to allow for quicker development and integration into other vendors JDKs. Until now the Oracle JDK was the only one supporting JavaFX.
- qwerty456127 8y agoI hope this is going to help.
- tambourine_man 8y agoThe Java plugin, like Flash, was a security nightmare and poorly integrated with the rest of the stack. Not having a bundled set of widgets is probably an advantage, flexibility wise. People like to bash (ha!) JavaScript, but I think it’s begginer friendliness is often overlooked. Just look at how easy it is to get something done compared to Java in the browser. That and load time probably contributed to its success more than anything else.
- 8y ago
- rawoke083600 8y agoGood summary ! I agree and would add the SPA(craze) also bought us the JS-Frameworks(pick anyone you like with more than 100 stars). I don't like JS-Frameworks... I just LOVE them more than JQUERY Projects ! :/
- mosselman 8y agoThere are cases where a SPA might be a good idea, I think those cases can be counted on one hand. I don’t mean the products, but use cases. I could imagine it would be more complex to build Slack using traditional server-side rendered HTML than building it as an SPA. Nowadays though you see blogs, CRM systems, etc being built as SPAs, which just makes it more complex to work on them.
- MaxBarraclough 8y agoSPA blogs? So the individual posts don't have their own URLs?
- rogual 8y agoOne example is the Ludum Dare site (ldjam.com). They migrated from Wordpress to a custom blog which I would call a SPA. It loads posts from JSON and won't render anything without Javascript.
- fuzzy2 8y agoA good SPA uses `pushState` and URL routing to have individual URLs for views.
- qwerty456127 8y agoFeeling enthusiastic about SPAs in general can't stop me from saying this souds like a horrible, fundamentally pervert idea.
- mosselman 8y agoDon't ask me, I am not the inventor of such advanced technology ;). Apparently there is some benefit to server-side rendering of blog posts.
- notyourday 8y agoI'm pretty sure that's the only place where SPA ( or MPA ) aren't a solution in search of a problem is a site/application that needs distributed compute due to a number of requests it receives in a short amount of time.
- boomlinde 8y agoIn my experience, SPAs often grow to the point where the client-server boundary ends up being right in the middle of data, not between UI and data. The client-side starts to maintain its own complex state and set of data transformations not immediately concerned with UI given anything less than the perfect API.
- pier25 8y agoYou can separate the data with multiple page apps. Either by having different JS for each HTML, or even rendering the HTML on a server which in itself calls the API.