All JavaScript objects should be namespaced under window
class window.Foo
constructor: ->
console.log 'foo'
$ ->
new window.Foo
Related JavaScript should be further namespaced:
window.SomeComponent ||= {} # this is required to ensure that SomeComponent exists before adding an object on it
class window.SomeComponent.Things
constructor: ->
console.log 'some component-namespaced things'
class window.SomeComponent.OtherThings
constructor: ->
console.log 'some component-namespaced other things'