Literal Notation and Object Constructors in JavaScript
Putting something up here again for my own reference. The comments on this article are the part that interested me. I like using object literal notation and wanted to know if it would be possible to write a reusable object constructor in literal notation. From all the discussion, it seems that making object constructors is best still done using a prototype function. Object literal notation is great for creating a single instance of an object but not ideal for creating an object constructor that can be used to create multiple instances of an object. If anyone knows differently, I'd be interested.
Edit: Here are two sites that offer utilities to create constructor classes from an object in literal notation: