Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Hacker News implemented using the new API (firebaseapp.com)
90 points by dstaley on Oct 7, 2014 | hide | past | favorite | 23 comments



I just sprinted and re-created this in AngularJS as well.

Took me 2 hours from start to finish.

Demo: https://hn-ng.firebaseapp.com/

Source: https://github.com/hswolff/hn-ng


Thanks to your app, TIL about Firebase. Really neat service. Currently the way id do it in ASP.NET using SignalR, but this could finally take two large chunks out of my stack. Especially the auth chunk.

I would miss Entity Framework and Web API 2 though.


There's lots of errors showing up in the console

http://i.imgur.com/rQGweR8.png


Glad you used Ember.JS, I love that framework, it's what actually got me to change my mind about JavaScript altogether. Love how in a few minutes you can pull together a rather responsive website.


You should try Q!

http://platform.qbix.com/


Followed the link, tried to create a account, under "for business"...

And it asked for my cellphone number?!

I have left my cellphone number a year ago, I could not handle the spam calls. Yes I do have a sim card in my mobile but I actively don't want to remember it and only use it for the data, I don't share the number, except for my so and mother.

But back to the point, there was no other option to login, why only cell phone, did I miss something?


I guess that's what the platform.qbix.com app is set up with. Q apps can be configured out of the box to let people sign up using email, mobile, or facebook. You can also code your own adapter (such as using some other OAuth) and if you do, contribute it to the community.

I should mention that the main reason "mobile only" is the default is to try to prevent sybil attacks ... if you're a startup looking to launch an app, the last thing you want is to have some jokers create a million accounts and overload your site with inane stuff. Q expects that you'll require an authenticated session id for most of the "expensive" stuff like realtime pushes, notifications, or whatever your app wants to implement. But if people can sign up with 1 million fake emails, that won't do much good. It's hard to make it expensive to create hundreds of accounts and requiring a cellphone number is the only way I know, aside from requiring valid billable credit card numbers. Facebook commect MAY be a close second.

Also, people tend to pay more attention to SMSes which improves your retention until they download the native app and switch to in-app notifications. (You alluded to this by saying you got a lot of SPAM... that's why Q always has a way for users to unsubscribe.)


I made a basic Angular version with comments: https://jtymes.firebaseapp.com/

The 'Top', 'New', etc. don't work because those aren't implemented in the API yet.

Source: https://github.com/jtymes/hn-fire


Is it just me or does it seem slower?


Of course it should be slower, it's routing everything through a third-party service.


The entire page is generated on the client side, so it makes sense that it would feel a bit slower.



Fixed! Thanks for letting me know.


Very cool, and looks like it only took you a few minutes of work! Nice job. Others might want to check out the code: https://github.com/dstaley/realtime-hacker-news


Here's a React version with collapsible comments:

http://insin.github.io/react-hn


I really hope this ends up in a recursion.

edit: yay!


Me too...


Am I supposed to be seeing something other than a header over a blank page?


Are you able to show the comment counts as well?


In theory, yes. However the comment counts aren't part of the item's JSON, which only includes top-level comments. So I'd need to retrieve all the top-level comments, and then all of the children comments for every comment. Doable, yes, but I'd need to take a while to think about how to do it efficiently.


Load time is 3.55s vs 1.11s of the original.


It's using an external API. Not surprising.


Great choice to use Ember!




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: