JavaScript messy code in large projects with jquery etc? -


calling javascript gurus out there. question regarding how structure code, both visually , functionality example wrap in objects using structure:

var myapp={   binds:function(){     //put event listeners jquery etc...   },   otherfunc:function(){    //do other thing   },   init:function(){    //call myapp.binds , other functions , other stuff intialize app.   } }; 

then finally

$(document).ready(myapp.init); 

the thing structure think jslint complains doesn't it? whats pros , cons using structure or there better way structure code? follow pattern $(document).ready(call) putting event listeners , "initializing" app, use separate objects methods , variables?

i think "visually" if have large webapp structure looks messy, maybe it's me don't know, input appreciated thanks.

using inheritance patterns organize large jquery applications 

explain in detail , better practice alex

http://alexsexton.com/?p=51

its very explain, must see

other links


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -