You know what loads really fast and reliably on a cheap mobile phone with a flaky cellular connection?
HTML with a little bit of CSS and a little bit of JavaScript.
I think it's crazy that web development trends continue to move in the direction of MB+ JavaScript single page apps, while actual device trends are moving towards inexpensive Android mobile phones on cellular connections. The web is getting fatter while the devices are getting less powerful!
How much code do you really need to serve to power an interface that fits on a mobile phone screen?
> trends are moving towards inexpensive Android mobile phones
That seems like a bit a of generalization. Even the "inexpensive" phones are getting more powerful. Yeah, a lot of people are buying cheaper androids, but almost all of them are still at least "smart" phones. It's become par for the course.
I don't disagree that simplifying can be the solution some of the time, but I don't think it is simple as that in all cases.
To play a devil's advocate, a SPA definitely takes its time to load, but the subsequent requests may be much more fluid, since they only update the existing page, carry only the compressed and necessary information and may be retried, batched, etc.
Maybe it's more like the bias of exaggerated self-importance: people believe that their page will be used much more than once (and optimize for that), whereas most pages get their single view and are closed.
Yeah that's definitely part of my frustration here: mobile users tend to load up a site, achieve their goal and move on again in a session that's probably less than 60 seconds total. And since phones have limited caches, the chances are any caches resources will have been flushed out by other activity before they revisit your site or application.
Maybe for a simple Web site, "HTML with a little bit of CSS and a little bit of JavaScript" is enough. It is certainly not the case for almost any Web application.
The parent's point can also be interpreted as using simple stuff on client side with the complex stuff on server side. It's what we did for a long time with pretty complex applications. An example of why was a site that uses plenty of JS for almost everything to present entertainment articles. A site like that on dialup pre-Web 2.0 would've loaded all the content in seconds then gradually load the images. On 4G Galaxy 4, the damned thing took 10 seconds to load with parts of the page jumping everywhere. Clicking "next page" literally took 10 seconds each time just so I'd click the right thing.
Whereas, some sites don't have that problem at all since they mostly use HTML and CSS that's cached and fast-loading. Only the JS parts are slow and I usually don't need them. When I do, they've already loaded. I could see alternatives used for something like Facebook but the old stuff would work for over 90% of sites I see. It would also be more efficient outside network transfer. But they usually use CDN's with whole site cached so who cares.
You might care if you can deliver the same functionality with a fraction of the complexity and better performance.
I care because if you're interacting with other developers while building that site, you might be leading credulous hype-followers down a path which means I end up having to maintain yet another pile of useless, overcomplicated JS.
The people paying you to make things probably are going to end up carrying about maintenance down the road; if you don't care, you are providing the kind of bad service that demonstrates the difference between much of what goes on in software development and actual professionalism -- a doctor it later that didn't concern themselves with, and proactively warn, a client/patient with that kind of down the road consequence would be guilty of professional malpractice.
You seem to think i'm advocating for sloppy and un-maintainable programming...
I'm advocating that the web is going to be the best platform for some applications. Users aren't going to want to go through complicated installs to install a program that they will only want to use a few times. They don't want to spend minutes or sometimes hours installing a program that they will only use every now and then. They want to be able to use the software from their iOS/android mobile device, computer, laptop, tablet, friend's computer, osx/window/linux/whogivesafuckOS. They want it to "install" in less than a second, and they want to be able to use it and leave. They want it to be secure, sandboxed, and know that it won't interfere with other programs they are running on their device. They want to know that it is in it's own sandbox, and they want it to be as easy as typing in an address or clicking a single link from a search engine.
If you know of any other platform (even a single other platform) where that amount of speed that the average person can install, use, and "uninstall" a program with the security, ease of use, and sandboxing of the web, then by all means please let me know.
But until then don't act like anyone writing software targeting the web as a platform is doing some kind of disservice to society. It's not. The people doing a disservice to society are people like you who "look down upon" those who develop for or use the web to get shit done.
Calling it "bad service" because you don't like how it's used is juvenile, and downright wrong.
"They want it to "install" in less than a second, and they want to be able to use it and leave. They want it to be secure, sandboxed, and know that it won't interfere with other programs they are running on their device. They want to know that it is in it's own sandbox, and they want it to be as easy as typing in an address or clicking a single link from a search engine."
I don't know why anyone would trust a web browser or app to do all that. They fail to every day due to enormous complexity. Sounds like you need a https link to a standalone exe that's written in portable, safe-by-default code utilizing only necessary OS API's. Like us non-Web types build things past and present. Interestingly, one of the old arguments was that even our micro-apps would be too large vs web pages. The web app, framework, and JS craze mean those are now bigger than many stand-alones. That's funny.
"They want to be able to use the software from their iOS/android mobile device, computer, laptop, tablet, friend's computer, osx/window/linux/whogivesafuckOS"
Only part that's tricky. Gotta compile the portable code into standalone for all the common OS's. Many tools to make that easy. Then, perhaps a page or JS that determines their platform then redirects to the right link. Problem solved.
Displaying some text and graphics on a browser with user's privileges is better than printing some text and graphics to a window in a process with little or no privileges? It wasn't better at any point in web development. There were simpler things at each point. Just not widespread adoption. ;)
Loads fast with plenty usability and effectiveness. Works very well with NoScript, too. So, it's faster, more secure, and gets the job done? Screw it, let's do a single-page, Coffeescript App instead! ;)
Note: That loaded instantly on my smartphone unlike most web apps. I was excited until I clicked the menus. Instead of just opening, it opened and loaded up the page for that menu. Been a long time since I did CSS so I don't know if that's inherent or just a flaw in his implementation. It was done before smartphones. I'm assuming the latter.
"4 different apps" doesn't have to equate "4 separate codebases" obviously. Behold the wizardry of #ifdefs! Just the old idea of graceful degradation. What is done at the GUI level can be done at the feature/functionality level. But you're still right in that it's a lot of extra effort and must be budgeted for.
HTML with a little bit of CSS and a little bit of JavaScript.
I think it's crazy that web development trends continue to move in the direction of MB+ JavaScript single page apps, while actual device trends are moving towards inexpensive Android mobile phones on cellular connections. The web is getting fatter while the devices are getting less powerful!
How much code do you really need to serve to power an interface that fits on a mobile phone screen?