Live data from Hacker News

Ask HN: Can you suggest some good JavaScript projects to read and learn?

news.ycombinator.com

11–20 of 49 posts

Re: Ask HN: Can you suggest some good JavaScript projects to read and learn?

#12
post #10

Reflux and it's associated tools for some concise, well written ES6/7 patterns ( https://github.com/gaearon/redux ) Gaearon is actually a hell of a JS developer ( https://github.com/gaearon ).

You mentioned Reflux but linked to Redux.

Re: Ask HN: Can you suggest some good JavaScript projects to read and learn?

#14
post #5

Backbone and Underscore have annotated source code: http://backbonejs.org/docs/backbone.html http://underscorejs.org/docs/underscore.html

This is what I came to suggest as well. I would also say that Express is a good one as well if you're looking to learn Node. Not quite as clear as the annotated source for Backbone, but well commented.

I also liked the "Let's Make a Framework" posts at DailyJS. DailyJS in general was a great blog that is now closed, but the archives are still up.

https://github.com/strongloop/express

http://dailyjs.com/framework-index/

Re: Ask HN: Can you suggest some good JavaScript projects to read and learn?

#17
I'm also interested to see a mid-size scale SPA project that has excellent unit-testing and integration-testing.

I've read a lot about how JS can make programmer productive, I've also read a lot how code can be succinct and all that jazz because of JS, but I have _never seen_ a well-architected, well-documented, well-automated-tested non-todomvc SPA codebase.

This isn't a sarcasm or criticism but a serious and legitimate "ASK" because I'm working on a large-scale SPA project that's hard to write automation test other than Selenium.

I'm looking for something that can taught me:

1. Unit-testing (with some level of mocking)

2. Integration-testing (testing various components without hitting the UI but all the way up to the sending request, kind of like driving the front-end code without the UI).

3. Best practices/patterns for architecting large-scale SPA (hint: generic EventBus tend to be abused).

Re: Ask HN: Can you suggest some good JavaScript projects to read and learn?

#19

I'm also interested to see a mid-size scale SPA project that has excellent unit-testing and integration-testing. I've read a lot about how JS can make programmer productive, I've also read a lot how code can be succinct and all that jazz because of JS, but I have _never seen_ a well-architected, well-documented, well-automated-tested non-todomvc SPA codebase. This isn't a sarcasm or criticism but a serious and legiti…

We have a mid-size scale SPA and its suffering because of bloat. Functions are 2-500 lines long as an example. we've had critical bugs in the last 2 weeks and I got fed up and decided to start learning unit testing. Its been absolutely painful to get everything setup and started (Visual Studio). Nothing works. I would love to see a well written project to base my tests off of.

I would really love to see a well written SPA with testing, but I fear its almost reaching unicorn status. Most projects suffer from deadlines so they'll just never be written the way they should be and instead, the flow is now: patch it and move on.

Re: Ask HN: Can you suggest some good JavaScript projects to read and learn?

#20
One of the best starting points for building a SPA that I've seen is the Angular Fullstack generator https://github.com/DaftMonk/generator-angular-fullstack

This generator uses Angular best practices, has Jasmine and Karma built in for solid unit and integration (called e2e tests in Angular) testing. The built-in generators even build pages, controllers, and add the unit test files along with the new routes. In addition, authentication via Passport.js is in the box. In my opinion it's an easy to extend, robust solution for building a non-trivial SPA. Even has hooks for easy deployment to Heroku.

That being said, I have been trying to learn React lately and have yet to find a similar thing for a React-based stack.

Post reply on HN