

Show HN: Hacker News implemented using the new API - dstaley
https://realtimehackernews.firebaseapp.com/

======
hswolff
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/](https://hn-ng.firebaseapp.com/)

Source: [https://github.com/hswolff/hn-ng](https://github.com/hswolff/hn-ng)

~~~
Lord_Zero
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.

------
giancarlostoro
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.

~~~
EGreg
You should try Q!

[http://platform.qbix.com/](http://platform.qbix.com/)

~~~
oneweekwonder
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?

~~~
EGreg
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.)

------
jtymes
I made a basic Angular version with comments:
[https://jtymes.firebaseapp.com/](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](https://github.com/jtymes/hn-fire)

------
coherentpony
Is it just me or does it seem slower?

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

------
Fuzzwah
The header links to a 404:

[https://realtimehackernews.firebaseapp.com/news](https://realtimehackernews.firebaseapp.com/news)

~~~
dstaley
Fixed! Thanks for letting me know.

------
mayop100
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](https://github.com/dstaley/realtime-hacker-news)

------
insin
Here's a React version with collapsible comments:

[http://insin.github.io/react-hn](http://insin.github.io/react-hn)

------
tlarkworthy
I really hope this ends up in a recursion.

edit: yay!

~~~
andy_ppp
Me too...

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

------
zzmp
Are you able to show the comment counts as well?

~~~
dstaley
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.

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

~~~
pluma
It's using an external API. Not surprising.

------
general_failure
Great choice to use Ember!

