ComputersProgramming

Yuav ua li cas yog "Ruby" (Ruby)? Cov programming lus "Ruby"

Thaum lub caij, muaj ntau ntau yam programming lus, txhua tus uas muaj nws tus kheej cov yam ntxwv thiab tej kev cai. Qhov tsab xov xwm tsom rau ib tug ntawm lawv.

Lub keeb kwm ntawm lub Ruby hom lus

Ruby raws li ib tug programming lus muaj tau nyob ib ncig ntawm ib tug ntev heev lub sij hawm. Ua hauj lwm rau tus thawj tsab ntawm no tsis tshua nrov lus hnub no hnub rov qab mus rau 1993 thiab cov thawj nom version yog los ntawm 1995. Lub creator ntawm cov lus, Yukihiro Matsumoto, yog ib tug neeg txhawb programming txij thaum lub hnub ntawm tus menyuam kawm ntawv lub cev, tab sis lub tswv yim ntawm kev tsim lawv tus kheej ntsuas nws tshwm sim ntau npaum li cas tom qab ntawd. Yog li ntawd yog dab tsi thiaj li zoo kawg li hais txog qhov no programming lus uas niaj hnub no nws occupies ib tug uas txoj hauj lwm nyob rau hauv lub ntiaj teb no nyob ntev ntawm software txoj kev loj hlob?

Ruby hom lus programming - yog ib tug txhais high-qib lus nrog dynamic typing thiab ywj siab ntawm runtime kev siv ntawm multithreading. Nws muaj ib tug khib nyiab collector, thiab nyob rau hauv specifics ntawm lub syntax nws feem ntau zoo approximates rau hom lus xws li Perl. Nrog rau txoj kev loj hlob ntawm lub ecosystem, qhov no platform kuj borrowed ib tug heev los ntawm Smalltalk, Nab hab sej, Lisp thiab lwm yam cajmeem lus. Nws yog ib qho tseem ceeb heev rau lub hav zoov thiab tas mus li txoj kev loj hlob yog qhov tseeb hais tias cov lus "Ruby" thiab nws cov kev siv yog kiag li dawb. Qhov no txhais tau tias leej twg yuav qhia cov kev hloov, thiab yog hais tias lawv yog txais los ntawm lub zej zog, nws yuav tsum muaj nyob rau hauv lub tom ntej no version ntawm cov lus.

Ruby philosophy

Thaum tsim lawv cov offspring, Matsumoto, raws li ib tug mob siab kiv cua thiab txhawb kwv-taw qhia kom paub programming, nws tau tsim ib tug tej yam philosophy rau programmers uas xav mus kawm lawv yam lus. Yog li ntawd, Ruby hom lus programming uas tsim tau rau kev tsim tej yam yooj yim, thiab nyob rau tib lub sij hawm kom nkag siab daim ntaub ntawv. Ruby qhia ntau txog yog tsis nyob rau cov kev ceev ntawm qhov kev pab cuam, thiab lub simplicity thiab readability ntawm code.

Yog li ntawd, qhov no platform yog feem ntau xaiv raws li lub tswv yim rau cov kev qhia programming. Cov ntsiab cai tseem ceeb, uas yog raws li nyob rau hauv cov lus, yog li no-hu ua hauv paus ntsiab lus ntawm "tsawg kawg surprise" - qhov no txhais tau tias qhov kev pab cuam yuav tsum coj raws li yuav tsum los ntawm tus sau (programmer) los ntawm nws. Ib qho tseem ceeb ib feem ntawm cov lus ideology uas coj lub creator, yog ib tug zoo variability nws. Cov tib yam yuav ua tau tiav nyob rau hauv ntau txoj kev thiab kev khiav dej num. Vim li no, txhua programmer yuav daws tau qhov teeb meem raws li nws deems feem ntau tsim nyog thiab yooj yim. Qhov no zoo heev pab cov lus lub koob meej nrog cov tub txawg nyob rau hauv lub teb ntawm cov ntaub ntawv technology.

