
aashrithathva vipareeta thathwam

object-ooriyantad designil, dependency inversion thathwam ayanja coupled software modyoolukalkkulla oru prathyeka reethiyaanu. eee thathwam pinthudarumbol, uyarnna thalatthilulla naya-krameekarana moduleukal muthal thaazhnna thalatthilulla dependency moduleukal vare sthaapithamaaya parambaraagatha dependency bandhangal vipareethamaakunnu, angane thaazhnna thalatthilulla module nadappaakkal vishadaamshangalil ninnu swathanthramaaya uyarnna thalatthilulla moduleukal nalkunnu. thathwam parayunnu
uyarnna thalatthilullathum thaazhnna thalathilullathumaaya vasthukkal ore amoorthathaye aashrayichirikkanamenn nirddeshikkunnathiloode, eee design thathwam chila aalukal object ooriyantad prograaminginekkurich chinthikkunna reethiyilaan.
eee thathwathinte pooyintukal eiii, bii ennivaykku pinnile ashayam oru uyarnna thalatthilulla module thaazhnna thalatthilulla module thammilulla edapedal roopakalppana cheyyumbol, avaa thammilulla amoorthamaaya edapedalaayi ashayavinimayam kanakkaakkanam ennathaanu. ithu uyarnna thalatthilulla modyoolinte roopakalppanayil mathramalla, thaazhnna thalatthilullathilum swaadheenam cheluthunnu thaazhnna thalatthilulla onnu ashayavinimayam manassil vachukondu roopakalppana cheyyanam, athinte upayoga interface maattendathu aavashyamaayi vannekkaam.
pala kesukalilum, oru amoortha aashayamaayi svayam ashayavinimayam cheiyunnathu adhika coding paattenukal avatharippikkathe gadakangalude samyojanam kuraykkaan anuvadikkunnu, ithu bharam kuranjathum nadappaakkal-aashrithavumaaya ashayavinimaya schema maathram anuvadikkunnu.
rund moduleukal thammilulla kandethiya amoorthamaaya prathipravartthana schema (kall) pothuvayathum saamaanyavalkkaranathin ardhamullathum aayirikkumbol, eee design thathwam inipparayunna dependency inversion coding pattenilekkum nayikkunnu.
parambaraagatha paatten paatten.
parambaraagatha aaplikkeshan aarkkitekcharil, thaazhnna thalatthilulla gadakangal (udha.jii.yoottility lair) uyarnna thalatthilulla gadakangal (udha.jii., poolisi lair) kooduthal sankeernamaaya samvidaanangal nirmmikkaan prapthamaakkunnu. eee ghadanayil, uyarnna thalatthilulla gadakangal chila jolikal nedunnathinu thaazhnna thalatthilulla gadakangale nerittu aasrayikkunnu. thaazhnna thalatthilulla gadakangale aashrayikkunnath uyarnna thalatthilulla gadakangalude punarupayoga avasarangale parimithappedutthunnu.
dependency inversion paatteninte lakshyam oru amoortha paaliyude madhyasthathayodoppam eee uyarnna samyojitha vitharanam ozhivaakkuka, uyarnna/poolisi paalikalude punarupayogakshamatha vardhippikkuka ennivayaanu.
dependency inversion paatten.
amoorthamaaya oru paali cherkkunnathiloode, uyarnnathum thaazhnnathumaaya paalikal mukalil ninnu thaazhekku parambaraagatha aashrithathvangal kuraykkunnu. ennirunnaalum, "inversion" enna ashayam thaazhnna thalatthilulla paalikal uyarnna thalatthilulla paalikale nerittu aashrayikkunnuvenn ardhamaakkunnilla. rund paalikalum uyarnna thalatthilulla paalikalkku aavashyamaaya swabhaavam thurannukaattunna amoorthathakale (interfaceukal) aasrayikkanam.
dependency inversionte nerittulla prayogatthil, amoorthangal upper/poolisi paalikalkku udamasthathayilullathaanu. eee architecture uyarnna/naya gadakangaleyum thaazhnna sevanangale ore paakkejil orumichu nirvachikkunna amoorthathakaleyum grouppucheyyunnu. eee amoortha klaasukaludeyo interfesukaludeyo anantharaavakaasham/nadappakkalaanu thaazhnna thalatthilulla paalikal srishtikkunnathu.
aashrithathvangaludeyum udamasthaavakaashathinteyum vipareethaavastha uyarnna/poolisi paalikalude punarupayogatthe prothsaahippikkunnu. mukalile paalikalkku thaazhnna sevanangalude mattu nadappaakkalukal upayogikkaam. thaazhathe nilayilulla gadakangal adaykkumbozho allengil aaplikkeshan nilavilulla sevanangal veendum upayogikkendivarumbo, sevanangalum amoorthathakalum thammil oru adapter madhyasthatha vahikkunnath saadhaaranamaanu.
dependency inversion paatten generalisation.
pala projaktukalilum dependency inversion thathwavum paattenum saamaanyavalkkarikkappeda orotta aashayamaayi kanakkaakkappedunnu, athaayath.iii.software moduleukal thammilulla ellah interfaceukalilum ithu prayogikkunnu. athinu kuranjathu rund kaaranangalenkilum undu
upayogichirikkunna mocking upakaranam anantharaavakaashathe maathram aashrayikkunnuvenkil, dependency inversion paatten vyaapakamaayi prayogikkendathu aavashyamaayi vannekkaam. ithinu pradhana poraaymakalundu
saamaanyavalkkarana niyanthranangal.
dependency inversion paatten (dip) poortthiyaakkunnathinulla interfaceukalude saannidhyam oru object-ooriyantad prograamil mattu design prathyaaghaathangal undaakkunnu
interface parihasikkunna niyanthranangal.
anantharaavakaashathe adisthaanamaakkiyulla mocking upakaranangal upayogikkunnathu niyanthranangal avatharippikkunnu
bhaavi dishakal.
thathwangal chinthayude vazhikalaanu. prasnangal pariharikkunnathinulla saadhaarana maargangalaan paattenukal. prograaming bhasha savisheshathakal nashtappedunnathinu coding paattenukal nilavilundakaam.
nadappaakkal.
dipinte rund saadhaarana nadappaakkalukal samanamaaya logical architecture upayogikkunnu, pakshe vyathyasthamaaya prathyaaghaathangalode.
oru libraryil sevana amoortha klaasukalulla naya klaasukal oru nerittulla nadappaakkal paakkej cheiyunnu. eee nadappakkalil uyarnna thalatthilulla gadakangalum thaazhnna thalatthilulla gadakangalum prathyeka paakkejukalaayo librarikalaayo vitharanam cheiyunnu, avide uyarnna thalatthilulla gadakathinu aavashyamaaya perumaattam/sevanangal nirvachikkunna interfaceukal uyarnna thalatthilulla gadakathinte libraryude udamasthathayilullathum nilanilkkunnathum aanu. thaazhnna thala gadakangal uyarnna thalatthilulla gadakangalude interface nadappilaakkunnathinu thaazhnna thalatthilulla ghadaka paakkej samahaarathinulla uyarnna thala gadakathe aashrayichirikkendathund, angane parambaraagatha aashrithathva bandham vipareethamaakunnu.
chithrangalum 1,2 ennivayum ore pravarthanakshamathayulla coode chithreekarikkunnu, ennirunnaalum chithram 2 ll, aashrithathvam vipareethamaakkaan oru interface upayogichittundu. poolisi coode punarupayogam paramavadhi vardhippikkunnathinum chaakrika aashrithathvangal illaathaakkunnathinum aashrithathvathinte disha thiranjedukkaam.
dipinte eee pathippil, uyarnna thalatthilulla paalikalil interfaceukaleyo amoorthathakaleyo aasrayikkunna thaazhathe paali ghadakam thaazhathe paali gadakangalude punarupayogam budhimuttaakkunnu. pakaram eee nadappaakkal mukalil ninnu thaazhekku, thaazhe ninnu mukalilekku, parambaraagatha aashrithathvathe 'vipareethamaakkunnu'.
kooduthal vazhakkamulla pariharam amoortha gadakangale oru swatantra koottam paakkejukalo librarikaloo aayi verthirichedukkunnu
oro paaliyum athintethaaya paakkejilekku verthirikkunnathu eathu paaliyudeyum punarupayogatthe prolsaahippikkukayum shakthiyum chalanaseshiyum nalkukayum cheiyunnu.
udaaharanagal.
vamshavali module.
oru vamshavali sambradaayam aalukal thammilulla bandhathe avar thammilulla nerittulla bandhatthinte graphai prathinidheekarikkam (achhan-makan, achhan-makal, amma-makan, amma-makal, bharthaav-bhaarya, bhaarya-bharthaav muthalaayava).). oru muun bharthaavinteyo niyamaparamaaya rakshithaavinteyo sevanam eluppathil labhikkunnathinaal ithu valare kaaryakshamavum vipuleekarikkaavunnathumaaya kaaryamaan.
ennaal chila unnatha thalatthilulla moduleukalkku sisttam brows cheiyunnathinu oru lalithamaaya maargam aavashyamaayi vannekkaam eathoru vyakthikkum kuttikal, maathaapithaakkal, sahodarangal (ardhasahodaranmaarum sahodarikalum ulppede), muthasshimaarum cussins thudangiyava undakam.
vamshavali modyoolinte upayogathe aashrayich, pothuvaaya bandhangale vyathyasthamaaya nerittulla gunangalayi (graph maraykkunnath) avatharippikkunnath uyarnna thalatthilulla module vamshavali module thammilulla samyojanathe valare bharam kuranjathaakkukayum avaa upayogikkunna modyoolukalil oru swaadheenavumillaathe nerittulla bandhangalude aantharika praathinidhyam poornnamaayum maattaan oraale anuvadikkukayum cheyyum. vamshavali modyoolil sahodarangaludeyo ammavanmaarudeyo krithyamaaya nirvachanangal ulppeduthaanum ithu anuvadikkunnu, angane orotta utharavaaditha thathwam nadappilaakkunnu.
avasaanamaayi, aadyathe extensible generalised graph sameepanam ettavum vipuleekarikkaavunnathaane thonnunnuvenkil, vamshavali modyoolinte upayogam aaplikkeshanukalkku (kall) kooduthal savisheshavum lalithavumaaya bandha nadappaakkal mathiyennum kooduthal kaaryakshamamaya oru samvidaanam srishtikkaan sahayikkunnuvennum kaanichekkaam.
eee udaaharanathil, moduleukal thammilulla edapedal amoorthamaakkunnathu thaazhnna thalatthilulla modyoolinte lalithamaaya interfasilekku nayikkukayum athu lalithamaayi nadappaakkunnathilekku nayikkukayum cheyyum.
vidoora phayal server klayant.
oru vidoora phayal server (eftipi, claude storeju...) klayantine amoorthamaaya interfaceukalude oru koottamaayi maathrkayaakkaam
praadeshikavum vidooravumaaya fayalukal ore amoortha interfaceukal vaagdaanam cheiyunnuvenkil, dependency inversion paatten nadappilaakkunna uyarnna thalatthilulla moduleukalkku avaa vivechanarahithamayi upayogikkaan kazhiyum. aaplikkeshan athinte rekhakal praadeshikamaayo vidooramaayo suthaaryamaayi samrakshikkaan kazhiyum.
uyarnna thalatthilulla moduleukalkku aavashyamaaya sevana nilavaaram pariganikkanam.
amoorthamaaya interfaceukalude oru koottamaayi oru module roopakalppana cheiyunnathum mattu moduleukal athumaayi poruthappeduthunnathum pala sistangalkkum oru pothu interface nalkum.
model-view-kantrolar.
yuai, aaplikkeshan lair paakkejukalil pradhaanamaayum konkreett klaasukal adangiyirikkunnu. kantrolarukalil amoortha/interface tharangal adangiyirikkunnu. yuaiykk icustomerhandlerint oru udaaharanamundu. ellah paakkejukalum bhouthikamaayi verthirikkappettirikku. aaplikkeshan leyaril peju klaas upayogikkunna kasttamar handlerinte vyakthamaaya nadappaakkal undu. icustomerhandler interfasinte udaaharanagal oru factory chalanathmakamaayi srishtikkunnu (orupakshe athe kantrolar paakkejil). konkreett tharangalude pejum upabhokthru handler parasparam aasrayikkunnilla, marichu icustomerhandlerine aasrayichirikkunnu.
yuai aaplikkeshan leyarineyo icustomerhandler nadappilaakkunna mattethenkilum konkreett paakkejineyo paraamarshikkaathathinaal, upabhokthru handlerinte konkreett nadappaakkal yuai klaas maattathe maattisthaapikkaan kazhiyum. koodaathe, peju klaas interface aipej viewer nadappilaakkunnu, ithu icustomerhandler reethikalkku oru vaadamaayi kaimaran kazhiyum, ithu upabhokthru handlerinte vyakthamaaya nadappaakkal oru vyakthamaaya aashrithathvamillaathe yuiyumaayi ashayavinimayam nadatthaan anuvadikkunnu. veendum, randum interfaceukalaal bandhippichirikkunnu.
bandhapetta paattenukal.
dependency inversion thathwam prayogikkunnathum adapter paatteninte oru udaaharanamaayi kaanaan kazhiyum. athaayath, uyarnna thalatthilulla klaas athinte swantham adapter interface nirvachikkunnu, ithu mattu uyarnna thalatthilulla klaasukal aasrayikkunna amoorthamaanu. anuyojyamaaya nadappaakkal athe adapter interface amoorthathvathe aasrayichirikkunnu, athesamayam swantham thaazhnna thalatthilulla modyoolil ninnu coode upayogichu ithu nadappilaakkaam. uyarnna thalatthilulla module thaazhnna thalatthilulla modyooline aasrayikkunnilla, kaaranam ithu adapter interfasiloode parokshamaayi thaazhnna thalatthilulla pravartthanam maathrame upayogikkunnulloo, kaaranam adapted implementation athinte thaazhnna thalatthilulla module nadappilaakkunna interfasilekku polymorphic reethikal abhyarthikkunnu.
thiranjeduttha thaazhnna thalatthilulla ghadakam uyarnna thalatthilulla gadakathilekku nadappaakkunnathu rann-time provision sugamamaakkunnathin pluggin, sarvees lokkettar allengil dependency injection polulla vividha paattenukal upayogikkunnu.
charithram.
dependency inversion thathwam munnottuvachathu roobert sii aanu. martin "object ooriyantad design kwaalitti metriksa dependensikalude vishakalanam", 1996 meyy maasathil sii + + reportil "dependency inversion principle" enna peril prathyakshappetta oru lekhanam, "ejail software development, thathwangal, paattenukal, practiceukal", "sii #leeii chadulamaaya thathwangal, paattenukal, sanbradaayangal" ennee pusthakangal ulppede niravadhi prasidheekaranangalil vivarichu.