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
its very explain, must see
other links
Comments
Post a Comment