TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

109 点作者 balajics将近 10 年前

29 条评论

2mur将近 10 年前
Backbone and Underscore have annotated source code:<p><a href="http:&#x2F;&#x2F;backbonejs.org&#x2F;docs&#x2F;backbone.html" rel="nofollow">http:&#x2F;&#x2F;backbonejs.org&#x2F;docs&#x2F;backbone.html</a><p><a href="http:&#x2F;&#x2F;underscorejs.org&#x2F;docs&#x2F;underscore.html" rel="nofollow">http:&#x2F;&#x2F;underscorejs.org&#x2F;docs&#x2F;underscore.html</a>
评论 #9942875 未加载
评论 #9942550 未加载
评论 #9942694 未加载
edwinnathaniel将近 10 年前
I&#x27;m also interested to see a mid-size scale SPA project that has excellent unit-testing and integration-testing.<p>I&#x27;ve read a lot about how JS can make programmer productive, I&#x27;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.<p>This isn&#x27;t a sarcasm or criticism but a serious and legitimate &quot;ASK&quot; because I&#x27;m working on a large-scale SPA project that&#x27;s hard to write automation test other than Selenium.<p>I&#x27;m looking for something that can taught me:<p>1. Unit-testing (with some level of mocking)<p>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).<p>3. Best practices&#x2F;patterns for architecting large-scale SPA (hint: generic EventBus tend to be abused).
评论 #9943227 未加载
评论 #9944363 未加载
Daneel_将近 10 年前
This game is a tool for experimentation - it gave me motivation to start learning. You need to write the control software for an elevator (or elevators), which has levels of increasing difficulty to clear, which will mean re-evaluating and rewriting your code to perform better under different scenarios.<p><a href="http:&#x2F;&#x2F;play.elevatorsaga.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;play.elevatorsaga.com&#x2F;</a>
评论 #9943407 未加载
tonyhb将近 10 年前
Reflux and it&#x27;s associated tools for some concise, well written ES6&#x2F;7 patterns (<a href="https:&#x2F;&#x2F;github.com&#x2F;gaearon&#x2F;redux" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gaearon&#x2F;redux</a>)<p>Gaearon is actually a hell of a JS developer (<a href="https:&#x2F;&#x2F;github.com&#x2F;gaearon" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gaearon</a>).
评论 #9944127 未加载
评论 #9942746 未加载
blairanderson将近 10 年前
Read the backbone source. <a href="http:&#x2F;&#x2F;backbonejs.org&#x2F;docs&#x2F;backbone.html" rel="nofollow">http:&#x2F;&#x2F;backbonejs.org&#x2F;docs&#x2F;backbone.html</a><p>Read the underscore Source first: <a href="http:&#x2F;&#x2F;underscorejs.org&#x2F;docs&#x2F;underscore.html" rel="nofollow">http:&#x2F;&#x2F;underscorejs.org&#x2F;docs&#x2F;underscore.html</a>
pennaMan将近 10 年前
The same todo app implemented in a bunch of frameworks:<p><a href="http:&#x2F;&#x2F;todomvc.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;todomvc.com&#x2F;</a>
burai将近 10 年前
It&#x27;s not a project, but Airbnb have updated their Javascript style guide to ES6. It&#x27;s a good read on how to write and structure javascript.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;javascript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;javascript</a>
arihant将近 10 年前
If you&#x27;re willing to learn about patterns, jQuery and Underscore.js are excellent places to look at.<p>If you&#x27;re looking for something harder and unconventional, see React source. It also has some low hanging fruit for pull requests.<p>If documentation and comments are important for you to learn, Backbone.js is way ahead of everyone else in those terms.<p>I would also look at smaller indie projects. The source is smaller, forking and adding something is easier. Pull requests are easier too.
ahmadajmi将近 10 年前
I asked this before and I hope it helps <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8128400" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8128400</a>
jedireza将近 10 年前
Some personal projects:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;drywall" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;drywall</a> - <a href="https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;frame" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;frame</a> - <a href="https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;aqua" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jedireza&#x2F;aqua</a>
nickstefan12将近 10 年前
ExpressJS is pretty interesting with its nested routers, middleware, request handling function as the app, and adjusting the prototype on each request.<p>It gets kind of hairy so I did a blog post on it: <a href="http:&#x2F;&#x2F;www.nickstefan.net&#x2F;blog&#x2F;view&#x2F;express-under-the-hood" rel="nofollow">http:&#x2F;&#x2F;www.nickstefan.net&#x2F;blog&#x2F;view&#x2F;express-under-the-hood</a>
at-fates-hands将近 10 年前
Its funny everybody is talking about Backbone. With all the new frameworks out there, Backbone seems to be forgotten. And yet, it&#x27;s persevered and continues to improve itself seemingly now under the radar.<p>It&#x27;s such a straight forward library to use and build stuff with - plus the code is very well annotated for anybody just starting out.
chrisco255将近 10 年前
One of the best starting points for building a SPA that I&#x27;ve seen is the Angular Fullstack generator <a href="https:&#x2F;&#x2F;github.com&#x2F;DaftMonk&#x2F;generator-angular-fullstack" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;DaftMonk&#x2F;generator-angular-fullstack</a><p>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&#x27;s an easy to extend, robust solution for building a non-trivial SPA. Even has hooks for easy deployment to Heroku.<p>That being said, I have been trying to learn React lately and have yet to find a similar thing for a React-based stack.
评论 #9943500 未加载
arsey将近 10 年前
The original jquery source w&#x2F; annotations: <a href="http:&#x2F;&#x2F;genius.it&#x2F;5088474&#x2F;ejohn.org&#x2F;files&#x2F;jquery-original.html" rel="nofollow">http:&#x2F;&#x2F;genius.it&#x2F;5088474&#x2F;ejohn.org&#x2F;files&#x2F;jquery-original.htm...</a>
mkaziz将近 10 年前
BackboneJS is a really well-written library, even if it&#x27;s now beginning to lose popularity. The source code is small enough that it should be easy to read and understand within a few weeks.
k1dbl4ck将近 10 年前
No mention of polymer yet. Web components are a good candidate for the future structure of the web. Just mind the recent bump to 1.0 and with a slew of components still developed for 0.5
stephengillie将近 10 年前
I wanted to make HTML5 games. So I searched and eventually came across an open-source &quot;Catch the demon&quot; game[1]. I studied it and some other Javascript code, and modified the game to take mouse input instead of keyboard[2]. You might be able to make better modifications, or even a better game!<p>[1]www.lostdecadegames.com&#x2F;how-to-make-a-simple-html5-canvas-game&#x2F;<p>[2]<a href="http:&#x2F;&#x2F;gilgamech.neocities.org&#x2F;demon.html" rel="nofollow">http:&#x2F;&#x2F;gilgamech.neocities.org&#x2F;demon.html</a>
theaccordance将近 10 年前
I could, but JavaScript has such a broad application these days that you should be more specific as to what you&#x27;re goals are
drinchev将近 10 年前
If you want something more NodeJS oriented you can start exploring Ghost source code [1]. It has amazing Promise-based + express infrastructure, in which you can find a lot of patterns to help you build your next project.<p>1 : <a href="https:&#x2F;&#x2F;github.com&#x2F;TryGhost&#x2F;Ghost" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TryGhost&#x2F;Ghost</a>
SunboX将近 10 年前
No Frameworks used, just &quot;modern&quot; JavaScript: <a href="https:&#x2F;&#x2F;github.com&#x2F;mozilla-b2g&#x2F;gaia" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mozilla-b2g&#x2F;gaia</a> Have learned some things by reading the code.
0xdeadbeefbabe将近 10 年前
This is an impossible question to answer correctly.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;hybridgroup&#x2F;cylon-sphero" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hybridgroup&#x2F;cylon-sphero</a> because you can use it to control robots?
hyptos将近 10 年前
From Addy Osmani :<p><a href="http:&#x2F;&#x2F;addyosmani.com&#x2F;resources&#x2F;essentialjsdesignpatterns&#x2F;book&#x2F;#" rel="nofollow">http:&#x2F;&#x2F;addyosmani.com&#x2F;resources&#x2F;essentialjsdesignpatterns&#x2F;bo...</a>
gee_totes将近 10 年前
The New York Times website has some great annotated JS source code.
cryptonomicon将近 10 年前
Lodash has some of the best javascript code out there.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lodash&#x2F;lodash</a>
seige将近 10 年前
Emberjs is very well documented too and is choke full of some very good design patterns and concepts.<p>YMMV as its a huge codebase and it might be hard to figure out where to start.
azeirah将近 10 年前
Take a look at the d3.js source code
评论 #9944215 未加载
xiaoma将近 10 年前
The Khan Academy open sources their site&#x27;s code.
MoussaMan将近 10 年前
AngularJs is the best
chrshawkes将近 10 年前
React.JS is the best