top | item 11308043

(no title)

gordonzhu | 10 years ago

What's most fascinating to me about this isn't the simplicity, it's that this code has lived for so long with almost no changes.

It's a great counter-example to all the recent articles about JavaScript fatigue. It's good for us to see real examples of sites that aren't caught up in the framework of the week hype.

At the end of the day we're trying to make stuff that works. ES5 vs ES6, React vs Angular vs. Ember vs. Aurelia, Angular 1 vs Angular 2, even server rendered templates vs. single page apps - it all matters a lot less than we think.

discuss

order

aaronbrethorst|10 years ago

For the majority of cases that I've seen, these arguments are simply excuses to avoid doing real work. It's way more fun to decide whether your amazingly awesome Unicorn startup is going to use React or Angular, or Express vs. Rails, or whatever than it is to actually go through the hard work of building a customer base and making money.

percept|10 years ago

The problem (from my perspective) is that the job market follows. It's good at that--always following.

gordonzhu|10 years ago

YES! totally agree

For a subset of us, framework authors, open source contributors, etc. It's very useful to keep up to date on the latest trends.

For example, the Angular team has borrowed techniques from React. It helps for them to keep up with things.

For people like me though, let's be honest. I don't need to do the latest thing.

catshirt|10 years ago

maintaining software is a real thing.

for the majority of cases i've seen, these arguments are to save developers time and the company money.

my gut & feelies tell me there is truth to "it doesn't really matter what technologies you use" but my brain and experience tell me that is objectively false.

xupybd|10 years ago

Totally agree. One problem I find arises from this is that there are no boring workhorses. Time and time again I need boring crud screens, for the admin side of applications, but there is no easy default to choose. ExtJS tends to do the trick, but it's not cheap.

zappo2938|10 years ago

This week's JavaScript flavor special is vanilla.

daxfohl|10 years ago

Would love to see "Enterprise HN" with Node and React and Redux (with server-side rendering), and how it compares (whether horribly or awesomely).

nathancahill|10 years ago

Lol. For hiding a voting arrow after it's clicked. Yes, you're right. You don't need any of that stuff. But if you were to write an entire app in the style of those two functions, things would fall apart. That's not even a hypothetical, it's been proven over and over again that it doesn't work.

How is everyone agreeing with you? Is there that much JS fatigue that we're looking at the equivalent of a horse-drawn carriage, and saying wow, I wish things were as simple as they were back then?

BillinghamJ|10 years ago

I think the point is that there's actually little wrong with using standard HTML forms and hyperlinks most of the time.

There is an increasing trend to move the whole website to the client side to be handled entirely by the JavaScript as a single actual page.

Personally I find most websites work better with a simple round trip to the server to fetch more HTML.

So actually building an entire system in this style isn't out of the realms of possibility at all - you just only write JavaScript for the cases where there is a real legitimate benefit to doing so.

rimantas|10 years ago

JS fatiques starts where web pages (not web apps) start to depend on thousands of kilobytes of javascript. Now the default thinking is along the lines "I am starting a new project, I will use angular", instead of some analysis what kind of project this is, how much JS is needed and what is appropriate.

kylemathews|10 years ago

>horse-drawn carriage

That code is more the equivalent of a digging stick. React is used to build horse-drawn carriages. I'm eagerly awaiting the JS framework that'll let me build cars.

gordonzhu|10 years ago

Nowhere did I tell people to write an entire app in the style of hide and vote like you're implying.

In my comparisons I mention a lot of choices people might make, like Angular vs. Ember vs. React that are ultimately meaningless to the success of your product. I think this is what's resonating with a lot of people.

marssaxman|10 years ago

How would things fall apart, exactly? On my home machine I browse with NoScript turned on by default, and it's rare that I find a site which is broken badly enough to notice which I still care about strongly enough that I bother clicking "allow". I don't think that most of what people do with JavaScript in the browser needs to be done at all if you filter the motivations of investors and advertisers out of the picture.

snowwrestler|10 years ago

> Is there that much JS fatigue that we're looking at the equivalent of a horse-drawn carriage, and saying wow, I wish things were as simple as they were back then?

Make Javascript Great Again! (TM)

ignoramous|10 years ago

The img.src trick is used by google-analytics to log metrics cross-domain as well. Pretty neat trick.

Another thing to note is the "RESTful" nature of the links embed in the page. I guess its some form of HMAC with SHA1 + Nonce that authenticates requests for the server. It differs for every href. Elegant.

  auth=311110b7ef0f268cafa8616afcbfcec8d977111e

welder|10 years ago

+1 times infinity