Live data from Hacker News

Show HN: Open-source StackOverflow-like service

paizaqa.herokuapp.com

21–30 of 51 posts

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

#21
post #13

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.

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…

You can use ng-if="results" for your result div and this will only display the div only when the $scope.results have got the values from AJAX call

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

#24
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.

There's not a lot of love for server-side generated content in the start up community right now, but it makes things a lot easier most of the time.

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

#25

I think you mean "Q & A" and QA. QA = "Quality Assurance".

Thank you for pointing out! I just changed the article's "QA" to "Q&A". Now, the title is:

Building a Q&A web service in an hour - MEAN stack development(3) http://engineering.paiza.io/entry/2016/03/10/115345

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

#26
post #17

The article is missing what I think is one of the most important parts, and that's the reasoning behind using a MEAN stack instead of a more classic approach using a standard back-end language like Ruby, Perl or Python, because I honestly fail to see how this is easier than using a framework like Django or RoR.

Thank you for your feedback!

For me, the most important part is the language. I can use JavaScript for client side, server side, and database. There is no context switching related to language like Ruby, JavaScript, SQL. (And, the way of thinking related to that like asynchronous and synchronous.)

It is especially helpful for startup or prototyping where small team build everything.

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

#28
post #13

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.

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…

> Another optimization is to actually render all the DOM elements in advance on the server, and only use client side rendering for updates.

Which is, you know, how the web is supposed to work.

Post reply on HN