JavaScript ndi chiyankhulo chamakono chogwiritsa ntchito mapulogalamu ambiri. Kugwiritsa ntchito kwake sikungokhala pa asakatuli. Idapangidwa ndi diso lophatikizika ndi mapulogalamu aliwonse komanso kuthekera kolemba zolemba. JavaScript imayenera kukhala chilankhulo cha Netscape. Poyamba ankatchedwa Mocha, ndiyeno LiveScript. Inalandira dzina lake lapano mu December 1995. Pakuchita kwa akatswiri ochokera ku Netscape JavaScript idakhazikitsidwa ndi ECMA. [id id mawu = “attach_7684” align = “aligncenter” wide = “760”]
Brendan Icke, bambo wa JavaScript[/caption] Amagwiritsidwa ntchito kwambiri pakusakatula intaneti. JavaScript ndi chilankhulo cholemba mapulogalamu. Kukulitsa ntchito, poyambitsa zinthu zatsopano, kukulolani kuti musinthe zomwe zili m’malemba mkati mwawindo limodzi (kusintha HTML, CSS), kuyanjana ndi ogwiritsa ntchito, ndondomeko, kuwerengera ndi kufufuza deta. JavaScript yophatikizidwa imatsegula zolembedwa zomwe zili mu code ya HTML yamasamba. Kukonza script kumachitika zokha tsambalo litayikidwa pa kompyuta ya kasitomala. Chilankhulocho ndi chokhazikika, chomwe chiyenera kusonyeza kugwirizana kwakukulu pakati pa machitidwe osiyanasiyana. Koma muzochita, kuyanjana sikutheka mu asakatuli osiyanasiyana, kubweretsa nkhawa zambiri kwa opanga mapulogalamu.
Zomwe zili ndi malire a JavaScript
Chiyambireni kukhazikitsidwa koyamba, JavaScript yapita kutali. Tsopano mutha kuyigwiritsa ntchito kupanga mapulogalamu, gwiritsani ntchito msakatuli wokhala ndi makina ophunzirira (ML) ndi mitundu ya AI. JavaScript ya mbali ya seva (node.js) ndiyololedwa. Zofunikira zazikulu zachilankhulo mu msakatuli:
- amakulolani kugwira ntchito ndi CSS ndi HTML (kusintha, kuwonjezera, kuchotsa zambiri);
- imapereka kulumikizana ndi ogwiritsa ntchito patsamba (makiyi, kudina, kusuntha cholozera cha mbewa);
- amagwiritsidwa ntchito kutumiza zopempha kwa seva, kutsitsa / kukweza mafayilo (ukadaulo wa AJAX JS);
- amagwira ntchito ndi makeke.
Zoletsa:
- yogwira pa tabu yotseguka, osapeza ma tabo ena otseguka;
- ngati JS sanatsegule zenera la osatsegula, silingathe kutseka;
- palibe njira yobisira magwero a tsamba;
- palibe mwayi wogwiritsa ntchito machitidwe a OS.
Zimalumikizidwa m’njira ziwiri: kudzera mu code patsamba komanso fayilo yakunja. Pachiyambi choyamba, muyenera kutchula <script>//Program body</script>. Khodi yochokera ku fayilo yakunja ikuphatikizidwa ndi lamulo <script src=”name.js”></script>
JavaScript ndiye chisankho chabwino kwambiri kwa achinyamata komanso oyambitsa mapulogalamu. Ubwino wake waukulu ndikufalikira kwake. Imathandizidwa mu asakatuli onse, pamakina onse ogwiritsira ntchito, zida zam’manja, makompyuta amunthu. Mapulogalamu a JavaScript amagwira ntchito asanakhazikitsidwe pazida za ogwiritsa ntchito. Ngati pali chikhumbo choti aliyense agwiritse ntchito gawo lopangidwa, ndiye kuti JS ndi njira ina yoyenera. Mwachitsanzo, muyenera kuyesa. Kodi ndingatani kuti mafunso anga oyesa awonekere kwa anthu ena? Zonse ndi zophweka. Ngati JavaScript yasankhidwa kuti ipange code, ndipo tsamba wamba lasankhidwa kuti ligawidwe, vutoli lizimiririka palokha.
Kutchuka kwa JavaScript ndi chifukwa cha zabwino zambiri:
- Zofunikira pakukulitsa intaneti. Zolemba zimathandizidwa ndi asakatuli onse otchuka, ophatikizidwa ndi masanjidwe ndi mbali ya seva (backend).
- Ecosystem yopangidwa. Pali njira zambiri zomwe zapangidwa kale pagulu la anthu.
- Zomveka komanso zosavuta kugwiritsa ntchito.
- Mkulu msinkhu wogwiritsa ntchito.
- Kumasuka kuphunzira. Mumazolowera mawu mwachangu.
Chilankhulocho chilinso ndi zolephera zingapo, zomwe, ngati zingafunike, zimatha kupewedwa.
- Kufunika kowonjezera zowonjezera, malaibulale . Kusankha zida zoyenera sikophweka. N’zotheka kumvetsetsa ngati laibulale yosankhidwayo ili yoyenera kuthetsa vuto linalake pokhapokha mutaphunzira koyambirira.
- Kusamalira mosasamala za mitundu, mitundu ya data . Kulemba pang’ono kungathe kuswa pulogalamu yonse. Mwachitsanzo, var Number = 100; Nambala = Nambala + 1; Script ifotokoza za kupezeka kwa typo pokhapokha pakupanga kachidindo ka pulogalamu. Vuto lofananalo lidzabuka ngati wopanga mapulogalamu asokoneza kaundula. Chitsanzo china. Wopanga pulogalamuyo adaganiza zolemba nambala yosinthika yomwe ili kale ndi chingwe. Sipadzakhala uthenga wolakwika pankhaniyi. Koma zotsatira zake zidzakhala kutali ndi ziyembekezo. Mutha kupewa mavuto omwe atchulidwa pamwambapa pogwiritsa ntchito ma code editors. Njira yotchuka kwambiri ndi Visual Studio Code.
- Sikoyenera kupanga mapulogalamu a netiweki (mapulogalamu omwe amayang’anira magwiridwe antchito oyenera pamakompyuta apakompyuta).
- JavaScript ndi chilankhulo cholembera chaulere . Chifukwa chake, sizikhala zovuta kwa opanga mapulogalamu odziwa bwino kuyikamo code yoyipa. Masiku ano, imodzi mwa mitundu yofala kwambiri yowukira ndi kulemba mawebusayiti pogwiritsa ntchito JavaScript. Mwachitsanzo, kuwukira kwa XSS ndi mtundu wa kuwukira komwe kumalowetsa ma code oyipa pa intaneti, kulowetsa maulalo obisika / owoneka, kuwakakamiza kuti apereke zomwe zasinthidwa, ndikuwonetsa zotsatsa zawo patsamba lowonongeka.
https://articles.opexflow.com/programming/kak-stat-programmistom-s-nulya.htm Kuti muchepetse ntchito zovuta komanso kuchita ntchito wamba, tikulimbikitsidwa kugwiritsa ntchito malaibulale a JavaScript, omwe ndi mndandanda wa njira ndi ntchito zomwe zidapangidwa kale. . Pali malaibulale ambiri opangidwa ndi JavaScript. Ena amapangidwa kuti athetse mavuto enaake, monga mafomu okonza kapena kuwerengera masamu. Zina zili ndi ma widget omwe amapezeka kwambiri popanga mapulogalamu athunthu pa intaneti pogwiritsa ntchito ukadaulo wa Ajax. Madivelopa odziwa kugwiritsa ntchito malaibulale opangidwa okonzeka amatha kusunga nthawi yambiri. Ndipo oyamba kumene adzakhala ndi mwayi wokhazikitsa mapulojekiti omwe sanathe kulemba okha.
Kufuna chinenero
Kutchuka kwa JavaScript pakati pa omanga kumatsimikiziridwa ndi mavoti apadziko lonse lapansi. Malinga ndi PYPL, iye ndi m’modzi mwa atatu apamwamba.
Bungwe la Stack Overflow Association likuyang’ana kuchuluka kwa mafunso okhudzana ndi JS m’mabwalo a akatswiri. Malinga ndi zotsatira za kusanthula kwawo, JavaScript imadziwika kuti ndi mtsogoleri wosatsutsika.
W3Techs imawerengera kuchuluka kwa mapulojekiti omwe akugwiritsidwa ntchito pogwiritsa ntchito ukadaulo wina. JS ilibe opikisana nawo. Mu gawo la zolumikizira kasitomala, ichi ndiye chida chofunsidwa kwambiri.
Chiwerengero chachikulu kwambiri chazitukuko chochokera ku JavaScript chikukhudzidwa mwachindunji kudera la Frontend. Madivelopa ntchito mwakhama 30 malaibulale ndi frameworks. Mayankho okonzeka okonzeka ndi ma tempulo a ntchito zokhazikika (zosiyanasiyana) zimapulumutsa nthawi yambiri, kufewetsa ndondomekoyi, ndikuchepetsa mtengo wantchito. Ambiri: Angular, Aurelia, Backbone.js, Ember.js, jQuery, Meteor.js, Node.js, Vue.js.
JS yakhala ikugwiritsidwa ntchito kwambiri popanga mafoni a m’manja, chitukuko cha backend, ndi mapulogalamu apakompyuta. Kukula kodabwitsa kwa kufunikira kwa chilankhulo cha JS kumathandizidwanso ndi chizolowezi chowonjezera kuyanjana kwamasamba. [id id mawu = “attach_7668” align = “aligncenter” wide = “610”]
Kuphunzira chinenero cha JavaScript kumakuthandizani kuthetsa ntchito zotsatirazi[/ mawu]
JavaScript ndi mbali zazikulu za ntchito yake
Musanaphunzire kalembedwe ka chinenero, muyenera kumvetsa cholinga chake chachikulu. Nthawi zambiri, JS imagwiritsidwa ntchito ngati pakufunika kupanga pulogalamu yotsatsira osatsegula, kuti apatse intaneti “kuyenda”.
- Masamba amphamvu pamasamba . Pogwiritsa ntchito JavaScript, mutha kupanga zida, zojambula zosiyanasiyana. Khodiyo imayikidwa pa tsamba. Zolemba zimagwira ntchito mwachindunji mumsakatuli wa wogwiritsa ntchito. JS, CSS, HTML – luso lokwanira kwa wopanga mapulogalamu amakono.
- Masewera, mapulogalamu a pa intaneti . Mwachitsanzo, kasitomala wa Gmail, Google Maps amapangidwa ndi JS. Kuti mupange woyenda, mutha kugwiritsa ntchito HTML5, JS ndi laibulale yopangidwa kale.
- Zowonjezera Zamsakatuli . Mutha kulemba zowerengera zanu kapena pulogalamu yomwe imasunga nthawi yayitali bwanji kuchita zinthu zina.
- Seva yapaintaneti . M’malo akumbuyo, JS imapikisana ndi Python, PHP, ndi zilankhulo zina. Ubwino waukulu ndikutha kukulitsa gawo la kasitomala ndi seva m’chinenero chomwecho. Kuti apange JS backend, opanga amagwiritsa ntchito injini ya Node.js.
- Mapulogalamu apakompyuta (mapulogalamu apakompyuta) .
- Mobile Applications . Izi sizomwe zimagwiritsidwa ntchito kwambiri ndi JavaScript. Koma ili ndi malo oti ikhale, pokhapokha chifukwa JS imakulolani kuti mupange mapulogalamu amtundu uliwonse. Kuti muchite izi, mutha kugwiritsa ntchito mawonekedwe a Ionic, React Native, PhoneGap.
[id id mawu = “attach_7665” align = “aligncenter” width = “722”]
Zida zatsopano ndi mwayi wogwiritsa ntchito javascript zimawoneka chaka chilichonse, ndipo ubwino umenewu ndi wosatsutsika[/caption] Mbali ina yofunika ndikugwiritsa ntchito JS pophunzira makina ( ML) ndi Artificial Intelligence (AI). Kuphunzira pamakina kumatanthauza kuthekera kwa machitidwe kuchita zinthu zina popanda malangizo enieni. Kuti mugwiritse ntchito ntchitoyi, mutha kugwiritsa ntchito chimango monga TensorFlow.js. Masiku ano mungagwiritse ntchito:
- kusamutsa maphunziro;
- chitsanzo chophunzitsidwa kale;
- kupanga chitsanzo chanu.
Taganizirani, mwachitsanzo, kugwiritsa ntchito chitsanzo chophunzitsidwa kale. Tiyerekeze kuti tifunika kupanga webusaiti yosanthula zithunzi ndi kusankha zosonyeza mphaka. MobileNet ndi gulu lodziwika bwino la zithunzi. Imapezeka mumtundu wophunzitsidwa bwino kuchokera ku Tensorflow.js. Khodi yotsatirayi iwonekera patsambali:
Onjezani MobileNet ndi Tensorflow.js pamutu wa nambala ya HTML.
Thupi limatchula chinthu chomwe chimagwiritsidwa ntchito powunikira.
Khodi ya JavaScript imawonjezedwa ku script yomwe idzatsegule mtundu wa MobileNet wophunzitsidwa kale kuti uwone zithunzi zomwe zafotokozedwa pachithunzichi.
Zotsatira zake zimakhala ndi zolosera zitatu. Chotsatira chomwe chikuyembekezeka kwambiri chidzatchulidwa poyamba. Umu ndi momwe mungagwiritsire ntchito chitsanzo chophunzitsidwa kale ndi Tensorflow.js. Muyenera kumvetsetsa kuti zingatenge nthawi kuti ilowe mu msakatuli. Nthawi zina amafika masekondi 10.
Kuthekera kwa kuphunzira JavaScript mu 2022 – malingaliro achitukuko
JavaScript ndiye maziko omwe chitukuko chonse chakumapeto kwa intaneti chimakhazikitsidwa. Ndi iyo, mutha kuchita zinthu zosiyanasiyana ndikusokoneza zochitika. Mwachitsanzo, wosuta amadina chinthu cha menyu patsamba. Dinani lamulo linagwira ntchito. Kenako, ntchito inayake imatchedwa: kusintha mtundu wa chinthu chogwira, kuyambitsa zenera la modal. JavaScript imagwiritsidwa ntchito kupanga masamba atsambalo kuti azitha kulumikizana, kulola alendo kuti azilumikizana ndi zinthu zosiyanasiyana zomanga. Ndi JavaScript, mutha kuwonjezera zinthu zambiri zothandiza patsamba. Pogwiritsa ntchito HTML, CSS ndi JS yokha, opanga amatha kupanga mapulogalamu osiyanasiyana. Mwachitsanzo, mapu omwe asinthidwa munthawi yeniyeni, masewera a pa intaneti. Onani tsamba lodziwika bwino la Pinterest. Apa, JavaScript imagwiritsidwa ntchito mokwanira kupanga mawonekedwe osavuta ogwiritsira ntchito. Kuphatikiza apo, JavaScript ndiye chilankhulo chodziwika kwambiri padziko lonse lapansi. Ndipo mosasamala kanthu za zokhumba za ntchito, chinenero chothandiza kwambirichi chiyenera kuphunziridwa. Chilankhulochi chikhoza kuphunzitsidwa osati ndi olemba mapulogalamu a pa intaneti okha, komanso ndi ana asukulu kuti apite patsogolo. Izi zimatheka chifukwa cha kumveka bwino kwa kachidindo, kulingalira kwa chinenero, ndi kuphweka kwa kalembedwe. JavaScript ndi chilankhulo chomwe chili ndi izi: Izi zimatheka chifukwa cha kumveka bwino kwa kachidindo, kulingalira kwa chinenero, ndi kuphweka kwa kalembedwe. JavaScript ndi chilankhulo chomwe chili ndi izi: Izi zimatheka chifukwa cha kumveka bwino kwa kachidindo, kulingalira kwa chinenero, ndi kuphweka kwa kalembedwe. JavaScript ndi chilankhulo chomwe chili ndi izi:
- Zotengera makulidwe azilembo. Pali kusiyana kwakukulu pakati pa Func () ndi func () ntchito.
- Kukhalapo kwa ntchito zomangidwa ndi zinthu.
- Kufunika kwa semicolon pambuyo pa ogwira ntchito.
- Zopanda chidwi ndi malo. Mutha kugwiritsa ntchito ma indents osiyanasiyana kuti mupange ma code.
JavaScript – maphunziro athunthu a JS oyamba kumene, maphunziro apakanema ophunzirira kuyambira poyambira komanso opanga odziwa zambiri: https://youtu.be/CxgOKJh4zWE
JavaScript ndi chilankhulo cholembera. Script ndi kachidindo ka pulogalamu yomwe sifunikira kukonzedwa kale isanayambike. Khodiyo imakonzedwa ndi injini ya osatsegula pakutsegula masamba.
Pali malangizo angapo ofunikira omwe angathandize kwambiri kuphunzira chilankhulo cha JavaScript.
- Choyamba, muyenera kudziwa HTML ndi CSS. Simuyenera kuyamba kupanga masamba, mapulogalamu, mafomu ndi zinthu zina zapaintaneti popanda kudziwa zoyambira.
- Phunzirani mabuku atsopano. Zipangizo zamakono zikukula, choncho musanyalanyaze zosintha.
- Yesani kulemba mbali zonse za pulogalamuyi nokha. Ngati mumayenera kubwereka nambala ya munthu wina, phunzirani mosamala mzere uliwonse.
- Gwiritsani ntchito debugging. Luso lofunika kwambiri la wolemba mapulogalamu aliyense wodziwa zambiri ndikupeza mwamsanga zolakwika ndi zolakwika.
- Lembani code yokongola. Musanyalanyaze miyezo ya masanjidwe. Zoonadi, chiwerengero cha malo kapena ma indents sichidzakhudza khalidwe la script, koma lidzakhala lomveka bwino komanso losavuta kuwerenga. Nawu kagawo kakang’ono ka code yoyipa.
- Yesani kuyankhapo pa zochita zofunika.
JavaScript ndi chilankhulo chomwe chakhala chikugwiritsidwa ntchito kwambiri pamapulogalamu apa intaneti. Latengera luso la zilankhulo zogwira ntchito komanso zongotengera zinthu. Koma musaiwale kuti chilankhulo ndi chida cha oyambitsa, ndipo chofunikira kwambiri polemba kachidindo ndikuganiziridwa.
Zambiri zothandiza kwa akatswiri opanga patsogolo
React ndi laibulale ya JavaScript. Posachedwapa, wakhala muyezo wa chitukuko chakumapeto. Iyi ndi nkhani yabwino kwa opanga nsanja. React Native ili ndi izi:
- Kumasulira koyenera komanso kwanzeru komwe kumangojambulanso zigawo zikafunika (ngati dziko lisintha).
- Lingaliro lachilengedwe komanso losavuta kwambiri pakulengeza mayiko, malingaliro. Khodiyo imakhala yowerengeka, yokongola komanso yosavuta kuyisintha.
M’mawu osavuta, React imatseka kusiyana pakati pa JS ndi HTML. Pangani maphunziro ofunikira a JS kuyambira A mpaka Z: https://youtu.be/GNrdg3PzpJQ Ndi anthu ochepa omwe amalemba CSS yoyera masiku ano. Zakhala zofunikira kwa akatswiri otsogola kuti aphunzire zilankhulo ngati Zochepa kapena Sass. Lingaliro lina ndikufufuza njira zomwe zilipo zopangira masamba omvera. Izi ndichifukwa cha kuchuluka kwa mawonekedwe amitundu yosiyanasiyana ya zida (mapiritsi, mafoni am’manja, ma PC, ndi zina). Pali malaibulale ambiri a JS ndi CSS omwe amatha kugwira ntchito zamtunduwu mosavuta. Ambiri aiwo amatengera malangizo a Google Material Design. Pali malaibulale okhudzana ndi mitu yomwe muyenera kulabadira:
- pa chilolezo cha JSON Web Token;
- pakumanga kwa Webpack modular;
- pa zitsanzo za data ndikugwira ntchito ndi Redux, Relay, Flux mitsinje.
Ma library ambiri amapezekanso kuti athe kuwongolera magwiridwe antchito, kukonza zolakwika, ndikuwongolera mapulojekiti opangidwa. Masiku ano, kuti mukhale wotchuka komanso wogwira ntchito kutsogolo, munthu sayenera kuphunzira zoyambira zokha, komanso kusankha / kugwiritsa ntchito zomwe akatswiri ena adakwaniritsa, zomwe zidapangidwa ngati malaibulale / makonda. Ndi chithandizo chawo, ntchitoyo idzapita mofulumira kwambiri.
J’aiemerais une formation complète avec vous su JavaScript à partir d’un cas concrêt
Merci