TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JavaScript: The Right Way

235 pointsby gnuwilliamover 11 years ago

33 comments

manish_gillover 11 years ago
Having recently started getting into Javascript, I have to say it is <i>the</i> most confusing ecosystem ever. Learning the basics of the language is easy enough, but as soon as you start trying to create a non-trivial application, bam, you&#x27;re hit with information overload - X framework, Y library. It&#x27;s different from Python, Ruby et all because at least with them, there are good consistent popular choices that you can rely on. With Javascript, more often than not, I&#x27;m left scratching my head as to what I should exactly use.<p>:&#x2F;
评论 #7075116 未加载
评论 #7075385 未加载
评论 #7075183 未加载
评论 #7074984 未加载
评论 #7075193 未加载
评论 #7077503 未加载
评论 #7077793 未加载
评论 #7076012 未加载
评论 #7087983 未加载
评论 #7075931 未加载
评论 #7075480 未加载
评论 #7082366 未加载
rmasonover 11 years ago
Nice site but I take exception that backbone is the most popular framework.<p>While I don&#x27;t think popularity alone is how you should chose a framework. It appears that AngularJS tops all except jQuery at this time.<p><a href="http://www.google.com/trends/explore#q=angularjs%2C%20backbone.js%2C%20emberjs%2C%20knockoutjs&amp;cmpt=q" rel="nofollow">http:&#x2F;&#x2F;www.google.com&#x2F;trends&#x2F;explore#q=angularjs%2C%20backbo...</a>
评论 #7074700 未加载
评论 #7074889 未加载
mcgwizover 11 years ago
Given that the greatest challenge to JavaScript testing is the browser environment, it&#x27;d be worthwhile to mention Zombie.js (simulated DOM) and PhantomJS&#x2F;CasperJS (V8). Code organization is also important for any large codebases, which is often addressed with browserify or RequireJS.
shangxiaoover 11 years ago
Nice, I like what you&#x27;re trying to do, but things like<p>&quot;Backbone.js: The most popular JS client-site framework&quot;<p>worry me. Most people I talk to avoid Backbone nowdays in favour of the other popular frameworks.<p>Also: some descriptions appear to be lacking&#x2F;missing &amp; you definitely should mention Grunt under &quot;Helpers&quot;. At least it&#x27;s a GH repo and I assume you&#x27;ll accept PR&#x27;s? ;)
评论 #7074670 未加载
评论 #7074652 未加载
评论 #7074664 未加载
exodustover 11 years ago
Is there a &quot;too clever&quot; mentality in frontend web dev culture of late? An overly fragmented workflow toolset?<p>Not sure the cause, perhaps the influx of engineering &quot;computer science disciplined&quot; brains into the frontend world. Or a panicked competitive race to achieve a nirvana dev environment. Or a tendency to think that workflows for large websites with countless modules is the best workflow for a one-page web app.<p>Overkill for the intended task, or cluttering your project with too much technology, is the thing to watch out for in the frontend aspect.<p>Layers of tools and libraries and plugins can easily get out of control and beyond a joke. Don&#x27;t forget you&#x27;ve got a web app to build while you mess around with the &quot;right way&quot; to build it.<p>You do not need a cup-holder on your scaffolding.<p>Just using plain JS with Jquery, and perhaps some additional smaller specific plugins&#x2F;libraires, is enough to do a lot of cool stuff if we&#x27;re talking &quot;javascript&quot; projects. Then just get a good editor and off you go.
评论 #7075744 未加载
评论 #7075899 未加载
评论 #7076166 未加载
harlanlewisover 11 years ago
Good resource, nicely presented.<p>&quot;We recommend you whenever possible to verify you code style with a Lint tool.&quot;<p>That&#x27;s not all they need a Lint tool for!
评论 #7076485 未加载
gnuwilliamover 11 years ago
Hey guys!<p>I see there&#x27;s a lot of great suggestions and critics here!<p>Since it&#x27;s an open source project, you can feel free to open a pull request telling which resource you think it&#x27;s better to be there, or which one should be removed. As well help me correct the grammar errors. I&#x27;m from Brazil, and my english is not that good.<p>I&#x27;m really glad about all the opinions, and for sure the site will be improved from now on.<p>Thanks!
评论 #7079864 未加载
评论 #7075793 未加载
merittover 11 years ago
Some additional comprehensive JS resources:<p><a href="http://eloquentjavascript.net/" rel="nofollow">http:&#x2F;&#x2F;eloquentjavascript.net&#x2F;</a><p><a href="http://shichuan.github.io/javascript-patterns/" rel="nofollow">http:&#x2F;&#x2F;shichuan.github.io&#x2F;javascript-patterns&#x2F;</a><p><a href="https://github.com/airbnb/javascript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;airbnb&#x2F;javascript</a>
评论 #7077201 未加载
评论 #7076160 未加载
jkleiserover 11 years ago
I would have expected to find React (<a href="http://facebook.github.io/react/" rel="nofollow">http:&#x2F;&#x2F;facebook.github.io&#x2F;react&#x2F;</a>) among the frameworks.
usablebytesover 11 years ago
Excellent work there. I always wanted to work on such a public collection but kudos to these guys on making it a reality. I&#x27;ve used&#x2F;read-about&#x2F;tried-out most of the stuff listed there and appreciate the hardwork that has gone into putting all of it together.<p>I think Polymer (Google) and Brick (Mozilla) deserves a mention there as Web Components have a very high possibility of becoming the ultimate way for the future of web development.
NigelTufnelover 11 years ago
I occasionally code in Javascript and I always get the feeling that I&#x27;m working with a language without a decent built-in standard library.<p>Want to work with dates? Use a third party library (or use built-in 1995-style library). Want to format a string? Use a third-party library. Want to do X? Use a third-party library.<p>Coding in e.g Python feels completely different: almost everything I need is in the standard library.
citrin_ruover 11 years ago
It funny, but clicking to this link caused high CPU usage for N seconds and message from Firefox:<p>A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.<p>Script: <a href="http://jstherightway.org/js/jquery.js:1144" rel="nofollow">http:&#x2F;&#x2F;jstherightway.org&#x2F;js&#x2F;jquery.js:1144</a>
评论 #7075415 未加载
评论 #7079723 未加载
jasonkostempskiover 11 years ago
This is JavaScript: The Infinitely Many Ways. Shouldn&#x27;t the right way remove at least a few options from the table?<p>I&#x27;ve found a sweet spot for myself, at least for single page apps which is what I work on most of the time. jQuery, Require.js, text.js and JSLint. r.js for building release versions. Those, along with a small &quot;view&quot; class I wrote whose constructor takes an html string, finds all elements with a data-vid attribute and adds properties to itself pointing at those elements. Markup is kept in bite-size html files, loaded by require during development but compiled into the single js file for release. Also, I can&#x27;t remember the last time I used a jQuery selector.
garabonciasover 11 years ago
Strange that it&#x27;s just refer several times but not list jQuery as a framework but did with Zepto.<p>It&#x27;s not mention lodash &#x2F; underscore which is very elementary if you want to avoid reinvent the wheel.
EvanYouover 11 years ago
Karma&#x27;s author is not Isaac Durazo - he is the logo designer. Karma is written by the team behind Angular (mostly by Vojta Jina).
评论 #7075808 未加载
tchaffeeover 11 years ago
The command pattern is featured in the article. Why would you use that pattern in a language that supports first-class functions?
评论 #7077168 未加载
novaleafover 11 years ago
I started web development 8 months ago. First I started by reading &quot;The good parts&quot; but honestly it&#x27;s not really a good book to learn from 0 with.<p>The thing that really got me going? Typescript. Not only does it help with abstracting javascript syntax, but the intelisence made me not have to google every 20 characters i write.
_mhr_over 11 years ago
What I&#x27;ve never understood is how to effectively use both objects and functions in a multi-paradigm language like JavaScript. Most introductions to JavaScript explain how to use functions in their own section and explain how to use objects in their own section, but they never explain how to combine the two techniques.
outworlderover 11 years ago
&gt; &quot;Different from C, C# and Java, JavaScript is an interpreted language. It means that it needs an &quot;interpreter&quot;.&quot;<p>I have an issue with the above statement. There are no compiled or interpreted &quot;languages&quot;. There are only implementations.<p>There&#x27;s nothing preventing someone from &quot;compiling&quot; it.
评论 #7075570 未加载
semerdaover 11 years ago
Nice site. Cheers for sharing!<p>JavaScript Patterns by Stoyan Stefanov (made the list under reading&#x2F;books) is a must for anyone wanting to learn JavaScript the right way. The content volume is just right with great examples. Can be read in a week easily and get you rolling writing better code fast!
frikover 11 years ago
found a dead link in the article: <a href="http://killdream.github.io/2011/10/09/understanding-javascript-oop.html" rel="nofollow">http:&#x2F;&#x2F;killdream.github.io&#x2F;2011&#x2F;10&#x2F;09&#x2F;understanding-javascri...</a>
j_sover 11 years ago
It would be nice to see the browser versions supported by all these projects in one place... this simplifies the process of elimination for those who have to support older browsers.
CmonDevover 11 years ago
&quot;JavaScript has strong object-oriented programming capabilities&quot;<p>What would be an example of a language with weaker OOP capabilities?<p>PS: &quot;The bad parts&quot; section did not fit the page?
评论 #7075333 未加载
评论 #7080633 未加载
elwellover 11 years ago
Should add jashkenas [0] to &quot;WHO TO FOLLOW&quot;.<p>0 - <a href="http://github.com/jashkenas" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;jashkenas</a>
nazkaover 11 years ago
A similar website posted on HN. Very well done.<p><a href="http://superherojs.com/" rel="nofollow">http:&#x2F;&#x2F;superherojs.com&#x2F;</a>
Tornover 11 years ago
Nice collection of resources on a single page.<p>There&#x27;s a fair amount of typo&#x27;s and grammar mistakes however.
smenkoover 11 years ago
For something containing &quot;the right way&quot; in the heading, this has awful grammar.
maccoover 11 years ago
Besides the questionable choice of framework. Does this guide make sense?<p>What would you remove or add?
评论 #7076038 未加载
评论 #7075192 未加载
评论 #7075016 未加载
revskillover 11 years ago
Javascript is the bare tool, in order to build abstraction, you need science, i mean something like algorithmic way in rendering view with framework like React framwork, it makes sense because it makes all developer around it thinks in the same way. It&#x27;s the right way to do all successful thing.
stevewilhelmover 11 years ago
Wow, no mention of Ember.js (we switched from Ember to Backbone last fall).
评论 #7078452 未加载
LordQuas3000over 11 years ago
Thank you very much for posting this, very useful.
pingsifuover 11 years ago
I am not too fond of the styling. Looking at it on my desktop PC, the page could use some left&#x2F;right margin. On my iPhone on the other hand its rather unreadable.
评论 #7077216 未加载
Lauricioover 11 years ago
no meteor?