Skip to content

Comment on Hacker News written with Angular 2.0

Comments

Taking something simple and making it complex and limited, with Angular 2.0.

That's not the point of sample projects like these. It's to showcase what's possible with the technology and allow developers to see how something can be implemented.

The developer was having fun with the technology and showing others how it could be done. Let's encourage this type of behavior.

"I created this to see what it's like to create an AngularJS 2.0 application. I've previously experimented creating a Hacker News clone with AngularJS 1 so this was fun to play with."

Hacker News loads in milliseconds, why does this take over 10 seconds to even start showing comments?

It's not so much a showcase as a reason to ever never use this in any product, it's obviously unsuitable for displaying even the most simple, static data without taking forever and making FireFox stutter. It's not an isolated situation with this either, other websites like this perform terribly even thought they are written in the hippest language with the most popular libraries on the market.

Hacker News loads in milliseconds because the content is generated on the server and insanely optimized. It's different architecture. Optimized server side page loads will always load faster than client size AJAX API calls + page 2x page rendering.

Of course Angular doesn't make sense for a site like HN but this is just a demonstration of what's possible with a site we're all familiar with.

A real world example of Angular is when you're working with HIPAA complaint applications which depend on 3rd party data storage sites, such as http://TrueVault.com. None of the patient information is stored on the application server. Instead, it makes client side API requests to the TrueVault storage and updates the page with the data.

Yes, Angular doesn't make sense for a majority of the websites in existence but it does work well for certain applications.

Probably because the angular site is using a third party API to get the comments and stories?

> Let's encourage this type of behavior.

Or let's encourage using the right tools for the right applications. Let's encourage speed and simplicity as desirable goals again. Let's not do it the Google Blogger way, let's not create services that take several seconds to display few lines of text. There's a great framework for that, it's called HTML.

This is a demo project that works with a site we're all familiar with.

Angular is a good tool for web apps that have information stored on 3rd party websites that have to be called via client side API requests.

It seems to me like a static, form-driven server application such as HN is a pretty bad example for AngularJS, then.

It's an example of a site that we're all familiar with. It's not trying to showcase speed, it's trying to showcase the technology in general.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.