JavaScript inguva yemazuva ano-chinangwa chekugadzirisa mutauro. Kushandisa kwayo hakugumiri kumabhurawuza ewebhu. Yakagadzirwa neziso rekubatanidza mune chero zvikumbiro uye nekugona kuita zvinyorwa. JavaScript yaifanirwa kuve mutauro wekunyora weNetscape. Pakutanga yainzi Mocha, uyezve LiveScript. Yakagamuchira zita rayo razvino muna Zvita 1995. Pakutanga kwenyanzvi kubva kuNetscape JavaScript yakamisikidzwa neECMA.
Inonyanya kushandiswa mumabhurawuza. JavaScript mutauro wekuita scripting. Kuwedzera kushanda, nekuunza zvinhu zvitsva, zvinokubvumira kuti uchinje zvinyorwa zvemagwaro mukati mehwindo rimwe chete (shandura HTML, CSS), sangana nevashandisi, maitiro, kuverenga uye kutarisa data. Yakamisikidzwa JavaScript inoita kuti zvinyorwa zvakanyudzwa muHTML kodhi yemapeji. Script processing inoitika otomatiki kana peji yaiswa pakombuta yemutengi. Mutauro wakamisikidzwa, izvo zvinofanirwa kuratidza kuenderana kwakanyanya pakati pemashandisirwo akasiyana. Asi mukuita, kuenderana hakuna kuwanikwa mumabhurawuza akasiyana, zvichiunza kunetseka kwakawanda kune vanogadzira.
Zvimiro uye zvinogumira zveJavaScript
Kubva pakuitwa kwayo kwekutanga, JavaScript yasvika kure. Iye zvino unogona kuishandisa kugadzira maapplication, shanda mubrowser ine muchina kudzidza (ML) uye AI modhi. Server-side JavaScript (node.js) inotenderwa. Zvinonyanya kukosha zvemutauro mubrowser:
- inokubvumira kushanda neCSS uye HTML (kuchinja, kuwedzera, kubvisa ruzivo);
- inopa kudyidzana nevashandisi pane peji (keystrokes, kudzvanya, kufambisa mbeva cursor);
- inoshandiswa kutumira zvikumbiro kune sevha, kurodha / kurodha mafaira (AJAX JS tekinoroji);
- inoshanda nemakuki.
Zvinorambidzwa:
- inoshanda mune yakavhurika tab, hapana mukana kune mamwe akavhurika tabo;
- kana JS isina kuvhura hwindo rebrowser, haizokwanisi kuivhara;
- hapana nzira yekuvanza iyo source code yepeji;
- hapana kuwana kune system mabasa eOS.
Iyo yakabatana nenzira mbiri: kuburikidza nekodhi pane peji uye kuburikidza nekunze faira. Muchiitiko chekutanga, unofanira kutsanangura <script>//Program body</script>. Kodhi kubva kufaira rekunze inosanganisirwa nemurairo <script src=”name.js”></script>
JavaScript ndiyo yakanakisa sarudzo yevachiri kuyaruka uye vanotanga mapurogiramu. Kubatsira kwayo kukuru ndiko kuwanda kwayo. Inotsigirwa mumabhurawuza ese, pane ese anoshanda masisitimu, nharembozha, makomputa emunhu. JavaScript application inoshanda isina kutanga yaiswa pamidziyo yevashandisi. Kana paine chishuwo chekuti chero munhu anogona kushandisa iyo yakagadzirwa module, saka JS ndiyo yakakodzera imwe nzira. Somuenzaniso, unofanira kuedza. Ndingaita sei kuti mibvunzo yangu yebvunzo ionekwe kune vamwe vanhu? Zvese zviri nyore. Kana JavaScript yakasarudzwa kugadzira kodhi, uye saiti yakajairwa inosarudzwa kuti igovere, dambudziko rinopera roga.
Kuzivikanwa kweJavaScript kunokonzerwa nehuwandu hukuru hwezvakanakira:
- Yakakosha pakuvandudza webhu. Zvinyorwa zvinotsigirwa nemabhurawuza ese anozivikanwa, akabatanidzwa nedhizaini uye server side (backend).
- Yakagadzirwa ecosystem. Kune nhamba huru yezvigadziriso zvakagadzirirwa munzvimbo yeruzhinji.
- Rationality uye nyore kushandisa.
- High level of usability.
- Kureruka kwekudzidza. Iwe unojairirwa kune syntax nekukurumidza.
Mutauro unewo zvikanganiso zvakawanda, izvo, kana zvichidiwa, zvinogona kunzvenga.
- Kudiwa kwemamwe marongero, maraibhurari . Kusarudza maturusi akakodzera harisi basa riri nyore. Zvinogoneka kunzwisisa kana raibhurari yakasarudzwa yakakodzera kugadzirisa rimwe dambudziko chete mushure mekutanga kuidzidza.
- Kusangwarira kubata kwakasiyana, mhando dzedata . Taipa diki inogona kutyora chirongwa chose. Somuenzaniso, var Nhamba = 100; Nhamba = Nhamba + 1; Iyo script inoshuma kuvepo kwe typo chete panguva yekuvandudzwa kwekodhi yepurogiramu. Dambudziko rakafanana richamuka kana mugadziri akavhiringidza rejista. Mumwe muenzaniso zvakare. Mugadziri wepurogiramu akafunga kunyora nhamba kune vhezheni inenge iine tambo. Pachave pasina meseji yekukanganisa mune iyi kesi. Asi chigumisiro chichave chiri kure kubva pane zvinotarisirwa. Unogona kudzivirira matambudziko akanyorwa pamusoro nekushandisa kodhi vapepeti. Iyo inonyanya kufarirwa sarudzo ndeye Visual Studio Code.
- Haina kukodzera kugadzira network application (software ine basa rekuita kweiyo bhizinesi komputa network).
- JavaScript mutauro wemahara wekunyora . Naizvozvo, hazvizove zvakaoma kune vane ruzivo vanogadzira kodhi yakashata mairi. Nhasi, imwe yemhando dzakajairika dzekurwiswa ndeyekuyambuka-saiti scripting uchishandisa JavaScript. Semuenzaniso, kurwiswa kweXSS imhando yekurwisa iyo inopinza kodhi ine hutsinye mumasisitimu eInternet, inotsiva yakavanzika / inooneka malink, ichivamanikidza kuti vape data rakachinja, uye kuratidza yavo kushambadzira pane yakakuvadzwa saiti.
https://articles.opexflow.com/programming/kak-stat-programmistom-s-nulya.htm Kurerutsa mabasa akaomarara uye kuita mabasa akajairika, zvinokurudzirwa kushandisa JavaScript raibhurari, inova miunganidzo yemaitiro akagadzirira-akagadzirwa uye mabasa. . Kune akawanda maraibhurari eJavaScript akagadzirwa. Mamwe acho akagadzirirwa kugadzirisa matambudziko chaiwo, akadai sekugadzirisa mafomu kana kuverenga mabasa emasvomhu. Mamwe ane majeti akajairika ekugadzira akazara-akazara Internet maapplication uchishandisa Ajax tekinoroji. Vagadziri vane ruzivo vanoshandisa maraibhurari akagadzirwa anogona kuchengetedza nguva yakawanda. Uye vanotanga vachawana mukana wekuita mapurojekiti avo vasati vakwanisa kunyora vega.
Kudiwa kwemutauro
Kuzivikanwa kweJavaScript pakati pevagadziri kunosimbiswa nemazinga epasi rese. Maererano nePYPL, ndiye mumwe wevatatu vepamusoro.
Iyo Stack Overflow Association iri kutarisa muhuwandu hwemibvunzo inoenderana neJS mumaforamu ehunyanzvi. Zvinoenderana nemhedzisiro yekuongorora kwavo, JavaScript inozivikanwa semutungamiri asina kupokana.
W3Techs inoverenga huwandu hwemapurojekiti anoitwa uchishandisa imwe tekinoroji. JS haina vakwikwidzi. Muchikamu chemutengi interfaces, ichi ndicho chinonyanya kukumbirwa chishandiso.
Nhamba huru yebudiriro yakavakirwa paJavaScript inobatanidzwa zvakananga munzvimbo yeFrontend. Vagadziri vanoshingairira kushandisa anenge makumi matatu maraibhurari nemafuremu. Yakagadzirirwa-yakagadzirwa mhinduro uye matemplate emabasa akajairwa (nemamwe masiyano) chengetedza nguva yakawanda, kurerutsa maitiro, uye kuderedza mutengo wemapurojekiti. Zvinonyanya kuzivikanwa: Angular, Aurelia, Backbone.js, Ember.js, jQuery, Meteor.js, Node.js, Vue.js.
JS yakashandiswa zvakanyanya mukugadzira nharembozha, kusimudzira kumashure, uye zvirongwa zvedesktop. Iko kukura kunoshamisa mukudiwa kwemutauro weJS zvakare kunofambiswa nemaitiro ekuwedzera kupindirana kwemasaiti.
Chimwe chinhu chakakosha kushandiswa kweJS pakudzidza muchina ( ML) uye hungwaru hwekugadzira (AI). Kudzidza kwemichina kunoreva kugona kwemasisitimu kuita zvimwe zviito pasina mirairo chaiyo. Kuti uite mabasa akadai, unogona kushandisa chimiro seTensorFlow.js. Nhasi unogona kushandisa:
- kutamisa kudzidza;
- muenzaniso wakadzidziswa kare;
- kugadzira yako modhi.
Funga, semuenzaniso, kushandiswa kwemuenzaniso wakadzidziswa kare. Ngatitii tinoda kugadzira webhusaiti inoongorora mifananidzo uye kusarudza iyo inoratidza katsi. MobileNet yakakurumbira mufananidzo classifier. Inowanikwa mune yakadzidziswa modhi fomati kubva kuTensorflow.js. Iyo inotevera kodhi ichaonekwa pane saiti:
Wedzera MobileNet uye Tensorflow.js kumusoro weHTML kodhi.
Mutumbi unotsanangura chinhu chemufananidzo chinoshandiswa pakuongorora.
JavaScript kodhi inowedzerwa kune iyo script inozoisa iyo yakambodzidziswa MobileNet modhi kusiyanisa mifananidzo yakataurwa mumufananidzo.
Iyo inobuda ichave yakarongwa ine fungidziro nhatu. Mhedzisiro inobvira ichatanga kunyorwa. Aya ndiwo mashandisiro aungaita modhi yakatodzidziswa neTensorflow.js. Iwe unofanirwa kunzwisisa kuti zvinogona kutora nguva kuti itakure mubrowser. Dzimwe nguva inosvika 10 seconds.
Iko kugona kwekudzidza JavaScript muna 2022 – budiriro maonero
JavaScript ndiyo nheyo iyo yese yekumberi-yekupedzisira webhu kuvandudzwa kwakavakirwa. Nayo, unogona kuita zviito zvakasiyana uye kubata zviitiko. Semuenzaniso, mushandisi anodzvanya pane chinhu chemenu pane webhusaiti. The click command yakashanda. Tevere, basa chairo rinonzi: kushandura ruvara rwechinhu chinoshanda, activate modal hwindo. JavaScript inoshandiswa kuita kuti mapeji esaiti awedzere kuwirirana, kubvumira vashanyi kuti vabatane nezvinhu zvakasiyana-siyana zvinovaka. NeJavaScript, unogona kuwedzera nhamba huru yezvinhu zvinobatsira kune peji rewebhu. Kushandisa chete HTML, CSS uye JS, vagadziri vanogona kugadzira akasiyana anoshanda maapplication. Semuenzaniso, mepu ichagadziridzwa munguva chaiyo, mitambo yepamhepo. Tarisa kune yakakurumbira saiti Pinterest. Pano, JavaScript inoshandiswa zvizere kugadzira ine hushamwari mushandisi interface. Uye zvakare, JavaScript ndiyo inonyanya kufarirwa mutauro wehurongwa munyika. Uye pasinei nezvishuvo zvebasa, uyu mutauro unobatsira zvikuru unofanira kudzidzwa. Mutauro unogona kugonekwa kwete chete nevatsva vewebhu programmers, asiwo nevana vechikoro pakukura kwese. Izvi zvinofambiswa nekunzwisisa kunzwisisika kwekodhi, kurongeka kwemutauro, uye kupfava kwechinyorwa. JavaScript mutauro une zvinotevera: Izvi zvinofambiswa nekunzwisisa kunzwisisika kwekodhi, kurongeka kwemutauro, uye kupfava kwechinyorwa. JavaScript mutauro une zvinotevera: Izvi zvinofambiswa nekunzwisisa kunzwisisika kwekodhi, kurongeka kwemutauro, uye kupfava kwechinyorwa. JavaScript mutauro une zvinotevera:
- Case sensitive. Pane musiyano mukuru pakati peFunc() uye func() mabasa.
- Kuvapo kweakavakirwa-mukati mabasa uye zvinhu.
- Kudiwa kwesemicolon mushure mevashandi.
- Haina hanya nenzvimbo. Iwe unogona kushandisa nhamba yakasiyana ye indents kuti uite kodhi.
JavaScript – yakazara JS kosi yevanotanga, vhidhiyo yekudzidzisa yekudzidza kubva mukutanga uye kune vane ruzivo vanogadzira: https://youtu.be/CxgOKJh4zWE
JavaScript mutauro wekunyora. Runyoro ikodhi yepurogiramu haidi kuti igadziriswe isati yatangwa. Iyo kodhi inogadziriswa neinjini yebrowser panguva yekurodha peji.
Pane akati wandei ekutanga nhungamiro anogona kurerutsa maitiro ekudzidza mutauro weJavaScript.
- Chokutanga pane zvose, unofanira kujairana neHTML uye CSS. Haufanire kutanga kugadzira masaiti, maapplication, mafomu uye zvimwe zvinhu zveInternet usingazive izvo zvekutanga.
- Dzidza mabhuku matsva. Tekinoroji yeruzivo iri kusimukira, saka usaregeredza zvigadziriso.
- Edza kunyora zvikamu zvose zvepurogiramu iwe pachako. Kana waifanira kukwereta kodhi yemumwe munhu, nyatso dzidza mutsara wega wega.
- Shandisa debugging. Unyanzvi hwakakosha hwechero mugadziri ane ruzivo ndeyekukurumidza kuwana zvikanganiso uye zvikanganiso.
- Nyora kodhi yakanaka. Usafuratira mafomati maitiro. Zvechokwadi, nhamba yezvimbo kana indents haizokanganisa kunaka kwechinyorwa, asi ichava inonzwisisika uye inoverengwa. Heino chidimbu chekodhi yakaipa.
- Edza kutaura pamusoro pezviito zvakakosha.
JavaScript mutauro wave kushandiswa zvakanyanya munzvimbo yewebhu hurongwa. Yakabata kugona kwemitauro inoshanda uye ine chinangwa. Asi usakanganwa kuti mutauro chishandiso chemugadziri, uye chinhu chakakosha pakunyora kodhi inofungidzirwa.
Ruzivo runobatsira kune nyanzvi dzekumberi-magumo vanogadzira
React iraibhurari yeJavaScript. Munguva pfupi yapfuura, yave chiyero chekusimudzira-mberi. Idzi inhau dzakanaka kune muchinjika-chikuva vanogadzira. React Native ine zvinotevera zvinobatsira:
- Kunyatsoita uye kungwara kupa kunongodhirowazve zvikamu kana zvichidikanwa (kana nyika yachinja).
- Intuitive uye yakapusa huzivi hwekuzivisa nyika, maonero. Iyo kodhi inoverengeka, yakanaka uye nyore kugadzirisa.
Mumashoko akareruka, React inovhara mukaha pakati peJS neHTML. React JS yakakosha kosi kubva A kusvika Z: https://youtu.be/GNrdg3PzpJQ Vanhu vashoma vanonyora yakachena CSS mazuva ano. Zvave kudikanwa kune nyanzvi dzemberi-yekupedzisira vanogadzira kudzidza mitauro yakaita seChishoma kana Sass. Imwe kurudziro ndeyekuongorora nzira dziripo dzekuvaka mapeji anoteerera. Izvi zvinokonzerwa nehuwandu hukuru hwemafomu emhando dzakasiyana-siyana dzemidziyo (mahwendefa, mafoni, maPC, zvichingodaro). Kune akawanda maJS neCSS maraibhurari aripo anobata zviri nyore rudzi urwu rwebasa. Mazhinji acho akavakirwa paGoogle Material Design nhungamiro. Kune maraibhurari ane hukama uye misoro yaunofanirwa kutarisisa:
- yeJSON Web Token mvumo;
- ye modular Webpack kuvaka;
- ye data sampling uye kushanda neRedux, Relay, Flux hova.
Huwandu hukuru hwemaraibhurari huripowo hwekukwirisa mwero wekuita, kugadzirisa, uye kugadzirisa mapurojekiti akagadzirwa. Nhasi, kuti uve mugadziri akakurumbira uye anoshanda kumberi-yekupedzisira, munhu haafanire kudzidza kwete chete zvakakosha, asi zvakare kugona kusarudza / kushandisa zvakabudirira zvevamwe nyanzvi, izvo zvakagadzirirwa muchimiro cheraibhurari / marongero. Nekubatsira kwavo, kufamba kwebasa kuchaenda nekukurumidza.
J’aiemerais une formation complète avec vous su JavaScript à partir d’un cas concrêt
Merci