开发者

Where do I find a good explanation of Javascript-ese [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 2 years ago.

开发者_如何学运维 Improve this question

I realize that title may require explanation.

The language I first learned was C, and it shows in all my programs... even those not written in C. For example, when I first learned F# I wrote my F# programs like C programs. It wasn't until someone explained the pipe operator and mapping with anonymous functions that I started to understand the F#-ese, how to write F# like a F# programmer and not a C programmer.

Now I've written a little javascript, mostly basic stuff using jquery, but I was hoping there was a good resource where I could learn to write javascript programs like a javascript programmer.


Douglas Crockford's - Code Conventions for the JavaScript Programming Language would be a good place to start.

I learned a lot of useful information in regards to code convention through his video tutorials, which I suggest viewing. I posted the link to the first video out of the four in the series.

Also, as suggested by Ben, (which is a book I would also highly recommend) is Douglas Crockford's book JavaScript: The Good Parts

If you want to find good explanations on jQuery, check out the creator, lead developer and fellow StackOverflower John Resig's website/personal blog.


The book Pro Javascript Design Patterns is a great resource:
http://jsdesignpatterns.com/


I really like this article: A re-introduction to JavaScript


http://eloquentjavascript.net/

It may be a little wordy, but it gives you some excellent examples that will stick with ya.


The more you work with JavaScript/jQuery - especially working with other people's code - the more of the style you will pick up. I recommend reading though the documentation on the jQuery website and maybe picking up a book on Javascript. Then just keep working with it. Also, make sure you keep looking at other people's code - read through the source code of some of the jQuery plugins you are using, and seek out examples online for 'best practices'.


First off, start using JSLint on all your code, for at least a week (http://www.jslint.com). I'm not going to say you should use it constantly, forever and ever, and it's perfect, because it's not. But, it will help you learn a lot about JavaScript, if you take the time to read what it says, and understand why. Even if you disagree, which you may, understand the reasoning behind each message. Then you can decide if it's a tool you'd like to continue using.

The other first step is to pick up a copy of JavaScript: The Good Parts. This is by far the best book on JavaScript. It's short, very easy to read, and really will help you learn better JavaScript. http://oreilly.com/catalog/9780596517748

Other than that, there are a lot of good blogs to follow. You can find these via google, but I'd look at Perfection Kills and John Resig's blog, in particular. I think mine is pretty good too, you can find it via my profile if you're interested :)


I would also recommend "Secrets of a JavaScript Ninja" by John Resig. It will be out in July this year and would definitely be an excellent resource.

Else, Douglas Crockford "JavaScript:The good parts" is excellent.


Javascript has functional programming roots.
That makes a big difference compared to the OO world.

Here are some links that helped me jump the fence:

A simple explanation:
http://www.joelonsoftware.com/items/2006/08/01.html

A deeper one:
http://www.hunlock.com/blogs/Functional_Javascript

Read/debug the code of this library:
http://osteele.com/archives/2007/07/functional-javascript

You can read/debug the source code of PURE, a JS templating engine we wrote.
The 2nd version was totally rewritten in functional JS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