News for hackers. Stuff that matters.
Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @12:13PM (#16053287)
But this is where the entire argument of "do first page load server side because it's faster" doesn't make any sense.

Because then aren't you suggesting that after that, all the other pages can be slow?

The worst sites I visit now are React.js like sites, instead of the page load being slow, _everything_ is slow. Ugh. I can't wait until web 3.0 and this silly balogna with the "make a browser with React and run it inside a browser" fades out...

(note, Netflix _removed_ their js rendering from their home page cause it was slow)

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @12:43PM (#16053571)
Server-side rendering means you get a quick first load. Client-side rendering means subsequent navigations are quick, because there's less data to transfer (maybe a little bit of JSON, maybe nothing at all). Going back to the server for 100kb of HTML and reloading the entire page, as opposed to fetching 10kb of JSON and instantly updating it in place, is a very 2002 way of doing things!
Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @12:57PM (#16053691)
>...because there's less data to transfer...

The problem is that just the theory, reality if often times different.

>Going back to the server for 100kb of HTML and reloading the entire page...

This implies that 1) you don't go "back to the server" to load your bit of JSON. and 2) the JSON loaded doesn't require any extra templates, images or more JSON to be loaded. See the problem? It's all assumptions.

Another thing, what about browser caching? I can see how the next page loads _only_ the html, as all the js, css and images were loaded already. I think you are falling for the exaggerated speed benefits from making a website with a JS framework.

To be clear, I am talking about a web page, an HTML document, static content. Maybe that's where the confusion happens in discussions like this. (I said "sites", not "webapps" in my original comment)

A history lesson, we did this with Flash years ago (no more page refreshes!), and everyone ultimately learned to hate it. Just because the flashy crap is spread over the entire "webapp/site" to every button, mouseover and click doesn't mean it's useful or better. (I think many devs think they need to build basic site features with big frameworks just to "stay modern".) Look at Youtube, it's slower now that they implemented their "webapp" experience, but the page doesn't "refresh", so that is somehow better... (is youtube really a webapp? Or a bunch of pages with videos on them?)

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @01:02PM (#16053736)
Ultimately, the proof is in the pudding. Which is faster, when you start navigating around?

* https://news.ycombinator.com/item?id=16052558

* https://hn.svelte.technology/item/16052558

Bear in mind that HN itself has a huge advantage over HN clones, yet — for me at least, sitting here — the Sapper version is significantly snappier.

Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @01:58PM (#16054342)
I tried this on my phone. (Android/Firefox) And I found that it's about .5 second to navigate between pages on hn.svelte.technology And about 1.5-2 seconds with the news.ycombinator.com, on average. Sometimes the straight page load was just as fast (.5 second) and sometimes it sat there while 3-5 seconds.

Yes, the svelte is generally faster on my phone as well. (I am not sure I see the need for a framework for this specific feature though, it's just a js tabs sort of interface. It doesn't seem like a good argument piece for or against this framework)

I did get a possible error, the pages didn't match up after a while. Is the svelte data was being cached in a way that can't refresh properly? I can't debug this as a normal user, does hitting refresh do anything to reload the site content on the svelte site?

Try this, open both sites in different tabs, and navigate around on them a few times, and after awhile, the news.ycombinator will show new content, and the other one will be different. (I am guessing older content, server cache issue? I didn't compare carefully, maybe they started off different and I didn't notice)

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @03:23PM (#16055234)
Possibly a misbehaving service worker serving stale content! I can never configure those right first time.
Re:Show HN: Sapper.js – towards a better web app framework by dgreensp on Tuesday January 02, 2018 @01:34PM (#16054074)
Hi Rich. On my iPhone, I get a 3-second delay between when I “swipe to go back” and when the page is usable/scrollable on the Sapper HN. When I first went to the site, via the link above, the top nav links did not seem to work reliably, and it may have been the same 3-second delay, but I’m only getting now when swiping to go back — maybe because the page is being reloaded from the server? It’s still quite a delay, though.
Re:Show HN: Sapper.js – towards a better web app framework by shoover on Tuesday January 02, 2018 @02:12PM (#16054483)
Interesting. I get behavior like that with twitter.com on the iPad. It hangs with a blank white page for a few seconds. I always wondered what kind of client script shenanigans were going with that. Using the back button embedded in the web page does not cause the same delay.
Re:Show HN: Sapper.js – towards a better web app framework by boubiyeah on Tuesday January 02, 2018 @03:43PM (#16055444)
I get the same behavior on my phone with their new website too. Service worker infancy bugs?
Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @01:45PM (#16054186)
Hi David! That's odd — it sounds like maybe you're interacting with the nav before the client-side app starts, though it's a little hard to tell exactly. Will try and reproduce it here — thanks
Re:Show HN: Sapper.js – towards a better web app framework by dsego on Tuesday January 02, 2018 @02:36PM (#16054759)
Bearing in mind that HN loads content in html tables, which are notoriously slow to render. I am not saying it makes a huge difference, but it could have an impact.
Re:Show HN: Sapper.js – towards a better web app framework by Touche on Tuesday January 02, 2018 @01:14PM (#16053857)
Judging based on the 'load' event they are about the same, or the HN version might be a little bit (<100ms) faster. The Sapper version is faster with the service worker.

So basically the added complexity gives you the same load time when done extremely well (as Sapper is). In terms of bang for your buck, the service worker is biggest improvement. Which you can implement in your server-rendered app.

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @01:29PM (#16054018)
What about when you start clicking the links in the nav, or opening other stories and profile pages? As far as I can see, the Sapper version blows the original out of the water.
Re:Show HN: Sapper.js – towards a better web app framework by lassejansen on Tuesday January 02, 2018 @03:40PM (#16055405)
The Sapper version is cheating a little. It is preloading the pages on mouseOver events of the links.
Re:Show HN: Sapper.js – towards a better web app framework by DougWebb on Tuesday January 02, 2018 @06:32PM (#16056936)
It's not just cheating a little. Just moving the mouse around the page causes lots of data to be downloaded behind the scenes; you could end up loading every story on HN without ever leaving the Top list. That's not friendly to user's data plans, and it's very far from expected browser behavior.
Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @07:25PM (#16057253)
It's configurable. Add rel=prefetch to an <a> element and you'll get that behaviour; don't, and you won't. Since the links are small, mousing over them tends to suggest you intend to click them, but the exact behaviour is subject to refinement over time (this is pre-1.0 software, adjust your expectations accordingly).

Incidentally, 'cheating' is a bit of a silly word to use for a feature designed to improve UX that people spend a lot of time trying to implement (see e.g. http://instantclick.io/)

Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @01:36PM (#16054090)
Yep, the svelte version here appears faster. I'd have to inspect the network traffic to see what it's doing with the data. But I can see a definite speed advantage in this circumstance. To bad it doesn't work everywhere like this.

How fast would it load if every entry had an image? Maybe then it wouldn't seem so different? (edit: this is from a desktop/Firefox)

Re:Show HN: Sapper.js – towards a better web app framework by chaoticsamuel on Tuesday January 02, 2018 @01:21PM (#16053938)
It's not just the initial page load though (although that's essentially similar speed). Navigate through the site, and you shave off seconds at every next click.
Re:Show HN: Sapper.js – towards a better web app framework by boubiyeah on Tuesday January 02, 2018 @03:41PM (#16055427)
I get what you mean and you are right in a way, but raw performance is not the only thing to consider. Yes, server rendered sites are usually an order of magnitude simpler to code than these JS-rendered solutions, and are often faster, but where JS rendering shines is interactivity and perceived performances: you always know what is going on! loading, sending a text, etc (provided the UX is right) Sprinkling some client-side code on top of server rendered templates is so limitating for everything but the simplest websites!

It's 80% more effort for the 20% last performance/richness points.

it's over, people want/expect these kinds of apps, e.g feels as good as native apps but on the web.

But you're also right some people misuse that kind of technology to a ridiculous extent. Downloading a 3MB angular app just to display a crappy site without any rich interactions is really infuriating but that's just bad engineering and people who make choices based on what's popular, disregarding context.

Re:Show HN: Sapper.js – towards a better web app framework by timr on Tuesday January 02, 2018 @01:00PM (#16053725)
Going back to the server for 100kb of HTML and reloading the entire page, as opposed to fetching 10kb of JSON and instantly updating it in place, is a very 2002 way of doing things!

The difference between streaming 100kb and 10kb is small when compared to the connection latency itself. Even on a low-end LTE connection (5mbps), 100kb is 20ms, whereas the latency of a cross-country (US) transit is realistically ~50-100ms. The difference decreases further when you enable server-side compression and start doing fragment rendering, which tends to remove the penalty for HTML payloads.

The argument for react-like technologies is not connection latency, but rather, the hope that you can avoid synchronous connections in the first place by moving your view logic client-side. And truthfully, few client-side apps are written in a way that would minimize payloads anyway. Most people are doing it because they hate working with the DOM and AJAX and server-side frameworks in a mishmash of web technologies, and perceive these client-side frameworks as easier.

Re:Show HN: Sapper.js – towards a better web app framework by GordonS on Tuesday January 02, 2018 @01:16PM (#16053881)
There is also browser caching. So subsequent page loads may not require any new scripts or stylesheets to be loaded, for example, so you're only loading some GZIPped HTML.
Re:Show HN: Sapper.js – towards a better web app framework by noxecanexx on Tuesday January 02, 2018 @03:52PM (#16055499)
You couldn't have said it any better.
Re:Show HN: Sapper.js – towards a better web app framework by dsego on Tuesday January 02, 2018 @02:40PM (#16054810)
If we replaced JSON with something less "chatty", would that propel us to 2022?
Re:Show HN: Sapper.js – towards a better web app framework by al2o3cr on Tuesday January 02, 2018 @12:58PM (#16053697)

    is a very 2002 way of doing things
Despite sharing a common three-letter prefix, "fast" and "fashionable" are frequently uncorrelated qualities.
Re:Show HN: Sapper.js – towards a better web app framework by vitro on Wednesday January 03, 2018 @07:02AM (#16060278)
You know, we may be to specialized to see that normal users that are in majority do not care. Of course you may argue that page load and responsiveness is important in regard to the conversion metrics, be it so, but imagine some average non IT person. Your mother in her seventies. A high school friend. Your auntie. Do you think they care what technology is used? Certainly not. I've seen sites that you would label ugly and from 2000's, but they just work, users can use them easily. And I have seen a rewrite of such old site to modern js framework and it was a disaster, owner was sued by users of the site as they were missing profits because the site was slow and cumbersome.

I think the question is, who do you write the site for, for others or to satisfy your ego and show off?

Re:Show HN: Sapper.js – towards a better web app framework by goatlover on Tuesday January 02, 2018 @01:02PM (#16053742)
How long does it take going back to the server and loading 100kb of HTML these days?
Re:Show HN: Sapper.js – towards a better web app framework by scottmf on Tuesday January 02, 2018 @12:20PM (#16053358)
I feel like a lot of HN is stuck in 2010 and dislikes all of this new web tech because they don’t understand it.

This comment is a prime example.

Re:Show HN: Sapper.js – towards a better web app framework by bdcravens on Tuesday January 02, 2018 @12:58PM (#16053702)
Isn't the opposite true? A lot of "younger" developers are stuck disliking anything older than 2010 because it's not "new". Not because it's slower, or creates a bad experience for the customer, but because it's not new. If it's not faster, and doesn't provide a competitive advantage (I'm talking about real competition, not the pseudo-competitive market of "hire all the developers by dangling shiny new tech in front of them"), then what's the point? (There are certainly use cases where new approaches make sense, but that doesn't mean they become the new defaults)
Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @12:44PM (#16053587)
I've been doing webdev since 1999. I've seen all manner of stupid hacks, dumb "best practices" that have come and gone, ridiculous frameworks that became _useless_ because browsers just integrated the features. Flash home screens, table layouts, IE only coding up the wazoo.

So, when someone says they have a JS framework that replaces the core of the browser's display, the DOM, my response to that is sigh, this again.

Shadow DOM is around the corner, what then?

The reason this stuff gets popular is not because it's a good idea, it's because big companies have tons of cash and man power and can't wait for browsers to get updated. Well, a lot of us code monkey vets are done chasing "shiny crappolla", and we can wait a bit until the dust settles.

How many JS frameworks are there now? I saw all of them come, where is ember, knockout, etc...? Vue just popped up, and I can't even recall the other 5 I tried out at the same time. Which will succeed? When you have to put real money into a project and the framework matters to your clients budget, and your profitability, you can't make a risky bet and expect your client to pay for it later if you are wrong.

I am all for the long term now. Show me how a 1 year old framework is a good investment, I am willing to learn something. (keep in mind React is only about 4.5 years old, Angular is only 15 months old (AngularJS is 7 just years old and already being phased out!))

Re:Show HN: Sapper.js – towards a better web app framework by dmitriid on Tuesday January 02, 2018 @01:29PM (#16054022)
> Shadow DOM is around the corner, what then?

Nothing changes. DOM remains a slow monstrosity impossible to code for. For goodness sakes, reading certain properties in a DOM tree causes a full page reflow [1]

To beat virtual DOM frameworks you have to write extremely specific vanilla JS+DOM code that basically ends up doing the same thing: re-using DOM nodes, event delegation etc. See [2]

Shadow DOM was never meant to be an answer to that. Honestly, I have no idea what it was supposed to be an answer to.

[1] https://gist.github.com/paulirish/5d52fb081b3570c81e3a

[2] https://medium.com/@localvoid/how-to-win-in-web-framework-be...

Re:Show HN: Sapper.js – towards a better web app framework by scottmf on Tuesday January 02, 2018 @01:25PM (#16053984)
You should learn React and build a simple project with it to understand its real value, which is component-based architecture.

React will likely be around longer than/as long as any framework, but whatever replaces it will use a lot of the same concepts.

Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @02:00PM (#16054366)
How does that help 1000 visitors to a blog read the blog easier? Not every site is an app, and the apps we do build we already have invested in VanillaJS framework. Do you think React will outlast the VanillaJS framework? (http://vanilla-js.com/)

(edit: this is partly a joke comment, fyi)

Re:Show HN: Sapper.js – towards a better web app framework by scottmf on Tuesday January 02, 2018 @06:06PM (#16056732)
I understand the joke but JS isn't a framework, it's a language.

"No framework" generally means "poorly-written custom framework". Do you have any code samples to share from your vanilla JS apps?

Re:Show HN: Sapper.js – towards a better web app framework by unclebucknasty on Tuesday January 02, 2018 @08:33PM (#16057570)
>"No framework" generally means "poorly-written custom framework"

This thinking is part of the problem: the idea that not-using a framework almost necessarily means you're writing garbage.

>Do you have any code samples to share from your vanilla JS apps?

I can show you bad code from popular frameworks too--in particular, hacks to get around the "magic" that frameworks offer.

And, invariably, we move on from the framework because now there's "something better". And, we say "that's just progress". No one wants to admit that the last framework was just bad.

It's a trend that's been going on for decades in programming, and not just with JS frameworks. Stick around long enough and you'll see exactly how predictable it is.

Re:Show HN: Sapper.js – towards a better web app framework by Silhouette on Tuesday January 02, 2018 @10:52PM (#16058208)
"No framework" generally means "poorly-written custom framework".

That is not generally true at all. It might be true if you've got a very inexperienced and unskilled team of developers who don't know how to build a non-trivial application without the structure that a framework brings. However, there must be millions of developers in the world who do have sufficient skill and experience to do that, and these days plenty of those people work in web development. I imagine they can still remember how to do things like basic software design and using libraries, which have been working since long before any of these modern frameworks existed.

Re:Show HN: Sapper.js – towards a better web app framework by megaman22 on Tuesday January 02, 2018 @10:57PM (#16058233)
I'm afraid you're being terribly optimistic. I'm not totally sure how many millions of people, in absolute numbers, are even competent developers. Out of those, some are web developers, and some subset of those are doing things without frameworks. That leaves a lot of yahoos.
Re:Show HN: Sapper.js – towards a better web app framework by Silhouette on Tuesday January 02, 2018 @11:14PM (#16058321)
Well, yes, there are plenty of incompetent developers too, as there always have been since development broke out of its earliest new-and-specialised-job days.

Even so, the idea that not using a framework automatically means you'll produce some poor imitation instead is laughable. The history of software development is replete with examples of people succeeding without those frameworks. We've built countless UIs that way that were much bigger and more complicated than anyone has ever built with Angular or whatever this week's flavour of JS framework is.

Maybe there are only thousands of developers working in the web industry who could do it rather than millions. I'm not sure that undermines my real point, since you'd only need a handful of decent devs to make and maintain almost any web front-end I've ever seen.

I suspect the true problem is that for various reasons we lose a lot of that experience and skill from the industry far earlier than we should, and then yet another young generation of developers who haven't studied history are doomed to repeat it, badly.

Re:Show HN: Sapper.js – towards a better web app framework by antonkm on Tuesday January 02, 2018 @02:05PM (#16054413)
I agree - have yet to see the benefit of using a framework that aren't at least 2 years. Never do client work using newly released frameworks (if that isn't specified as a must by the client). The result will come back to bite you sooner or later.

I like the idea of universal code, maybe Sapper will be the solution that comes out winning. I'll let the community be the judges and hop on the train a year later if that's the case.

Re:Show HN: Sapper.js – towards a better web app framework by rimliu on Tuesday January 02, 2018 @12:31PM (#16053454)
Or it may well be that this "all new web tech" was created by people who do not understand neither web nor HTML. Sudenly everything needs to be SPA, every site needs to load hundreds KBs of scripts just to "be current". What's the value of being modern if it makes user experience objectively worse? Sure client side render may prevent you from reloading the entire page. And who cares that this rerender actually takes longer than reload? Did I really need to waste 200KB of my mobile data to load scripts all I wanted to see were 5 pages each weigthing 5KB? What did I gain from trading full reload for the a-la-SPA kind of deal?
Re:Show HN: Sapper.js – towards a better web app framework by scottmf on Tuesday January 02, 2018 @12:58PM (#16053701)
>Sudenly everything needs to be SPA, every site needs to load hundreds KBs of scripts just to "be current".

Not everything has to be an SPA, but React is 30kb gzipped and Preact et al are in the single digits.

>What's the value of being modern if it makes user experience objectively worse?

The point is they don’t inherently make user experience objectively worse.

>Sure client side render may prevent you from reloading the entire page. And who cares that this rerender actually takes longer than reload?

This isn’t how it works. Rerenders can be incredibly fast.

>Did I really need to waste 200KB of my mobile data to load scripts all I wanted to see were 5 pages each weigthing 5KB? What did I gain from trading full reload for the a-la-SPA kind of deal?

What did you lose? You lost nothing because SSR provided the initial page load as quickly as any other HTML.

It sounds like you’ve generalized the entirety of modern SPA development from your experience of a few terribly developed sites with poor user experience.

You probably only notice the poorly-built SPAs because the UX gets in the way. i.e., confirmation bias.

Re:Show HN: Sapper.js – towards a better web app framework by Nemi on Tuesday January 02, 2018 @02:29PM (#16054665)
> The point is they don’t inherently make user experience objectively worse.

Ah, but they do. Browsers are very mature and predictable in their management of html pages and SPA's break that behavior in subtle, uncanny-valley ways.

For instance, click into the Sapper HN page https://hn.svelte.technology/item/16052558, scroll down to a post with a random link and click into it. Click on another page in that link. Now click the back button in your browser to get back to the sapper page. You find that you will be at the top of the page as it re-renders. You lose the place you were scrolled to.

This does not happen with standard cached html pages in the browser.

One of the worst offenders is google's home page. When clicking into the links looking for something, clicking back will take you to top, again and again, losing your place. This is a big step back in usability that people are not even aware is happening. It is a small thing individually, but in aggregate it adds up to a large thing.

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @06:12PM (#16056790)
> You find that you will be at the top of the page as it re-renders. You lose the place you were scrolled to.

What browser is that happening in? In Chrome it works correctly — Sapper uses `history.scrollRestoration = 'manual'` for this exact reason, but maybe it fails elsewhere? It's a bug, and we should fix it. (This is pre-1.0 software, your forbearance is appreciated.)

Re:Show HN: Sapper.js – towards a better web app framework by Nemi on Sunday January 07, 2018 @04:55PM (#16092962)
Way late on this reply, but it was in chrome. I found that an immediate back button would often work, but if the page you were navigating to was overly large or you clicked into another link or two and then went all the way back it would lose place.
Re:Show HN: Sapper.js – towards a better web app framework by RobertRoberts on Tuesday January 02, 2018 @01:04PM (#16053758)
>You probably only notice the poorly-built SPAs because the UX gets in the way. i.e., confirmation bias.

Maybe you are too young to remember Youtube before it was turned into a webapp. It was _considerably_ faster. Todays version requires all sorts of odd refreshing bits and pieces. The old one just loaded right away and showed the video.

If I was paranoid, I'd think that Google did it on purpose to push Youtube Red ads at us.

Re:Show HN: Sapper.js – towards a better web app framework by boubiyeah on Tuesday January 02, 2018 @03:51PM (#16055495)
Agreed youtube as a webapp brings no value whatsoever. Someone at google wanted to rewrite it with newer techs to update its CV? :)

PS: It downloads that crappy polymer that weights more than 1.5MB... ffs

Re:Show HN: Sapper.js – towards a better web app framework by nine_k on Tuesday January 02, 2018 @01:05PM (#16053768)
"Right tool for the job", as the old saying goes.

There are sites that indeed are applications, with lots of updates occurring dynamically on a page: a chat, a dashboard, any type of control interface. They do benefit from the libraries that make highly dynamic things efficient.

There are sites that are best served as static pages. This includes the server component, too, BTW. A static site generator producing plain HTML + CSS is often a good replacement to something like Wordpress.

Some people use latest trending tech for no good reason, just to show off. But the problem here lies not in the tech used.

Re:Show HN: Sapper.js – towards a better web app framework by goatlover on Tuesday January 02, 2018 @02:38PM (#16054778)
Agreed, don't make SPAs out of sites that work well as traditional websites. Browsers and the internet are fast at serving up html & css these days. Even PHP rendering is pretty damn fast. And it best fits how browsers work for traditional sites.
Re:Show HN: Sapper.js – towards a better web app framework by GordonS on Tuesday January 02, 2018 @01:19PM (#16053919)
Agree with you on this. Many (most?) sites work just fine with the time-tested method of server-side rendering. When taking compression and browser caching into consideration, you are typically not sending much data across the wire after the first page load.
Re:Show HN: Sapper.js – towards a better web app framework by megaman22 on Tuesday January 02, 2018 @12:29PM (#16053434)
Possibly a lot of HN has been around the block for a couple of decades at this point, and has seen this web dev stuff come full circle several times, and before that, the same ideas in desktop software.

Computer science programs really need to introduce something like a "History of Computing Ideas" course as a mandatory element. Maybe we can get away from rehashing the same cycle of trends every five years and move onto some different wheels.

Re:Show HN: Sapper.js – towards a better web app framework by OJFord on Tuesday January 02, 2018 @01:26PM (#16053997)
> Computer science programs really need to introduce something like a "History of Computing Ideas" course as a mandatory element.

Isn't that the whole programme?

In my final year I had a couple of more advanced courses in which we could just about get our heads around results published by the lecturer four years ago when we started the programme. Everything else is just working up to that, from Boole's ideas; through Turing's and von Neumann's.

Re:Show HN: Sapper.js – towards a better web app framework by megaman22 on Tuesday January 02, 2018 @02:47PM (#16054896)
You're looking at this from a more academic perspective than my comment implied. Really, it's the whole clusterf&*^ of software engineering being conflated with computer science, when they are really not the same thing in any way.

There is a lot of practical implementation history that people are often woefully ignorant of, and it leads them to tread the same paths over and over and over.

    - Here are the core GNU command line utilities; make, sed, grep, etc.  They are battle-tested, use them, don't rewrite them a dozen times in JavaScript
    - Here is the progression of version control tools that people have used over time, and some reasons why we've moved on from SourceSafe and rcs to Git.
    - Here's the history of how people have done databases, flat-file, vs sql vs nosql
    - etc, etc, etc.
Re:Show HN: Sapper.js – towards a better web app framework by OJFord on Wednesday January 03, 2018 @04:20AM (#16059614)
Ah, I see what you mean. Apologies, I didn't mean to digress from the spirit of your comment, I suppose it just varies with experience: of the things mentioned, including web frameworks, I _did_ hear of the history of how people have done databases, but other than that GNU tools are just things I used to get the work done, and I learned git through open source. (Though I think it would make a great 'stuff you've learned put into practice' talk: diff algorithms, data structures, etc.)
Re:Show HN: Sapper.js – towards a better web app framework by cookiecaper on Tuesday January 02, 2018 @10:05PM (#16057959)
Yes, though I think we need to diffuse the sentiment via organic cultural osmosis rather than relying on ivory towers to indoctrinate for us (not effective).

Alan Kay frequently laments the direction of the computer industry, calling computing "not-quite-a-field" and "pop culture". From an interview in 2012:

Quote:

----

> Kay: [...] [I] happen to believe in history. The lack of interest, the disdain for history is what makes computing not-quite-a-field.

> Binstock [interviewer]: You once referred to computing as pop culture.

> Kay: It is. Complete pop culture. I'm not against pop culture. Developed music, for instance, needs a pop culture. [...] The big problem with our culture is that it's being dominated [more by] pop-culture content than it is for high-culture content. I consider jazz to be a developed part of high culture. Anything that's been worked on and developed and you [can] [sic] go to the next couple levels.

[...]

> [Kay continues]: [P]op culture holds a disdain for history. Pop culture is all about identity and feeling like you're participating. It has nothing to do with cooperation, the past or the future — it's living in the present. I think the same is true of most people who write code for money. They have no idea where [their culture came from]. [sic - brackets in original]

---

It's a great summary of the programming fads that have come to characterize tech culture and how disappointing it is for anyone who is trying to navigate this field with some intent and presence of mind higher than fitting in with the crowd or cashing in on a perceived gold rush.

It's also just a great memorialization of the concept of pop culture in general; pop culture is about a feeling of belonging and community, and engaging positive biological responses associated with social approval and community. It's something that people do to give themselves that rush of praise, and then retroactively try to justify. After a couple of years, no one can understand what anyone was thinking because they were just rationalizing riding the tide.

And, IMO, it aptly describes not only the React phenomenon, but also Kubernetes (aka "shared hosting"), Docker (aka "static linking"), etc. Also IMO, big dollar players stoke this negative culture because it's profitable for them.

It's not necessarily that these technologies won't leave their mark, it's just that they're not the revelations people pretend they are.

Regardless, suspicion is always warranted when people insist that the contemporary is novel, in computing or practically anything else.

[0] http://www.drdobbs.com/architecture-and-design/interview-wit... \ archive: https://archive.fo/DkQOc

Re:Show HN: Sapper.js – towards a better web app framework by goatlover on Tuesday January 02, 2018 @12:41PM (#16053558)
Are they going to also teach that at bootcamps?
Re:Show HN: Sapper.js – towards a better web app framework by Danihan on Tuesday January 02, 2018 @01:23PM (#16053968)
I'm still waiting for my web framework in pure ASM idea to manifest.
Re:Show HN: Sapper.js – towards a better web app framework by weego on Tuesday January 02, 2018 @02:54PM (#16054961)
I am willing to concede your pedigree as a developer as necessary but I've been writing all manner of languages and environments since 99 and I'm sorry to say there's no revolution here, no battlefield to die on. It's a poor model that has been tried and abandoned any number of times in my career. The ubiquity of platforms that suit these ideas and developers who think Web development began with node and spas isn't confirmation that every idea is the future.

Moreover, the notion that because FB or whoever went "hmm nothing solves our domain problem, we have the resources to solve it ourselves" that suddenly they solved every domain problem is equally naive. It's likely that people quoting react stacks are solving issues that never existed for them with libraries they don't need.

Re:Show HN: Sapper.js – towards a better web app framework by zsck on Tuesday January 02, 2018 @07:25PM (#16057254)
This is an incredibly common stance, and it's also very obviously problematic. No one is saying that your experience in software is invalid or that you're wrong about "these modern frameworks" having been wrong in their time. However, if you aren't yourself working as a frontend developer in a modern startup-ey development environment, you aren't in a position to make so many assumptions about the problems such developers do or do not have. Surely, as professionals and adults, we can all appreciate that we are each dealing with problems in the world for which people believe we deserve to be paid. We all take what we do seriously, and are trying to build the best tools we can to do the best work possible. Even if something comes in as a fad, what good is it to bawk at a perfectly valuable learning experience?
Re:Show HN: Sapper.js – towards a better web app framework by aaron-lebo on Tuesday January 02, 2018 @03:29PM (#16055303)
Your comment expresses a really common sentiment, but it also vague and offers no supporting evidence.

When was a model like React + Redux (or Elm) used previously, and why did it fail? The combination of factors (browser advances and iteration on existing models) is unlike anything before. This tech stack did not exist in 1999, it did not exist in 2005, and it did not exist in 2012. It is driven by real problems.

Re:Show HN: Sapper.js – towards a better web app framework by Silhouette on Tuesday January 02, 2018 @10:46PM (#16058179)
When was a model like React + Redux (or Elm) used previously, and why did it fail?

What do you mean "a model like React + Redux"?

Programmers have been separating underlying state, rendering and interactions since at least the earliest days of MVC in the '70s.

We've been diffing model states to identify changes to act on for as long as we've had explicit isolated state management, which again is several decades.

We've been identifying specific parts of a display to rerender fully because doing the whole thing was too expensive since the earliest graphical video games.

We've been using markup languages to describe UI layouts declaratively for a long time too.

Adopting similar techniques in browsers was likely as soon as serious front-end coding to build larger client-side web apps became viable, and they have much the same pros and cons now as they did in other UI development before. React and its surrounding ecosystem may have been the first JS libraries to popularise the ideas for a new generation, and IMHO those early versions of React were well done and useful, but let's not pretend the underlying concepts are radical and new in themselves.

Re:Show HN: Sapper.js – towards a better web app framework by aaron-lebo on Tuesday January 02, 2018 @11:14PM (#16058322)
Yes, but that's never been attached to a frontend that reaches billions of people.

But like you said, those are good ideas, they didn't fail.

Re:Show HN: Sapper.js – towards a better web app framework by Silhouette on Tuesday January 02, 2018 @11:17PM (#16058338)
Why does the number of people using a UI make any difference to whether the UI does its job well or whether the underlying technologies are appropriate, though? Would any of the arguments for different ways of building UIs change materially if Facebook had a million active users instead of a billion?
Re:Show HN: Sapper.js – towards a better web app framework by aaron-lebo on Tuesday January 02, 2018 @11:27PM (#16058388)
I'm just saying that even with that model before, we never had tech with the reach or capability as we do now, which makes that interesting.

If it was a good model for building UIs in 1970 and it proved itself then, we should be taking advantage of that on the frontend as well, instead of ignoring it.

Re:Show HN: Sapper.js – towards a better web app framework by Silhouette on Tuesday January 02, 2018 @11:38PM (#16058449)
In that case, perhaps our views here aren't so different. I'd agree that React was a relatively rare qualitative step forward in the tools available in web development, precisely because it did bring some ideas and programming styles into the front-end JS community for probably the first time. I just disagree with the idea that this was unlike anything that had gone before, because essentially the same fundamental ideas and programming styles have been used elsewhere in the programming community for a very long time.
Re:Show HN: Sapper.js – towards a better web app framework by scottmf on Tuesday January 02, 2018 @06:29PM (#16056915)
My problem is that every JS-framework story on HN is full of comments either a) showing a lack of understanding of the tech like the parent, or b) bringing up "fundamental issues" with SPAs which are either nonexistent or long-solved.

That isn't to say some concerns might not have merit, but SEO/SSR/shared routing/state/templates are problems with production-ready OOTB solutions.

If someone isn't familiar with the basic SoTA then they should refrain from commenting so harshly on it.

Re:Show HN: Sapper.js – towards a better web app framework by mattgreenrocks on Tuesday January 02, 2018 @06:36PM (#16056963)
The real problem React solves is enabling many people to work on parts of the same page without stepping on each other. The declarative nature is brilliant, but if the messy MVC diagram slides in the reveal presentation are real, then I feel confident in labeling React this way.