Lub ntsiab yam ntxwv ntawm cov lus

Yuav ua li cas yog "Ruby" raws li ib tug programming lus? Qhov no yog feem ntau ib tug kwv-taw qhia kom paub hom lus. Yog tsis muaj txheej thaum ub hom - tag nrho cov lug thiab units ntawm cov ntaub ntawv yog khoom (nyob rau hauv sib piv rau tib lub Java hom lus, nws muaj ib tug txheej thaum ub cov ntaub ntawv lug). Txhua muaj nuj nqi nyob rau hauv lub "Ruby" yog ib txoj kev. Muaj ntau ntawm cov yam ntxwv thiab muaj peev xwm nkag tau rau creators los ntawm lwm programming lus, ces peb yuav xyuam xim hais tias Ruby (lus) sib txuas ntxiv ntawm qhov zoo tshaj plaws los ntawm ib tug ntau yam ntawm lwm yam lus thiab technologies.

Yog li ntawd, piv txwv li, nyob rau hauv lub ecosystem "Ruby" nws muaj nws tus kheej khib nyiab collector, lub tswv yim ntawm cov uas twb borrowed los ntawm Java thiab Smalltalk, thiab hais tias muaj peev xwm ua hauj lwm nrog tag nrho cov khoom nyob rau hauv lub system. Qhov no mechanism tso cai rau lub muag pom tsis tau tus neeg siv thiab daim ntawv thov tsim tawm ua tej yam khoom uas yog tsis nyob rau hauv kev thov. Cov khib nyiab collector tso cai tus tsim tawm nyob rau hauv feem ntau tus neeg mob tsis yog distracted los ntawm lub cim xeeb kev tswj ntawm kev siv thiab ua kom pom tseeb rau functionality thiab usability.

lus paradigms

Teb rau ib lo lus nug txog dab tsi yog qhov "Ruby" raws li ib tug multi-paradigm lus, koj yuav tau mam li nco dheev pom nws tus kheej nyob rau hauv lub tshav kub ntawm kev tsis sib haum. Tom qab tag nrho, cov lus no tso cai rau koj mus siv ib yam ntawm cov programming paradigms Attendance kev vam meej: ib tug txheej txheem style ntawm programming, kwv-taw qhia kom paub thiab haumxeeb mus kom ze. Cov tsim tawm yog kev ywj siab xaiv rau lawv tus kheej lub tswv yim uas yog los ze zog mus rau nws, thiab nws cov cuab yeej ntawm qhov no yuav tsis tau txwv txiav los yog weaker. Cov programming lus "Ruby" tsuas xav kom qhov kev xaiv no.

Yog vim li cas rau lub chaw

Ntau ntau cov lus no kuj nrov vim lub simplicity ntawm txoj kev loj hlob ntawm ntau yam hloov. Yog li ntawd, tus xov tooj ntawm coj thiab cov tsev qiv ntawv muaj tas li loj hlob, thiab cov paub tab hais tias lawv txiav txim siab rau lawv tus kheej, cia developers rau kom sai nqa cov khoom mus npaj raws li txoj cai. Heev feem ntau cov "Ruby" -programming yog txuam nrog rau cov kev loj hlob ntawm web daim ntaub ntawv thiab txhawb cov hauj lwm ntawm lub ntau qhov chaw thiab Internet platforms. Qhov no me me lus coj nws cov simplicity thiab ceev ntawm txoj kev loj hlob. Tom qab tag nrho lwm txoj kev platforms (xws li, Java), yuav tsum tau ntau npaum li cas kev paub thiab kev los daws kom tau teeb meem tib yam.

nrov coj

