Key Takeaways
- Electron yog cov ntaub qhwv uas khiav cov vev xaib ua cov apps hauv koj lub computer.
- Cov ntawv hla-platform no yooj yim dua thiab nrawm dua los tsim.
- Cov apps tsis tshua zoo li polished lossis kev koom ua ke raws li kev txhawb nqa apps.
Web apps muaj thoob plaws hauv internet, thiab tam sim no lawv tau hla koj lub computer.
"Electron" yog lub npe uas tuaj yeem muab txawm tias cov neeg siv Mac feem ntau ua rau muaj kev ntxhov siab. Nws yog ib txoj hauv kev rau cov neeg tsim khoom sau lawv cov app ib zaug, thiab kom nws khiav ntawm Windows, Mac, thiab hauv web browser. Tab sis qhov ntawd yog vim Electron apps tau khiav hauv qhov browser, Chromium-based browser zais ua ib qho app. Thiab tam sim no Agile Bits, tus tsim tawm ntawm 1Password, tab tom ditching nws official Mac app rau Electron. Qhov ntawd tsis zoo li ntawd, yog vim li cas tib neeg thiaj npau taws?
"Ua tsaug rau lub cav Chromium, nrog rau Electron, cov apps tau ua haujlwm zoo li lawv tab tom khiav hauv browser. Txawm li cas los xij, qhov no muaj tus nqi: CPU siab thiab RAM siv piv rau [kev txhawb nqa] apps, "web -app tsim tawm Burak Özdemir hais rau Lifewire ntawm email.
Ntau Electrons, Ntau Teeb meem
Özdemir hits txoj cai ntawm qhov taw tes. Qhov teeb meem loj tshaj plaws nrog Electron, los ntawm qhov ua tau zoo ntawm qhov pom, yog nws siv koj lub computer cov peev txheej. Nws khiav lub web browser, nrog rau ntau qhov kev txhawb nqa ntxiv, rau txhua qhov Electron app koj siv.
Cov browsers no noj qhov tsis txaus ntseeg ntawm koj lub computer ua haujlwm nco, thiab them se rau CPU. Hauv luv luv, koj lub computer yuav kub dua thiab siv zog ntau dua, yog li tso koj lub roj teeb sai dua.
Developers khawb Electron vim nws ua haujlwm tsawg. Koj tsuas yog yuav tsum sau lub app ib zaug, thiab nws ua haujlwm ntawm txhua lub platform uas txhawb nqa Electron.
Tab sis tej zaum koj tsis quav ntsej txog qhov ntawd. Tej zaum koj siv lub desktop loj, muaj zog uas ib txwm txuas rau lub zog, thiab koj tsis quav ntsej txog hluav taws xob. Qhov ntawd coj peb mus rau qhov thib ob-thiab tej zaum tseem ceeb tshaj-yog vim li cas cov neeg siv Mac tsis nyiam Electron.
Txhua lub khoos phis tawj platform muaj qhov zoo thiab xav tau. Ntawm Mac, dialog boxs tag nrho zoo tib yam. Cov keyboard shortcuts zoo ib yam ntawm cov apps, tus yuam sij ⌘ coj mus rau ib qho app nyiam qhov rais, thiab lwm yam.
Electron apps rhuav tshem qhov sib xws, txawm hais tias lawv sim tsis txhob-lawv txhais cov ntawv ceeb toom thiab cov ntawv qhia zaub mov rau hauv cov platform uas cuam tshuam, tab sis tag nrho cov qauv tsim ntawm cov apps tsis tshua ua raws li cov lus pom zoo hauv lub platform. Qhov no zoo li tsis muaj kev zam yog tias koj tab tom tsim ib qho app uas khiav ntawm ob lub Windows thiab macOS-koj tsis tuaj yeem haum rau ntawm ob lub platforms.
Pom, Electron apps feem ntau coj tsis zoo li lawv cov khoom sib xyaw ua ke. Slack Mac app, piv txwv li, ua txhua yam ntawm cov khoom txawv txawv thaum koj coj mus rhaub cov yuam sij xub, lossis siv cov txheej txheem keyboard shortcuts rau hauv koj cov ntawv ntaus ntawv. Thiab tsis muaj tus qauv nyiam vaj huam sib luag-koj tau txais nplooj ntawv web hloov.
Vim li cas cov neeg tsim khoom siv nws
Developers khawb Electron vim nws ua haujlwm tsawg. Koj tsuas yog yuav tsum sau lub app ib zaug, thiab nws ua haujlwm ntawm txhua lub platform uas txhawb nqa Electron. Qhov ntawd yog qhov txiaj ntsig tseem ceeb thaum koj tab tom tsim kev pib. Niaj hnub no, lub vev xaib, nws tus kheej, feem ntau yog thawj lub platform, nrog cov apps rau Mac, Windows, lossis Linux hauv qhov chaw thib peb tom qab iPhone, iPad, thiab Android.
"Ntau tus tsim tawm yuav siv Electron rau Mac-raws li apps vim tias lub moj khaum tso cai rau ib tus lej rau lub app ib zaug thiab xa mus rau macOS," network engineer Eric McGee hais rau Lifewire ntawm email. "Lub moj khaum no tseem muab rau cov neeg siv nplua nuj interface rau lub desktop apps ua rau nws."
Electron txoj kev loj hlob kuj yog ib qho yooj yim rau cov neeg uas twb ua lub web apps. Nws siv tib lub thev naus laus zis-HTML, CSS, thiab JavaScript-yog li tsis tas yuav kawm hom lus tshiab, lossis ntiav cov neeg tsim khoom tshiab uas paub lawv.
iPhone First
Yog vim li cas ho tsis siv Electron ntawm lub xov tooj ntawm tes, thiab? Cov neeg tsim khoom yuav nyiam qhov ntawd, thiab nws yuav yog ib txoj haujlwm tsawg dua ua, tab sis Electron tsuas yog tsis zoo txaus.
"[Electron] siv ntau RAM, thiab xav tau ntau qhov chaw cia, uas ua rau nws xaiv tsis zoo rau iOS apps uas yuav tsum tau ceev, hnyav, thiab tso siab tsawg ntawm RAM," hais. McGee.
Lwm qhov laj thawj yog Apple tsis tso cai. Apple ua rau lub neej nyuaj rau cov neeg tsim khoom xa Electron apps rau Mac App Store, tab sis nws muaj peev xwm ua tau, thiab nws kuj yooj yim rau rub tawm lub app thiab nruab ncaj qha.
Qhov teeb meem loj tshaj plaws nrog Electron, los ntawm qhov ua tau zoo ntawm qhov pom, yog nws siv koj lub computer cov peev txheej.
Ntawm iOS, Apple tsis tso cai rau ib qho apps los khiav lawv tus kheej lub vev xaib ua haujlwm. Ntawd yog, cov apps tsuas tuaj yeem siv WebKit, uas yog lub zog Safari. Txawm tias qhov tseeb web browsers ntawm iOS-Chrome, Firefox, Brave-tag nrho siv WebKit es tsis txhob ntawm lawv tus kheej tech.
Qhov ntawd txhais tau tias koj tsis tuaj yeem khiav Chromium rov qab-kawg xav tau los ntawm Electron apps, uas, dhau los, yuam cov neeg tsim khoom los tsim cov apps kom raug.
Electron tej zaum yuav tsis mus qhov twg - tsis yog thaum lub vev xaib thiab xov tooj tseem yog thawj lub platform rau cov kev pabcuam thiab cov apps. Tab sis qhov ntawd tsis tau txhais hais tias koj yuav tsum nyiam Electron apps, los yog cia lawv chug koj lub roj teeb thaum ua phem rau koj lub computer. Tej zaum lo nrog cov ntawv thov kev txhawb nqa uas koj tuaj yeem ua tau.