13

I've learned JavaScript and know how to write OO JavaScript, and I can accomplish those assignment like autocomplete, photo gallery with JavaScript, but I just don't know how to organize the codes. For example, when and where to define a function, how to organize those variables, etc.
So I'm looking for some good and simple examples of JavaScript project to learn the good practices. Can you suggest any? (such as a list data filter).

Rodrigo
4918 silver badges15 bronze badges
asked May 27, 2011 at 17:06

1 Answer 1

16

http://www.klauskomenda.com/code/javascript-programming-patterns/

That link discusses many different javascript organization patterns, including the one I prefer, the Revealing Module Pattern.

More information about the Revealing Module Pattern is here:

http://www.wait-till-i.com/2007/08/22/again-with-the-module-pattern-reveal-something-to-the-world/

answered May 27, 2011 at 17:12
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. Now I know that what I want is patterns.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.