I need to write a PhoneGap application with JavaScript and I'm thinking of the code design patterns. I've read some books of JavaScript design patterns but can't really see the advantages/disadvantages on them and I think I don't understand the implementation and usage right.

I would like to have some opinions of which might suit my needs best. I'd like the code to be readable and maintainable.

The application itself is quite small and simple. It has a player management (add/remove), a game management (add/remove players from a team, start/stop/reset a stopwatch).

In last app I created I had over 30 named functions in a global scope which I think is a big no no. So, now I want to make things right, and was thinking of either using an object literal or a module pattern... something like this perhaps:

I found this example gist.github.com/274388. But I still don't know how should implement those game, player and team 'modules' if I use your, or link's, example. I don't want to break my code into several files.
–
micadelliJul 26 '12 at 21:00

This article is the best I've come across explaining various JS design patters and how they can come together as your application grows. I typically use something similar to the YUI pattern because it's easy for anyone to read and includes private and public methods and properties.