Live data from Hacker News

Show HN: Open-source StackOverflow-like service

paizaqa.herokuapp.com

31–40 of 51 posts

Re: Show HN: Open-source StackOverflow-like service

#32
post #19

Kudos for effort, but for the life of me I cannot understand why the hell is "load empty shell of a page and then asynchronously fetch bits and pieces of content, ruining the UI along the way" is so prevalent these days.

Isomorphic/universal React just about solves this. Taken all the way, you get the full UI and clickable navigation links before any javascript loads.

Or progressive enhancement.

Re: Show HN: Open-source StackOverflow-like service

#33
post #13

Earlier quoted context omitted.

That's how a basic angular.js app with client side templating works if it has to fetch the the data from the server using AJAX calls. A common optimization would be to preload the served javascript with the initial AJAX results. This still means rendering the content on the client side, but the content isn't fetched asynchronously. Another optimization is to actually render all the DOM elements in advance on the serv…

This, I assume, is all done because 99% of web sites are trivially done with server-side HTML generation and that is not hipstery enough.

It's not a matter of being "hipstery", the drawback is that each time you refresh the view you have to resend all the markup. You're increasing the total amount of data that's going back and forth between the browser and the server. By sending the markup once and then dynamically populating it you can have much faster transitions between objects that use the same view.

What you really want to do is provide progressive enhancement where the first thing a user sees is usable and then more features become available without disrupting whatever the user has started doing (e.g. don't reflow the page while they're trying to read or browse). One way to achieve this is rendering the initial view on the server side and then doing updates via AJAX request but this has meant writing your rendering code twice, once on the server side and once on the client side. This is a reason that node.js and isomorphic JavaScript in general have become so popular.

Re: Show HN: Open-source StackOverflow-like service

#34
post #19

Kudos for effort, but for the life of me I cannot understand why the hell is "load empty shell of a page and then asynchronously fetch bits and pieces of content, ruining the UI along the way" is so prevalent these days.

Isomorphic/universal React just about solves this. Taken all the way, you get the full UI and clickable navigation links before any javascript loads.

It's also a totally reasonable pattern to template the constant UI parts of the page in the backend (and not have to necessarily fetch user sessions in the frontend), and then just render the fun bits with React. The user isn't going to get a literal blank page this way. I think this is a pretty happy medium actually.

Re: Show HN: Open-source StackOverflow-like service

#35
post #9

Kudos for effort, but for the life of me I cannot understand why the hell is "load empty shell of a page and then asynchronously fetch bits and pieces of content, ruining the UI along the way" is so prevalent these days.

I know how you feel. I live in Mexico now, and the internet connections in these parts are terrible. It's given me a whole new perspective after coming from cheap 100 mbit back home. Sometimes I get confused with pages like this, only to later realize that the main content wasn't loaded yet.

Can be fixed pretty easily with a "loading..." message, but I guess no ones going to fix something they don't know is broken (since the developer will be using fast internet)

Re: Show HN: Open-source StackOverflow-like service

#36
Technical improvements were only one part of what made SO great. If you want to compete with them, then you have to figure out how to prevent posts like this one from lasting more than 5 seconds on the site:

http://paizaqa.herokuapp.com/questions/show/56e1a5872c8dfa03...

Re: Show HN: Open-source StackOverflow-like service

#38
post #4

Clicking "ask question" kills the browser back button... Beware!

Thank you for your pointing out ! I just fixed it by adding "$location.replace()". Also, there was a issue on Social Login, I also fixed the issue.

Awesome! Cool concept btw

Re: Show HN: Open-source StackOverflow-like service

#39
post #33

Earlier quoted context omitted.

This, I assume, is all done because 99% of web sites are trivially done with server-side HTML generation and that is not hipstery enough.

It's not a matter of being "hipstery", the drawback is that each time you refresh the view you have to resend all the markup. You're increasing the total amount of data that's going back and forth between the browser and the server. By sending the markup once and then dynamically populating it you can have much faster transitions between objects that use the same view. What you really want to do is provide progressiv…

Oh give me a break.

> ...the drawback is that each time you refresh the view you have to resend all the markup. You're increasing the total amount of data that's going back and forth between the browser and the server.

For like 99.9% of applications this is a non-issue. For crying out loud, StackOverflow itself has been doing server-side rendering since day one and is still heaps and bounds more usable than WhateverTheHellIsTrendingOnHn.js-based single page isomorphic rich web applications.

It might be my age showing, but, while completely agreeing with you on "progressive enhancement all the way", I find that too freakin' much resources nowadays are spent doing and re-doing and re-inventing something that was working fine in the first place.

Re: Show HN: Open-source StackOverflow-like service

#40
post #14

StackOverflow has already often served me but sometimes I think what we really need would be some place where some people fluent in languages/frameworks could showcase best practices/mini howtos giving a little bit more context.

More than half the questions I ask on there are not "How do I do something", but "How do I do something WELL"
Post reply on HN