资源描述:
《You.Dont.Know.JS.this.and.Object.Prototypes(上)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、“Thethiskeywordandprototypesarepivotal,becausetheyarefoundationaltodoingrealprogrammingwithJavaScript.”“PrototypesmaketheJavaScriptlanguagepowerfulKYLESIMPSON—NICKBERARDI,SeniorConsultant,RDACorporationbutcanalsoleaddevelopersdownarouteofconfusion.this&Ob
2、jectPrototypesdoesamasterfuljobofexplainingprototypes,inheritance,andtheconceptof‘classes’inJavaScript.”—DAVIDWALSH,WebDeveloper,MozillaKYLESIMPSONYOUDON’TKNOWJAVASCRIPTthis&IOBJECTPROTOTYPES&thisIOBJECTNomatterhowmuchexperienceyouhavewithJavaScript,oddsa
3、reyoudon’tfullyunderstandthelanguage.Thisconcise,in-depthguidetakesyouinsideJavaScript’sthisstructureandobjectprototypes.You’lllearnhowtheyworkandwhythey’reintegraltobehaviordelegation—adesignpatterninwhichobjectsarelinked,ratherthancloned.Likeotherbooksi
4、ntheYouDon’tKnowJSseries,this&ObjectPrototypesdivesintotrickierPROTOTYPESpartsofthelanguagethatmanyJavaScriptprogrammerssimplyavoid.Armedwiththisknowledge,youcanbecomeatrueJavaScriptmaster.thisWITHTHISBOOKYOUWILL:■Explorehowthethisbindingpointstoobjectsba
5、sedonhowthefunctioniscalled&OBJECTPROTOTYPES■LookintothenatureofJSobjectsandwhyyou’dneedtopointtothem■LearnhowdevelopersusethemixinpatterntofakeclassesinJS■ExaminehowJS’sprototypemechanismformslinksbetweenobjects■Learnhowtomovefromclass/inheritancedesignt
6、obehaviordelegation■UnderstandhowtheOLOO(objects-linked-to-other-objects)codingstylenaturallyimplementsbehaviordelegationKYLESIMPSON,anopen-webevangelist,ispassionateaboutJavaScript,HTML5,real-time/peer-to-peercommunications,andwebperformance.He’sanauthor
7、,workshoptrainer,techspeaker,andavidopensourcecommunitymember.JAVASCRIPTTwitter:@oreillymediaJAVASCRIPTfacebook.com/oreillyUS$24.99CAN$26.99ISBN:978-1-491-90415-2oreilly.com“Thethiskeywordandprototypesarepivotal,becausetheyarefoundationaltodoingrealprogra
8、mmingwithJavaScript.”“PrototypesmaketheJavaScriptlanguagepowerfulKYLESIMPSON—NICKBERARDI,SeniorConsultant,RDACorporationbutcanalsoleaddevelopersdownarouteofconfusion.this&ObjectPrototypesdoesamasterfuljobofexplainin