Tutsplus Marketplace Writing Modular JavaScript 視頻教學 英文教學版     軟體簡介:   WhenwritinganentirewebapplicationinJavaScript,it’sveryimportant tohavewell-organizedcode;maintainingaspaghetti-codedprojectwill onlycauseyouheadachesandnightmares.Inthistutorial,I’llshowyou howtomodularizeyourcodetomakeiteasiertomanagelargeJavaScript projects. Iwasinspiredtowritethistutorialafterwatchingapresentationentitled “ScalableJavaScriptApplicationArchitecture”byNicolasC.Zakas(available ontheYUITheater).We’lltakethetheoreticalcodethatheshowedinhis slidesandextendandcustomizeittocreatearobustJavaScriptsystem thatwillmakeitincrediblyeasytobuildwebappsontopof. We’llstartbydefiningourmodules;then,we’llbuildasandboxforthem tointeractwith.We’llalsoneedacoretohandlethemodules,andabase (aJSframework)thatgivesthecoreanequalizedenvironmenttoworkon. We’llbuildourfirstcoreonjQuery,andthenbuildanalternatecoreon Dojo. We’llconcludethistutorialbydiscussingwhatthebenefitsanddownsides ofusingsuchanarchitectureforJavaScriptare.