IJavaScript lulwimi lwenkqubo lwangoku lwenjongo jikelele. Usetyenziso lwayo aluphelelanga kwiziphequluli zewebhu. Yenziwe ngeliso lokudityaniswa kuzo naziphi na izicelo kunye nokukwazi ukwenza izikripthi. IJavaScript bekufanele ibe lulwimi loshicilelo lweNetscape. Ekuqaleni yayibizwa ngokuba yi-Mocha, kwaye emva koko i-LiveScript. Yafumana igama layo langoku ngoDisemba 1995. Kwinyathelo leengcaphephe ezivela kwi-Netscape JavaScript yafakwa emgangathweni yi-ECMA.
Eyona isetyenziswa kakhulu kwizikhangeli zewebhu. IJavaScript lulwimi lwenkqubo yokubhala. Ukwandisa umsebenzi, ngokuzisa izinto ezintsha, kukuvumela ukuba utshintshe umxholo wamaxwebhu ngaphakathi kwefestile enye (ukutshintsha i-HTML, i-CSS), udibanise nabasebenzisi, inkqubo, ubale kwaye ukhangele idatha. IJavaScript elungisiweyo ivula izikripthi ezizinziswe kwikhowudi yeHTML yamaphepha. Uqhubekekiso lwescript lwenzeka ngokuzenzekelayo xa iphepha lilayishwe kwikhompyuter yomxhasi. Ulwimi lubekwe emgangathweni, ekufuneka lubonise ukuhambelana okugqwesileyo phakathi kophumezo olwahlukeneyo. Kodwa ekusebenzeni, ukuhambelana akufezeki kwiiphequluli ezahlukeneyo, kuzisa amaxhala amaninzi kubaprogram.
Iimpawu kunye nemida yeJavaScript
Ukusukela ekuphunyezweni kwayo kokuqala, iJavaScript ihambe indlela ende. Ngoku ungayisebenzisa ukwenza izicelo, sebenza kwisiphequluli ngokufunda ngomatshini (ML) kunye neemodeli ze-AI. I-JavaScript yecala lomncedisi (node.js) ivumelekile. Iimpawu eziphambili zolwimi kwibhrawuza:
- ikuvumela ukuba usebenze ngeCSS kunye neHTML (ukutshintsha, ukongeza, ukucima ulwazi);
- inikeza unxibelelwano nabasebenzisi kwiphepha (izitshixo, unqakrazo, ukuhambisa isalathisi semouse);
- isetyenziselwa ukuthumela izicelo kumncedisi, ukukhuphela / ukulayisha iifayile (iteknoloji ye-AJAX JS);
- isebenza ngeekuki.
Izithintelo:
- iyasebenza kwisithuba esivuliweyo, akukho fikelelo kwezinye iithebhu ezivuliweyo;
- ukuba i-JS ayizange ivule ifestile yesikhangeli, ayiyi kukwazi ukuyivala;
- akukho ndlela yokufihla ikhowudi yemvelaphi yephepha;
- akukho ukufikelela kwimisebenzi yenkqubo ye-OS.
Idibaniswe ngeendlela ezimbini: ngekhowudi kwiphepha kunye nefayile yangaphandle. Kwimeko yokuqala, kufuneka ucacise <script>//Umzimba weNkqubo</script>. Ikhowudi esuka kwifayile yangaphandle ibandakanywe nomyalelo <script src=”name.js”></script>
IJavaScript lolona khetho lulungileyo lolutsha kunye nabaqalayo benkqubo. Inzuzo yayo ephambili kukuxhaphaka kwayo. Ixhaswa kuzo zonke iiphequluli, kuzo zonke iinkqubo zokusebenza, izixhobo eziphathwayo, iikhompyuter zobuqu. Usetyenziso lweJavaScript lusebenza ngaphandle kokufakwa kuqala kwizixhobo zabasebenzisi. Ukuba kukho umnqweno wokuba nabani na angasebenzisa imodyuli eyenziweyo, ke i-JS yenye indlela efanelekileyo. Umzekelo, kufuneka uvavanye. Ndingayenza njani imibuzo yam yovavanyo ibonakale kwabanye abantu? Yonke into ilula kakhulu. Ukuba iJavaScript ikhethiwe ukwenza ikhowudi, kwaye indawo eqhelekileyo ikhethwa ukuhanjiswa, ingxaki iya kunyamalala ngokwayo.
Ukuthandwa kweJavaScript kungenxa yenani elikhulu leenzuzo:
- Ibalulekile kuphuhliso lwewebhu. Izikripthi zixhaswa zizo zonke iiphequluli ezidumileyo, ezidityaniswe noyilo kunye necala leseva (i-backend).
- Uphuhliso lwe-ikhosistim. Kukho inani elikhulu lezisombululo esele zenziwe kwindawo yoluntu.
- Ingqiqo kunye nokulula kokusetyenziswa.
- Inqanaba eliphezulu lokusebenziseka.
- Ukufunda ngokulula. Uqhelana nesintaksi ngokukhawuleza.
Olu lwimi lukwaneziphene ezininzi, ezinokuthi xa zifunwa, zithintelwe.
- Isidingo seenkqubo-sikhokelo ezongezelelweyo, amathala eencwadi . Ukukhetha izixhobo ezifanelekileyo akukho lula. Kuyenzeka ukuqonda ukuba ingaba ithala leencwadi elikhethiweyo likulungele na ukusombulula ingxaki ethile kuphela emva kokuphononongwa kwayo kwangaphambili.
- Ukuphathwa ngokungakhathali kweenguqu, iindidi zedatha . Itypo encinci inokwaphula yonke inkqubo. Umzekelo, var Number = 100; Inani = Inani + 1; Iskripthi siya kuxela ubukho betypo kuphela ngexesha lokuphuhliswa kwekhowudi yeprogram. Ingxaki efanayo iya kuvela ukuba umdwelisi weprogram ubhidanisa irejista. Omnye umzekelo. Umdwelisi wenkqubo ugqibe ekubeni abhale inani kwinguqu esele iqulethe umtya. Akusayi kubakho myalezo wemposiso kule meko. Kodwa umphumo uya kuba kude nolindelo. Unokuziphepha iingxaki ezidweliswe ngasentla ngokusebenzisa abahleli bekhowudi. Olona khetho ludumileyo yiKhowudi yeVisual Studio.
- Ayilunganga ukuphuhlisa usetyenziso lwenethiwekhi (isoftware enoxanduva lokusebenza ngokuchanekileyo kothungelwano lwekhompyuter yeshishini).
- IJavaScript lulwimi lokubhala lwasimahla . Ke ngoko, akuyi kuba nzima kubadwelisi benkqubo abanamava ukushumeka ikhowudi engalunganga kuyo. Namhlanje, enye yezona ntlobo zixhaphakileyo zohlaselo kukubhalwa kwe-cross-site scripting usebenzisa iJavaScript. Umzekelo, uhlaselo lwe-XSS luhlobo lohlaselo olufaka ikhowudi ekhohlakeleyo kwiinkqubo ze-Intanethi, zithatha indawo yekhonkco ezifihliweyo / ezibonakalayo, zibanyanzele ukuba bakhuphe idatha etshintshileyo, kwaye babonise iintengiso zabo kwindawo eyonakalisiweyo.
https://articles.opexflow.com/programming/kak-stat-programmistom-s-nulya.htm Ukwenza lula imisebenzi entsonkothileyo kwaye wenze imisebenzi eqhelekileyo, kuyacetyiswa ukuba kusetyenziswe iilayibrari zeJavaScript, eziyingqokelela yeendlela kunye nemisebenzi eyenziweyo. . Maninzi amathala eencwadi eJavaScript eyenziweyo. Ezinye zazo ziyilelwe ukusombulula iingxaki ezithile, ezinje ngeefomu zokusetyenzwa okanye ukubala imisebenzi yemathematika. Ezinye ziqulathe ezona widgets zixhaphakileyo zokudala usetyenziso olugcweleyo lwe-Intanethi kusetyenziswa ubuchwepheshe beAjax. Abaphuhlisi abanamava abasebenzisa amathala eencwadi asele enziwe bangonga ixesha elininzi. Kwaye abaqalayo baya kuba nethuba lokuphumeza iiprojekthi abangekakwazi ukuzibhala ngokwabo.
Imfuno yolwimi
Ukuthandwa kweJavaScript phakathi kwabaphuhlisi kuqinisekiswa ngamazinga aphesheya. Ngokutsho kwePYPL, ungomnye wabathathu abaphezulu.
I-Stack Overflow Association ijonge kwinani lemibuzo enxulumene ne-JS kwiiforamu zobungcali. Ngokweziphumo zohlalutyo lwabo, iJavaScript yamkelwa njengenkokeli engenakuphikiswa.
I-W3Techs ibala inani leeprojekthi eziphunyeziweyo kusetyenziswa iteknoloji ethile. I-JS ayinabo bakhuphisana nabo. Kwicandelo lojongano lomxhasi, esi sesona sixhobo siceliweyo.
Elona nani likhulu lophuhliso olusekwe kwiJavaScript libandakanyeka ngokuthe ngqo kwindawo yase Frontend. Abaphuhlisi basebenzisa ngokukhutheleyo malunga namathala eencwadi angama-30 kunye nesikhokelo. Izisombululo esele zilungisiwe kunye neetemplates zemisebenzi eqhelekileyo (kunye neenguqu ezithile) zigcina ixesha elininzi, zenze lula inkqubo, kwaye zinciphise iindleko zeeprojekthi. Ezona zixhaphakileyo: I-Angular, i-Aurelia, i-Backbone.js, i-Ember.js, i-jQuery, i-Meteor.js, i-Node.js, i-Vue.js.
I-JS isetyenziswe ngokubanzi ekudalweni kwezicelo zeselula, uphuhliso lwe-backend, kunye neenkqubo zedesktop. Ukukhula okumangalisayo kwimfuno yolwimi lwe-JS kukwaququzelelwa kukuthambekela kokwandisa ukusebenzelana kweziza.
Omnye umba obalulekileyo kukusetyenziswa kwe-JS yokufunda koomatshini ( ML) kunye nobukrelekrele bokwenziwa (AI). Ukufunda ngoomatshini kubhekisa ekukwazini kweenkqubo ukwenza izenzo ezithile ngaphandle kwemiyalelo ethile. Ukuphumeza imisebenzi enjalo, ungasebenzisa isakhelo esifana neTensorFlow.js. Namhlanje ungasebenzisa:
- ukudlulisela ukufunda;
- imodeli ebiqeqeshwe ngaphambili;
- ukuphuhlisa imodeli yakho.
Ngokomzekelo, khawucinge ngokusetyenziswa komfuziselo owawuqeqeshwe ngaphambili. Masithi kufuneka siphuhlise iwebhusayithi eya kuhlalutya imifanekiso kwaye ikhethe ezo zibonisa ikati. I-MobileNet ngumdlali wemifanekiso odumileyo. Ifumaneka ngefomathi yemodeli eqeqeshiweyo ukusuka kwi-Tensorflow.js. Le khowudi ilandelayo iya kuvela kwisiza:
Yongeza i-MobileNet kunye ne-Tensorflow.js kwintloko yekhowudi ye-HTML.
Umzimba uchaza into esetyenziselwe uhlalutyo.
Ikhowudi yeJavaScript yongezwa kwiskripthi esiza kulayisha imodeli ye-MobileNet eqeqeshwe ngaphambili ukwahlula imifanekiso ekhankanyiweyo kumfanekiso.
Imveliso iya kuba luluhlu kunye neengqikelelo ezintathu. Esona siphumo sinokwenzeka siya kudweliswa kuqala. Le yindlela onokuthi usebenzise ngayo imodeli esele iqeqeshiwe nge-Tensorflow.js. Kuya kufuneka uqonde ukuba kungathatha ixesha ukuba ilayishe kwibhrawuza. Ngamanye amaxesha ifikelela kwimizuzwana eyi-10.
Ukuba nokwenzeka kokufunda iJavaScript ngo-2022 – iimbono zophuhliso
IJavaScript sisiseko apho lonke uphuhliso lwewebhu lwangaphambili lusekwe. Ngayo, unokwenza iintshukumo ezahlukeneyo kunye nokuthintela imicimbi. Umzekelo, umsebenzisi ucofa into yemenyu kwiwebhusayithi. Umyalelo wokucofa usebenze. Okulandelayo, umsebenzi othile ubizwa ngokuba: ukutshintsha umbala wento esebenzayo, kusebenze ifestile yemodal. IJavaScript isetyenziselwa ukwenza amaphepha esayithi asebenze ngakumbi, ukuvumela iindwendwe ukuba zidibanise nezinto ezahlukeneyo ezakhayo. NgeJavaScript, unokongeza inani elikhulu leempawu eziluncedo kwiphepha lewebhu. Ukusebenzisa kuphela i-HTML, i-CSS kunye ne-JS, abaphuhlisi banokudala iinkqubo ezahlukeneyo zokusebenza. Umzekelo, imephu eya kuhlaziywa ngexesha langempela, imidlalo ye-intanethi. Jonga kwindawo edumileyo yePinterest. Apha, iJavaScript isetyenziswa ngokupheleleyo ukwenza ujongano lomsebenzisi olunobuhlobo. Ukongeza, iJavaScript lolona lwimi ludumileyo lwenkqubo emhlabeni. Kwaye kungakhathaliseki ukuba unqwenela ntoni na, olu lwimi luluncedo lufanele lufundwe. Ulwimi lunokulawulwa kungekuphela ngabadwelisi bewebhu abaqalayo, kodwa nangabantwana besikolo kuphuhliso jikelele. Oku kuququzelelwa kukuqonda okuqondakalayo kwekhowudi, ukuba nengqiqo kolwimi, kunye nokulula kwesintaksi. IJavaScript lulwimi olunezi mpawu zilandelayo: Oku kuququzelelwa kukuqonda okuqondakalayo kwekhowudi, ukuba nengqiqo kolwimi, kunye nokulula kwesintaksi. IJavaScript lulwimi olunezi mpawu zilandelayo: Oku kuququzelelwa kukuqonda okuqondakalayo kwekhowudi, ukuba nengqiqo kolwimi, kunye nokulula kwesintaksi. IJavaScript lulwimi olunezi mpawu zilandelayo:
- Case sensitive. Kukho umahluko omkhulu phakathi kweFunc() kunye nefunc() imisebenzi.
- Ubukho bemisebenzi eyakhelweyo kunye nezinto.
- Isidingo sesemikholoni emva kwabaqhubi.
- Ukungabi naluvelwano kwizithuba. Ungasebenzisa inani elahlukileyo le-indenti ukufomatha ikhowudi.
IJavaScript-ugqibezele ikhosi ye-JS yabaqalayo, isifundo sevidiyo sokufunda ukusuka ekuqaleni kunye nabaphuhlisi abanamava ngakumbi: https://youtu.be/CxgOKJh4zWE
IJavaScript lulwimi lokubhala. Iscript yikhowudi yeprogram engafuneki ukuba iqhutywe ngaphambili phambi kokuba isungulwe. Ikhowudi icutshungulwa yi-injini yesikhangeli ngexesha lokulayisha iphepha.
Kukho inani lezikhokelo ezisisiseko ezinokwenza lula kakhulu inkqubo yokufunda ulwimi lweJavaScript.
- Okokuqala, kufuneka uqhelane neHTML kunye neCSS. Akufanele uqale ukwenza iisayithi, izicelo, iifom kunye nezinye izinto ze-Intanethi ngaphandle kokwazi iziseko.
- Funda uncwadi olutsha. Itekhnoloji yolwazi iyaphuhla, ngoko ke musa ukulutyeshela uhlaziyo.
- Zama ukubhala zonke iinxalenye zeprogram ngokwakho. Ukuba bekufuneka uboleke ikhowudi yomnye umntu, funda ngokucophelela umgca ngamnye.
- Sebenzisa ukulungisa ingxaki. Ikhono elibaluleke kakhulu kunoma yimuphi umdwelisi onamava kukufumana ngokukhawuleza iimpazamo kunye neentsilelo.
- Bhala ikhowudi entle. Musa ukuyihoya imigangatho yokufomatha. Ngokuqinisekileyo, inani lezithuba okanye i-indents ayiyi kuchaphazela umgangatho weskripthi, kodwa iya kuqondakala ngakumbi kwaye ifundeke. Nali isiqwengana sekhowudi embi.
- Zama ukuphawula ngezenzo ezibalulekileyo.
IJavaScript lulwimi oluye lwasetyenziswa ngokubanzi kwindawo yenkqubo yewebhu. Iye yafunxa isakhono seelwimi ezisebenzayo nezijolise kwinto. Kodwa ungakulibali ukuba ulwimi sisixhobo somphuhlisi, kwaye eyona nto ibalulekileyo kwikhowudi yokubhala icingelwa.
Ulwazi oluluncedo kubaphuhlisi abachwephesha bangaphambili
IReact yilayibrari yeJavaScript. Kutshanje, ibe ngumgangatho wophuhliso lwangaphambili. Ezi ziindaba ezimnandi kubaphuhlisi beqonga elinqamlezileyo. IReact Native inezi zibonelelo zilandelayo:
- Unikezelo olusebenzayo nolukrelekrele oluzoba kwakhona amacandelo xa kuyimfuneko (ukuba imeko iyatshintsha).
- Ifilosofi enengqondo kwaye elula kakhulu yokubhengeza amazwe, iimbono. Ikhowudi iyafundeka, intle kwaye kulula ukuyilungisa.
Ngamagama alula, i-React ivala umsantsa phakathi kwe-JS kunye ne-HTML. Thatha ikhosi esisiseko ye-JS ukusuka ku-A ukuya ku-Z: https://youtu.be/GNrdg3PzpJQ Bambalwa abantu ababhala i-CSS esulungekileyo kwezi ntsuku. Kuye kwaba yimfuneko kubaphuhlisi abachwephesha bangaphambili ukuba bafunde iilwimi ezinje ngeNcinci okanye iSass. Enye ingcebiso kukuphonononga iindlela ezikhoyo zokwakha amaphepha aphendulayo. Oku kungenxa yenani elikhulu leefom zezinto ezahlukeneyo zezixhobo (iitafile, ii-smartphones, iiPC, njalo njalo). Kukho iilayibrari ezininzi ze-JS kunye ne-CSS ezikhoyo eziphatha lula olu hlobo lomsebenzi. Uninzi lwazo lusekwe kwizikhokelo zoYilo lweMathiriyeli zikaGoogle. Kukho amathala eencwadi anxulumeneyo kunye nezihloko ekufuneka uziqwalasele:
- kugunyaziso lweJSON Web Token;
- kwimodyuli yeWebpack yokwakha;
- isampula yedatha kunye nokusebenza kunye neRedux, Relay, Flux streams.
Inani elikhulu lamathala eencwadi ayafumaneka ukulungiselela inqanaba lokusebenza, ukulungisa iimpazamo, kunye nokulawula iiprojekthi ezenziweyo. Namhlanje, ukuze ube ngumphuhlisi odumileyo nosebenzayo, umntu kufuneka afunde kungekuphela nje izinto ezisisiseko, kodwa abe nako ukukhetha / ukusebenzisa impumelelo yezinye iingcali, eziyilwe ngohlobo lwamathala eencwadi / izikhokelo. Ngoncedo lwabo, ukuhamba komsebenzi kuya kuhamba ngokukhawuleza.
J’aiemerais une formation complète avec vous su JavaScript à partir d’un cas concrêt
Merci