Uhlobo olusha lukaRuby 6 lufika ngokusekelwa kwemininingwane eminingi

ama-ruby-on-rails-6

Ezinsukwini ezithile ezedlule URuby on Rails development team ukhiphe inguqulo 6 Uhlaka lweRuby lwezinhlelo zokusebenza zewebhu. Le nguqulo iletha izici eziningi ezintsha nezinguquko ezilindelwe kakhulu ngumphakathi.

Izici ezintsha ezinkulu kule nguqulo yama-Rails zigxile ekusebenzeni kwama-imeyili angenayo nge-Action Mailbox, ukuxhuma kulwazi oluhlukahlukene, njll. Ngokwengeziwe, ojantshi manje bachaza iWebpack njengephakheji ezenzakalelayo yeJavaScript. URuby 6 ukhishwe ngezici nezinguquko ezilindelwe kakhulu. Kunezici eziningi ezibalulekile ezifakiwe kuRails 6 ukuthuthukisa izinhlelo zakho zokusebenza nokusiza ukuthi ugcine isikhathi sentuthuko esibalulekile.

Ruby on Rails 6 avelele

Enye yezinto ezibalulekile ezizothakazelisa konjiniyela abaningi bohlelo lokusebenza ngokungangabazeki i- ukusekelwa kwemininingwane eminingi, okuhlanganisiwe futhi okulungele ukusetshenziswa.

Lesi sici sivumela uhlelo lokusebenza olulodwa ukuxhuma kalula kwizizinda eziningi ngasikhathi sinye.

Lokhu Abathuthukisi bazuza kakhulu ngokumane bahlukanise ukufunda / ukubhala ngemininingwane ephindaphindwayo ukwenza ngcono ukusebenza.

Ngokusho kwethimba lentuthuko:

noma yini ofuna ukuyenza, kune-API entsha elula yokukufeza. Futhi, ukukwazi ukwenza lokhu ngendlela elula kungakongela isikhathi esiningi ngesikhathi sokuthuthukiswa kohlelo lwakho lokusebenza.

Ngokufika kwale nguqulo entsha igqamisa isici se-Action Mailbox esivumela ama-imeyili angenayo ukuhanjiswa kusilawuli, njengamabhokisi eposi azocutshungulwa kojantshi

Ngamanye amagama, ibhokisi leposi le-Action likuvumela ukuthi uhambise ama-imeyili angenayo emabhokisini eposi afana nalawo wesilawuli.

Ibhokisi leposi le-Action lifaka okufakiwe kwe-Mailgun, Mandrill, Postmark ne-SendGrid. Ungaphatha futhi ama-imeyili angenayo ngqo ngokufakwa kwe-Exim, Postfix ne-Qmail okwakhelwe ngaphakathi.

I-Webpack njengephakheji ezenzakalelayo yeJavaScript

Njengokujwayelekile kwe-de facto enezinhlaka eziningi zesimanje zeJavaScript zentuthuko engaphambili, Ojantshi 6 bangeze iWebpack njengephakheji ezenzakalelayo yeJavaScript nge-Webpacker Gem, esikhundleni sephothifoliyo ye-Rails yezimpahla.

Lokhu kungabonakala njengokungezwa okulula, kepha kungahamba ibanga elide. Ngamanye amagama, i-Webpack izosiza abathuthukisi kancane, ngoba iqembu lokuthuthukisa oMzila lithe lisasebenzisa ukufakwa kwepayipi nge-Sprockets ye-CSS nezimpahla ezimile.

Ngokusho kwethimba, bobabili bahlangana kahle kakhulu futhi banikela ngesivumelwano esihle kakhulu phakathi kokusebenza okuthuthukile kweJavaScript kanye nendlela esebenzela ezinye izimpahla.

Ikhebula lesenzo

Esinye isici esiphawulekayo sale nguqulo yama-Rails ukufika kwe-»Action Text» function. okukuvumela ukuthi ulethe okuqukethwe nokuhlelwa kombhalo ocebile kumaRails.

Kufaka umhleli we-Trix ephatha yonke into kusuka ekufomeni kuya kuzixhumanisi kuya kuzilinganiso nakuhlu, izithombe ezishumekiwe nemipheme.

I-Trix yiphrojekthi yomthombo ovulekile evela ku-Basecamp, abenzi beRuby on Rails. Zonke izithombe ezishumekiwe (noma okunye okunamathiselwe) zigcinwa ngokuzenzakalela kusetshenziswa isitoreji esisebenzayo futhi zihambisana nesifanekiso se-RichText esifakiwe.

Ngakolunye uhlangothi, I- "Action Cable" ingesinye sezici ezibaluleke kakhulu ezivele koLoliwe 5. Ikhebula lesenzo kuthuthukisiwe kojantshi 6 ukuhlinzeka ngokusebenza okwengeziwe.

Ngakho-ke, ithimba lokuthuthukisa uhlaka likhombisile ukuthi manje kungenzeka ukuhlola i-Action Cable kunoma yiliphi izinga: ukuxhumana, iziteshi nemifudlana.

Ukuhlolwa kokuxhumeka kukusiza uqinisekise ukuthi ama-ID wokungena anikezwa kahle noma uma izicelo zokungena ngemvume ezingalungile zenqatshwa. Ukuhlolwa kwesiteshi kungabhalwa ukubheka ukuthi abasebenzisi bayakwazi yini ukubhalisela iziteshi nokuthi isiteshi sinokusakazwa yini.

Okokugcina UZeitwerk uqale ngesifiso sokwakha i-autoloader yamaRails 6. Kanjalo, I-Zeitwerk manje isilayidi entsha ye-Ruby. Ngesakhiwo sefayela esijwayelekile, IZeitwerk ilayisha amakilasi namamojula ngokufunwa, okusho ukuthi awudingi ukubhala izingcingo eziyimpoqo zamafayela akho.

Uma ufuna ukwazi kabanzi ngakho, ungaxhumana isixhumanisi esilandelayo.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe.

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.