JavaScript中代码组织的普遍接受的最佳实践[关闭]
问题: As JavaScript frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem... 随着像jQuery这样的JavaScript框架使客户端Web应用程序更丰富,更实用,我开始注意到一个问题...... How in the world do you keep this organized? 你是如何保持这种组织的? Put all your handlers in one spot and write functions for all the events? 将所有处理程序放在一个位置并为所有事件编写函数? Create function/classes to wrap all your functionality? 创建函数/类来包装所有功能? Write like crazy and just hope it works out for the best? 写得像疯了似的,只希望它能做到最好? Give up and get a new career? 放弃并获得新的职业? I mention jQuery, but it's really any JavaScript code