1. Bayyana bambance-bambance tsakanin HTML, CSS, da JavaScript a ci gaban yanar gizo
Amsa: HTML harshe ne da ake amfani da shi don ƙirƙirar tsari da tsara abun ciki a shafin yanar gizon.
- CSS harshe ne na salo da ake amfani da shi don ayyana kamanni da tsarin shafin yanar gizon.
- JavaScript harshe ne na shirye-shirye da ake amfani da shi don ƙara hulɗa da sarrafa dabaru zuwa shafin yanar gizon.
2. Ta yaya kuke ƙirƙirar gidan yanar gizo mai amsawa?
Amsa: Don ƙirƙirar gidan yanar gizo mai amsawa, muna amfani da tambayoyin kafofin watsa labarai da dabarun CSS kamar raka'o'in auna ruwa, tsarin grid, da flexbox don dacewa da girman allo daban-daban. Hakanan muna amfani da tsarin ƙira mai sassauƙa, ƙudurin hoto iri-iri, da nunawa/ɓoye abubuwa dangane da girman allo.
3. Bayyana manufar box model
a cikin CSS.
Amsa: Samfurin akwatin a cikin CSS samfuri ne wanda ya haɗa da ainihin abubuwan ɓangarorin: iyaka, gefe, padding, da abun ciki. Kowane bangare yana samar da "akwatin" a kusa da abun ciki na kashi kuma yana bayyana sarari da matsayi na kashi akan shafin yanar gizon.
4. Ta yaya kuke aiki tare da tsarin CSS kamar Bootstrap?
Amsa: Don aiki tare da tsarin CSS kamar Bootstrap, mun haɗa da tsarin CSS da fayilolin JavaScript a cikin shafin yanar gizon mu. Zamu iya amfani da azuzuwan da aka riga aka ayyana da abubuwan da tsarin ke bayarwa don ƙirƙirar keɓancewa da hanzarta aiwatar da ci gaba.
5. Bayyana yadda AJAX ke aiki wajen aikawa da karɓar bayanai daga uwar garken
Amsa: AJAX(Asynchronous JavaScript da XML) yana ba mu damar aika buƙatun HTTP masu kama da juna daga shafin yanar gizon kuma mu karɓi martani daga uwar garken ba tare da sake loda dukkan shafin ba. Muna amfani da abu na XMLHttpRequest na JavaScript ko API ɗin ɗauko don ƙirƙirar buƙatu da sarrafa sakamakon da aka karɓa ta hanyoyi kamar GET ko POST.
6. Bayyana yadda ake amfani da tambayoyin kafofin watsa labarai a cikin CSS don ƙirƙirar gidan yanar gizo mai amsawa
Amsa: Tambayoyin Media a cikin CSS suna ba mu damar yin amfani da dokokin CSS daban-daban dangane da yanayi kamar girman allo, ƙuduri, da daidaitawar na'ura. Muna amfani da tambayoyin kafofin watsa labarai don ayyana yanayi da madaidaitan dokokin CSS waɗanda za a yi amfani da su idan waɗannan sharuɗɗan suka cika.
7. Ta yaya kuke inganta lokacin lodin shafi da aikin gidan yanar gizon?
Amsa: Don inganta lokacin lodin shafi da aikin gidan yanar gizon, zamu iya ɗaukar matakai da yawa kamar:
- Haɓaka da damfara CSS, JavaScript, da fayilolin hoto.
- Yi amfani da dabarun caching don adana albarkatu na ɗan lokaci a cikin mai lilo.
- Rage adadin buƙatun HTTP ta hanyar haɗa fayiloli da amfani da sprites hoto
- Yi amfani da hanyar sadarwa na isar da abun ciki(CDN) don rarraba nauyin gidan yanar gizon.
- Inganta HTML da tsarin CSS don tabbatar da ingantaccen lambar tushe da haɓakawa don SEO.
8. Yaya kuke tafiyar da abubuwan da ke faruwa a JavaScript? Bayyana amfanin addEventListener
Amsa: Don sarrafa abubuwan da suka faru a cikin JavaScript, muna amfani da hanyar addEventListener() don haɗa aikin mai kula da taron zuwa ɓangaren HTML. Misali:
const button = document.querySelector('#myButton');
button.addEventListener('click', function() {
// Event handling when the button is clicked
});
Hanyar addEventListener() tana ba mu damar tantance sunan taron(misali, 'danna', 'mouseover') da aikin mai sarrafa taron wanda za'a aiwatar lokacin da taron ya faru.
9. Ta yaya kuke ƙirƙirar tasirin motsi da motsi ta amfani da CSS da JavaScript?
Amsa: Don ƙirƙirar tasirin motsi da rayarwa ta amfani da CSS da JavaScript, za mu iya amfani da kaddarorin CSS kamar miƙa mulki, rayarwa, da canzawa don gyara abubuwan gani na wani yanki. Hakanan zamu iya amfani da JavaScript don sarrafa kaddarorin CSS da jawo tasirin rayarwa dangane da abubuwan da suka faru.
10. Bayyana ma'anar daidaitawar giciye-browser da yadda za a magance wannan batu a ci gaban yanar gizo
Amsa: Daidaituwar mai binciken giciye shine ikon gidan yanar gizo don yin aiki akai-akai da dogaro a cikin masu binciken gidan yanar gizo daban-daban. Don magance wannan batu, muna buƙatar gwadawa da tabbatar da gidan yanar gizon yana aiki yadda ya kamata akan masu bincike da yawa. Muna kuma buƙatar amfani da manyan dabarun haɓaka gidan yanar gizo, bin ƙa'idodin gidan yanar gizo, da iyakance amfani da fasalulluka waɗanda tsofaffin masu bincike ba su goyan bayansu.
11. Ta yaya kuke ƙirƙira da amfani da abubuwan sake amfani da su a cikin ci gaban Frontend?
Amsa: Don ƙirƙira da amfani da abubuwan sake amfani da su a cikin ci gaban Frontend, galibi muna amfani da ɗakunan karatu na UI kamar React, Vue, ko Angular. Muna gina sassa masu zaman kansu sannan mu yi amfani da su a sassa daban-daban na mahaɗin mai amfani. Wannan yana ƙara haɓakawa da sake amfani da lambar, yana sauƙaƙe ingantaccen sarrafa UI.
12. Bayyana yadda ake amfani da tags a cikin HTML da kuma dalilin da yasa suke da mahimmanci ga SEO
Amsa: Ana amfani da tags na Semantic a cikin HTML, kamar <header>, <nav>, <section>, < article>, <footer>, don ayyana ma'ana da tsarin abubuwa a cikin shafin yanar gizon. Suna sa lambar tushe ta zama abin karantawa da fahimta kuma suna ba da mahimman bayanai ga injunan bincike. Abubuwan da aka aiwatar da kyaututtukan ma'ana na iya haɓaka iyawar bincike da martabar gidan yanar gizon a cikin sakamakon bincike.
13. Ta yaya kuke inganta SEO akan gidan yanar gizon?
Amsa: Don inganta SEO akan gidan yanar gizo, zamu iya ɗaukar matakai da yawa, gami da:
- Ƙirƙirar tursasawa da ingantattun taken meta waɗanda suka haɗa da mahimman kalmomin da suka dace.
- Ƙirƙirar bayanan meta masu ban sha'awa waɗanda ke ba da taƙaitaccen taƙaitaccen abun ciki na shafi.
- Yin amfani da alamun taken da suka dace(h1, h2, h3) don samar da ingantaccen tsarin abun ciki.
- Haɓaka hotuna ta amfani da alt halaye da masu girma dabam.
- Ƙirƙirar hanyoyin haɗin ciki don haɓaka ganowa da crawlability.
- Zana URLs masu amfani-mai amfani da mahimmin kalmomi.
- Samar da inganci da abun ciki masu dacewa da ke niyya ga kalmomin da ake so.
14. Ta yaya kuke rike da tabbatar da bayanan shigar mai amfani a cikin fom ɗin yanar gizo?
Amsa: Don sarrafa da inganta bayanan shigar da mai amfani a cikin fom ɗin gidan yanar gizo, muna amfani da dabaru kamar JavaScript da PHP. A gefen abokin ciniki, muna amfani da JavaScript don aiwatar da ingantattun bayanai na lokaci-lokaci kai tsaye a cikin burauzar. A gefen uwar garken, muna amfani da PHP don aiwatarwa da sake inganta bayanan don tabbatar da tsaro da aminci.
15. Bayyana yadda ake amfani da magabata na CSS kamar SASS ko LESS da fa'idodin su a cikin ci gaban Frontend.
Amsa: Magabata na CSS kamar SASS(Syntactically Awesome Stylesheets) ko žasa(Leaner CSS) harsunan fadada CSS ne waɗanda ke ba da fasali mai ƙarfi da kayan aiki don rubuta CSS. Suna ƙyale mu mu yi amfani da maganganu, masu canji, ɗakuna, da mahaɗa don ƙirƙirar ƙarin abin karantawa, mai kiyayewa, da sake amfani da CSS. Amfani da magabata na CSS yana taimakawa haɓaka haɓakawa da sarrafa CSS yadda ya kamata a cikin manyan ayyukan Frontend.