I-JavaScript iwulimi lwesimanje lwenhloso ejwayelekile. Ukusetshenziswa kwayo akugcini ezipheqululini zewebhu. Yakhiwe ngeso lokuhlanganiswa kunoma yiziphi izinhlelo zokusebenza kanye nekhono lokukhipha imibhalo. I-JavaScript bekufanele ibe ulimi lokubhala lwe-Netscape. Ekuqaleni yayibizwa nge-Mocha, bese kuba yi-LiveScript. Yathola igama layo lamanje ngoDisemba 1995. Ngokwesinyathelo sochwepheshe abavela ku-Netscape JavaScript yalinganiswa yi-ECMA. [i-id yamagama-ncazo = “okunamathiselwe_7684” align = “aligncenter” wide = “760”]
UBrendan Icke, ubaba we-JavaScript[/caption] Osetshenziswa kakhulu kuziphequluli zewebhu. I-JavaScript iwulimi lohlelo lokubhala. Ukwandisa ukusebenza, ngokwethula izinto ezintsha, kukuvumela ukuthi uguqule okuqukethwe kwamadokhumenti ngaphakathi kwefasitela elilodwa (shintsha i-HTML, i-CSS), uhlanganyele nabasebenzisi, ucubungule, ubale futhi uhlole idatha. I-JavaScript eshumekiwe yenza kusebenze izikripthi ezishumekwe kukhodi ye-HTML yamakhasi. Ukucutshungulwa kombhalo kwenzeka ngokuzenzakalelayo lapho ikhasi lilayishwa kukhompuyutha yeklayenti. Ulimi lusezingeni, okufanele lukhombise ukuhambisana okuhle phakathi kokusetshenziswa okuhlukahlukene. Kodwa ekusebenzeni, ukuhambisana akutholakali kuziphequluli ezahlukene, kuletha izinkathazo eziningi kubahleli bohlelo.
Izici nemikhawulo ye-JavaScript
Kusukela ekusetshenzisweni kwayo kokuqala, i-JavaScript isihambe ibanga elide. Manje ungayisebenzisa ukuze udale izinhlelo zokusebenza, usebenze kusiphequluli esinomshini wokufunda (ML) namamodeli we-AI. I-JavaScript yohlangothi lweseva (node.js) ivunyelwe. Izici eziyinhloko zolimi esipheqululini:
- ikuvumela ukuthi usebenze nge-CSS ne-HTML (ukushintsha, ukungeza, ukususa ulwazi);
- inikeza ukuxhumana nabasebenzisi ekhasini (izinkinobho, ukuchofoza, ukuhambisa isikhombisi segundane);
- esetshenziselwa ukuthumela izicelo kuseva, ukulanda/ukulayisha amafayela (ubuchwepheshe be-AJAX JS);
- isebenza ngamakhukhi.
Imikhawulo:
- iyasebenza kuthebhu evuliwe, akukho ukufinyelela kwamanye amathebhu avuliwe;
- uma i-JS ingazange ivule iwindi lesiphequluli, ngeke ikwazi ukulivala;
- ayikho indlela yokufihla ikhodi yomthombo wekhasi;
- akukho ukufinyelela kumisebenzi yesistimu ye-OS.
Ixhunywe ngezindlela ezimbili: ngekhodi esekhasini nangefayela langaphandle. Esimweni sokuqala, kufanele ucacise <script>//Umzimba wohlelo</script>. Ikhodi evela kufayela langaphandle ifakiwe nomyalo <script src=”name.js”></script>
I-JavaScript iyinketho engcono kakhulu yentsha kanye nabahleli bezinhlelo abasaqalayo. Inzuzo yayo eyinhloko ukusabalala kwayo. Isekelwa kuzo zonke iziphequluli, kuzo zonke izinhlelo zokusebenza, amadivaysi eselula, amakhompyutha omuntu siqu. Izinhlelo zokusebenza ze-JavaScript zisebenza ngaphandle kokufakwa kuqala emishinini yabasebenzisi. Uma kunesifiso sokuthi noma ubani angasebenzisa imojula edaliwe, khona-ke i-JS iyindlela efanelekile. Isibonelo, udinga ukuhlola. Ngingayenza kanjani imibuzo yami yokuhlola ibonakale kwabanye abantu? Konke kulula kakhulu. Uma i-JavaScript ikhethwa ukwakha ikhodi, futhi isayithi elivamile likhethwa ukuze lisatshalaliswe, inkinga izonyamalala ngokwayo.
Ukuduma kweJavaScript kungenxa yenani elikhulu lezinzuzo:
- Ibalulekile ekuthuthukisweni kwewebhu. Imibhalo isekelwa yizo zonke iziphequluli ezidumile, ezihlanganiswe nesakhiwo nohlangothi lweseva (i-backend).
- I-ecosystem ethuthukisiwe. Kunenqwaba yezixazululo esezilungile endaweni yomphakathi.
- I-Rationality kanye nokusebenziseka kalula.
- Izinga eliphezulu lokusebenziseka.
- Ukufunda kalula. Ujwayela i-syntax ngokushesha.
Ulimi lubuye lube namaphutha amaningi, okuthi uma kuthanda, kugwenywe.
- Isidingo sezinhlaka ezengeziwe, imitapo yolwazi . Ukukhetha amathuluzi afanele akuwona umsebenzi olula. Kungenzeka ukuqonda ukuthi umtapo wolwazi okhethiwe ukulungele yini ukuxazulula inkinga ethile kuphela ngemva kokuwufundisisa.
- Ukuphatha ngokunganaki okuguquguqukayo, izinhlobo zedatha . I-typo encane ingaphula lonke uhlelo. Isibonelo, var Inombolo = 100; Inombolo = Inombolo + 1; Umbhalo uzobika ukuba khona kwe-typo kuphela ngesikhathi sokuthuthukiswa kwekhodi yohlelo. Kuzovela inkinga efanayo uma umdidiyeli ephambanisa irejista. Esinye isibonelo. Umhleli unqume ukubhala inombolo kokuguquguqukayo osekuvele kuqukethe iyunithi yezinhlamvu. Ngeke kube khona umlayezo wephutha kuleli cala. Kodwa umphumela uyoba kude nokulindelwe. Ungakwazi ukugwema izinkinga ezibalwe ngenhla ngokusebenzisa abahleli bekhodi. Inketho ethandwa kakhulu yi-Visual Studio Code.
- Ayilungele ukuthuthukisa izinhlelo zokusebenza zenethiwekhi (isoftware ebhekele ukusebenza kahle kwamanethiwekhi ekhompyutha ebhizinisi).
- I-JavaScript iwulimi lwamahhala lokubhala . Ngakho-ke, ngeke kube nzima kubahleli bohlelo abanolwazi ukushumeka ikhodi enonya kuyo. Namuhla, olunye lwezinhlobo ezivame kakhulu zokuhlasela umbhalo we-cross-site kusetshenziswa i-JavaScript. Isibonelo, ukuhlasela kwe-XSS kuwuhlobo lokuhlasela olufaka amakhodi anonya ezinhlelweni ze-inthanethi, luthathe indawo yezixhumanisi ezifihliwe / ezibonakalayo, okubaphoqe ukuthi bakhiphe idatha eshintshile, futhi babonise izikhangiso zabo kusayithi elimele.
https://articles.opexflow.com/programming/kak-stat-programmistom-s-nulya.htm Ukwenza lula imisebenzi eyinkimbinkimbi futhi wenze imisebenzi evamile, kunconywa ukusebenzisa imitapo yolwazi ye-JavaScript, okungamaqoqo ezindlela nemisebenzi eyenziwe ngomumo. . Kunemitapo yolwazi eminingi ye-JavaScript edaliwe. Ezinye zazo zenzelwe ukuxazulula izinkinga ezithile, njengokucubungula amafomu noma ukubala imisebenzi yezibalo. Ezinye ziqukethe amawijethi ajwayeleke kakhulu okudala izinhlelo zokusebenza ze-inthanethi ezigcwele kusetshenziswa ubuchwepheshe be-Ajax. Onjiniyela abanolwazi abasebenzisa amalabhulali enziwe ngomumo bangonga isikhathi esiningi. Futhi abasaqalayo bazothola ithuba lokuqalisa amaphrojekthi abangakakwazi ukuwabhala ngokwabo.
Isidingo solimi
Ukuduma kwe-JavaScript phakathi konjiniyela kuqinisekiswa izilinganiso zamazwe ngamazwe. Ngokwe-PYPL, ungomunye wabathathu abaphezulu.
I-Stack Overflow Association ibheka inombolo yemibuzo ehlobene ne-JS ezinkundleni zobuchwepheshe. Ngokwemiphumela yokuhlaziywa kwabo, iJavaScript ibonwa njengomholi ongenambangi.
I-W3Techs ibala inani lamaphrojekthi aqaliswe kusetshenziswa ubuchwepheshe obuthile. I-JS ayinazo izimbangi. Esigabeni sezixhumanisi zeklayenti, leli ithuluzi elicelwe kakhulu.
Inombolo enkulu yentuthuko esekelwe ku-JavaScript ibandakanyeka ngokuqondile endaweni ye-Frontind. Onjiniyela basebenzisa ngokugcwele imitapo yolwazi nezinhlaka ezingaba ngu-30. Izisombululo esezilungile nezifanekiso zemisebenzi ejwayelekile (enokuhlukahluka okuthile) zonga isikhathi esiningi, zenza inqubo ibe lula, futhi zehlise izindleko zamaphrojekthi. Okuvame kakhulu: Angular, Aurelia, Backbone.js, Ember.js, jQuery, Meteor.js, Node.js, Vue.js.
I-JS isetshenziswe kabanzi ekwakhiweni kwezinhlelo zokusebenza zeselula, ukuthuthukiswa kwe-backend, nezinhlelo zedeskithophu. Ukukhula okumangalisayo kwesidingo solimi lwe-JS nakho kwenziwa lula ukuthambekela kokwandisa ukusebenzisana kwamasayithi. [i-id yamagama-ncazo = “okunamathiselwe_7668” align = “aligncenter” wide = “610”]
Ukufunda ulimi lohlelo lwe-JavaScript kukuvumela ukuthi uxazulule le misebenzi elandelayo[/ amazwibela]
I-JavaScript kanye nezici eziyinhloko zokusetshenziswa kwayo
Ngaphambi kokufunda i-syntax yolimi, kufanele uqonde injongo yalo eyinhloko. Ngokuvamile, i-JS isetshenziswa uma kudingekile ukwenza uhlelo lokusebenza olusekelwe kusiphequluli, ukunikeza insiza ye-Inthanethi “ukuhamba”.
- Amakhasi anamandla kumawebhusayithi . Usebenzisa i-JavaScript, ungakha amathiphu, imiphumela ehlukahlukene egqwayizayo. Ikhodi ishumekwe ekhasini. Umbhalo usebenza ngokuqondile esipheqululini somsebenzisi. I-JS, CSS, HTML – isethi eyanele yamakhono onjiniyela wesimanje ongaphambili.
- Imidlalo, izinhlelo zokusebenza zewebhu . Isibonelo, iklayenti le-Gmail, i-Google Amamephu yenziwe nge-JS. Ukuze udale isihambi, ungasebenzisa i-HTML5, JS kanye nomtapo wolwazi osulungile.
- Izandiso Zesiphequluli . Ungabhala esakho isibali somsebenzi noma uhlelo oluzolandela ukuthi singakanani isikhathi esichithwa ukwenza izenzo ezithile.
- Iseva yewebhu . Esimeni esingemuva, i-JS iqhudelana nePython, PHP, nezinye izilimi. Inzuzo enkulu yikhono lokuthuthukisa iklayenti nezingxenye zeseva ngolimi olufanayo. Ukwakha i-backend ye-JS, abathuthukisi basebenzisa injini ye-Node.js.
- Ideskithophu (izinhlelo zokusebenza zedeskithophu) .
- Izicelo Zeselula . Lokhu akukona ukusetshenziswa okuvamile kwe-JavaScript. Kodwa inendawo okumele ibe kuyo, uma nje i-JS ikuvumela ukuthi udale izinhlelo zokusebenza ze-cross-platform. Ukuze wenze lokhu, ungasebenzisa uhlaka lwe-Ionic, React Native, PhoneGap.
Esinye isici esibalulekile ukusetshenziswa kwe-JS ekufundeni komshini ( ML) kanye ne-Artificial Intelligence (AI). Ukufunda ngomshini kusho ikhono lesistimu lokwenza izenzo ezithile ngaphandle kwemiyalo ethile. Ukwenza imisebenzi enjalo, ungasebenzisa uhlaka olufana ne-TensorFlow.js. Namuhla ungasebenzisa:
- ukudlulisa ukufunda;
- imodeli eqeqeshwe ngaphambilini;
- ukuthuthukisa imodeli yakho.
Cabanga, njengesibonelo, ukusetshenziswa kwemodeli eqeqeshwe ngaphambili. Ake sithi sidinga ukwakha iwebhusayithi ezohlaziya izithombe bese ikhetha lezo ezibonisa ikati. I-MobileNet iyisihlukanisi sezithombe esidumile. Itholakala ngefomethi yemodeli eqeqeshiwe kusukela ku-Tensorflow.js. Ikhodi elandelayo izovela kusayithi:
Engeza i-MobileNet ne-Tensorflow.js ekhanda lekhodi ye-HTML.
Umzimba ucacisa ingxenye yomdwebo esetshenziselwa ukuhlaziya.
Ikhodi ye-JavaScript yengezwe kuskripthi esizolayisha imodeli ye-MobileNet eqeqeshwe ngaphambilini ukuze ihlaziye izithombe ezicaciswe esithombeni.
Okukhiphayo kuzoba amalungu afanayo anezibikezelo ezintathu. Umphumela okungenzeka kakhulu uzofakwa ohlwini kuqala. Lena yindlela ongasebenzisa ngayo imodeli esivele iqeqeshiwe nge-Tensorflow.js. Udinga ukuqonda ukuthi kungathatha isikhathi ukuthi ilayishe esipheqululini. Kwesinye isikhathi ifinyelela imizuzwana eyi-10.
Ukuba nokwenzeka kokufunda i-JavaScript ngo-2022 – imibono yokuthuthukisa
I-JavaScript iyisisekelo lapho konke ukuthuthukiswa kwewebhu okuphambili kusekelwe khona. Ngayo, ungenza izenzo ezihlukahlukene futhi unqande imicimbi. Isibonelo, umsebenzisi uchofoza entweni yemenyu kuwebhusayithi. Umyalo wokuchofoza usebenzile. Okulandelayo, umsebenzi othile ubizwa ngokuthi: ukushintsha umbala wento esebenzayo, kusebenze iwindi le-modal. I-JavaScript isetshenziselwa ukwenza amakhasi esayithi ahlanganyele kakhulu, ukuvumela izivakashi ukuthi zihlanganyele nezinto ezihlukahlukene ezakhayo. Nge-JavaScript, ungakwazi ukwengeza inani elikhulu lezici eziwusizo ekhasini lewebhu. Ngokusebenzisa i-HTML, i-CSS ne-JS kuphela, abathuthukisi bangakha izinhlelo zokusebenza ezihlukahlukene. Isibonelo, imephu ezobuyekezwa ngesikhathi sangempela, imidlalo ye-inthanethi. Bheka isayithi elidumile le-Pinterest. Lapha, i-JavaScript isetshenziswa ngokugcwele ukwakha isixhumi esibonakalayo somsebenzisi esinobungane. Ngaphezu kwalokho, iJavaScript iwulimi lokuhlela oludume kakhulu emhlabeni. Futhi kungakhathaliseki izifiso zomsebenzi, lolu limi oluwusizo kakhulu kufanele lufundwe. Ulimi alukwazi ukulawulwa hhayi kuphela ngabahleli bewebhu abasaqalayo, kodwa futhi nezingane zesikole ukuze zithuthuke jikelele. Lokhu kwenziwa lula ukuqonda okunembile kwekhodi, ukuqondana kolimi, kanye nokuba lula kwe-syntax. I-JavaScript iwulimi olunezici ezilandelayo: Lokhu kwenziwa lula ukuqonda okunembile kwekhodi, ukuqondana kolimi, kanye nokuba lula kwe-syntax. I-JavaScript iwulimi olunezici ezilandelayo: Lokhu kwenziwa lula ukuqonda okunembile kwekhodi, ukuqondana kolimi, kanye nokuba lula kwe-syntax. I-JavaScript iwulimi olunezici ezilandelayo:
- Iyazwela kofeleba. Kunomehluko omkhulu phakathi kwemisebenzi ye-Func() kanye ne-func().
- Ukuba khona kwemisebenzi eyakhelwe ngaphakathi kanye nezinto.
- Isidingo se-semicolon ngemva kwabaqhubi.
- Ayizweli ezikhaleni. Ungasebenzisa inombolo ehlukile yokuhlehlisa ukufometha ikhodi.
I-JavaScript – isifundo esiphelele se-JS sabaqalayo, isifundo sevidiyo sokufunda kusukela ekuqaleni kanye nonjiniyela abanolwazi olunzulu: https://youtu.be/CxgOKJh4zWE
I-JavaScript iwulimi lokubhala. Iskripthi ikhodi yohlelo engadingi ukuthi icutshungulwe ngaphambi kokuthi iqaliswe. Ikhodi icutshungulwa yinjini yesiphequluli ngesikhathi sokulayisha ikhasi.
Kunenombolo yezinkombandlela eziyisisekelo ezingenza kube lula kakhulu inqubo yokufunda ulimi lwe-JavaScript.
- Okokuqala, udinga ukujwayela i-HTML ne-CSS. Akufanele uqale ukudala amasayithi, izinhlelo zokusebenza, amafomu nezinye izinto ze-inthanethi ngaphandle kokwazi okuyisisekelo.
- Funda izincwadi ezintsha. Ubuchwepheshe bolwazi buyathuthuka, ngakho ungazinaki izibuyekezo.
- Zama ukuzibhalela zonke izingxenye zohlelo. Uma bekumele uboleke ikhodi yomunye umuntu, funda ngokucophelela umugqa ngamunye.
- Sebenzisa ukulungisa iphutha. Ikhono elibaluleke kakhulu lanoma yimuphi umklami onolwazi ukuthola ngokushesha amaphutha nokushiyeka.
- Bhala ikhodi enhle. Ungazibi izindinganiso zokufometha. Yiqiniso, inani lezikhala noma ama-indent ngeke lithinte ikhwalithi yeskripthi, kodwa lizoqondakala futhi lifundeke. Nali amazwibela ekhodi embi.
- Zama ukuphawula ngezenzo ezibalulekile.
I-JavaScript iwulimi oselusetshenziswe kakhulu endaweni yokuhlela yewebhu. Lumunce amakhono ezilimi ezisebenzayo nezigxile entweni. Kodwa ungakhohlwa ukuthi ulimi luyithuluzi lonjiniyela, futhi into ebaluleke kakhulu ekubhaleni ikhodi kucatshangwa.
Ulwazi oluwusizo lonjiniyela abaphambili abangochwepheshe
I-React ilabhulali ye-JavaScript. Muva nje, isiphenduke indinganiso yokuthuthukiswa kwe-front-end. Lezi yizindaba ezinhle kubathuthukisi be-cross-platform. I-React Native inezinzuzo ezilandelayo:
- Ukunikezwa okusebenzayo nokuhlakaniphile okudweba kabusha izingxenye kuphela uma kunesidingo (uma isimo sishintsha).
- Ifilosofi enembile nelula kakhulu yokumemezela izifundazwe, imibono. Ikhodi iyafundeka, ibe yinhle futhi kulula ukuyisusa.
Ngamagama alula, i-React ivala igebe phakathi kwe-JS ne-HTML. Yenza isifundo esiyisisekelo se-JS ukusuka ku-A kuye ku-Z: https://youtu.be/GNrdg3PzpJQ Bambalwa abantu ababhala i-CSS emsulwa kulezi zinsuku. Sekuyisidingo sabathuthukisi abasezingeni eliphezulu ukuthi bafunde izilimi ezifana ne-Less noma i-Sass. Esinye isincomo ukuhlola izindlela ezitholakalayo zokwakha amakhasi aphendulayo. Lokhu kungenxa yenani elikhulu lezici zefomu zezinhlobonhlobo zamadivayisi (amaphilisi, ama-smartphones, ama-PC, njalonjalo). Kunemitapo yolwazi eminingi ye-JS ne-CSS etholakalayo ephatha kalula lolu hlobo lomsebenzi. Iningi lazo lisuselwa kuzinkombandlela ze-Material Design ye-Google. Kunemitapo yolwazi ehlobene nezihloko okufanele uzinake:
- ngokugunyazwa kwe-JSON Web Token;
- ngokwakhiwa kwe-Webpack ye-modular;
- ukuze uthole amasampula edatha futhi usebenze nge-Redux, Relay, Flux stream.
Inombolo enkulu yemitapo yolwazi iyatholakala ukuze kuthuthukiswe izinga lokusebenza, ukulungisa amaphutha, nokuphatha amaphrojekthi adaliwe. Namuhla, ukuze ube umthuthukisi odumile futhi ophumelelayo, akufanele afunde izinto eziyisisekelo kuphela, kodwa futhi akwazi ukukhetha / ukusebenzisa izimpumelelo zabanye ochwepheshe, eziklanywe ngendlela yemitapo yolwazi / izinhlaka. Ngosizo lwabo, ukuhamba komsebenzi kuzohamba ngokushesha kakhulu.
J’aiemerais une formation complète avec vous su JavaScript à partir d’un cas concrêt
Merci