Yog hais tias peb tham txog nrov coj uas muaj nyob rau hauv kev ua lag luam niaj hnub no, cov lawv sawv tawm ntsia. Muaj coob tus neeg, thaum nug txog dab tsi yog qhov "Ruby", intuitively hais RubyOnRails. Cov teeb no ntawm software Cheebtsam ua ib tug kev lag luam txheem cov developers. Nws lossi tswj, tsim thiab complemented los ntawm lub zej zog ntawm programmers, thaum uas seem free. Qhov no lub moj khaum qhia txog cov web daim ntawv thov Cheebtsam raws li ib feem ntawm lub MVC qauv (Model-View-maub), tab sis kuj muaj npaj txhij-ua koom ua ke nrog rau daim ntawv thov neeg rau zaub mov thiab ib qho interface mus saib tau cov database. Cov 3 lub Cheebtsam, nyob rau hauv qhov tseeb, cia ib tug li ob peb teev los sau ntawv thiab khiav ib tug yooj yim blog nyob rau hauv Internet los yog ib tug private web page.

Lub Ruby hom lus programming, koj muaj peev xwm txawm tsim haiv neeg mobile daim ntaub ntawv, ua tsaug RubyMotion tsev qiv ntawv. Nws tso cai rau koj mus ua Ruby code rau iOS no platforms, OS X thiab Android. Nws yog tsim los ntawm ib tug private pab pawg neeg ntawm developers, li ntawd rau nws siv yuav tsum tau them, tab sis nws ib zaug dua qhia tus nplua nuj possibilities lus.

Qhov tseem ceeb ntawm kev sau ntawv ntsuam xyuas

Ib qho tseem ceeb ib feem ntawm lub ecosystem ntawm lub Ruby hom lus, thiab nws cov web-based qhov chaw yog freymovrki cov tsev qiv ntawv thiab sau ntawv ntsuam xyuas. RubyOnRails philosophy qhia BDD (cwj pwm coj-tsav txoj kev loj hlob), uas txhais tau tias cov thawj programmer tsim ib tug sib lawv liag ntawm kev ntsuam xyuas uas qhia txog cov kev tsim tus cwj pwm ntawm qhov kev pab cuam, thiab ces tsim lub code uas yuav tsum tau mus dhau cov kev xeem. Unofficial txheem nyob rau hauv cov cheeb tsam no yog RSpec - qhov no moj khaum tso cai rau koj sau kev kuaj mob mus rau to taub, txawm rau inexperienced cov neeg siv kom tsim.

Ruby Gems

Tsaug uas tau piav nyob rau hauv kom meej cov qauv uas yuav tsum tau ua raws li nrog tag nrho cov pob thiab cov tsev qiv ntawv nyob rau hauv Ruby, txoj kev loj hlob ntawm add-ons yog tsis yooj yim. Yog li ntawd, cov qhov thiaj li hu ua gems (los ntawm cov lus Askiv -. Lub pov haum) modules yuav nyob rau zoo yam daim ntawv thov - los ntawm kev koom ua ke nrog kev tes hauj lwm thiab peb-tog cov kev pab rau hauv lub tiav lawm platform rau e-lag luam. Txhua yam koj yuav tsum tau siv ib tug thib peb tog tsev qiv ntawv - yog kom piav lub dependence ntawm lawv tes num ntawm ib co tsev qiv ntawv, nyob rau hauv ib tug tej thaj chaw deb los yog hauv zos repository, thiab thaum lub sij hawm tom ntej no muaj no cov tsev qiv ntawv yog txiav loaded rau hauv daim ntawv thov. Nws kuj simplifies tsiv teb tsaws ntawm peb tes num developers, raws li muaj yog tsis muaj yuav tsum tau manually qhia dependencies los tsim kom tau peb tes num.

Yog li ntawd, yog hais tias koj nug dua hais txog dab tsi yog "Ruby", ces koj mam li yuav tau mus hais nrog cog qoob loo hais tias qhov no haib thiab ntau yam programming lus hais tias yog yeej haum rau ob qho tib si txog tej developers thiab beginners uas xav mus kawm txog kev sau program tsis yog ib qho yooj yim paj ntaub. Nyob rau hauv nws muaj cov cuab yeej rau tsim tej ntaub ntawv - los ntawm desktop daim ntaub ntawv rau mobile cov kev pab thiab web platforms.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 hmn.birmiss.com. Theme powered by WordPress.