
vipuleekarana reethi

object-ooriyantad computer prograamingil, yadhaartha object compile cheythathinu sesham oru objectilekku cherkkunna oru reethiyaanu ekstenshan reethi. parishkaricha object palappozhum oru klaas, prototype allengil oru tharam aanu. ekstanshan reethikal chila object ooriyantad prograaming bhaashakalude savisheshathakalaan. oru ekstenshan reethiye vilikkunnathum type nirvachanathil prakhyaapicha oru reethiye vilikkunnathum thammil vaakyaghadana vyathyasamilla.
ennirunnaalum, ellah bhaashakalum vipuleekarana reethikal thulyamaayi surakshithamaayi nadappakkunnilla. udaaharanathinu, sii #, jaava (manifold, lombok allengil fluent vazhi), kotlinukal thudangiya bhashakal extended classil oru tharatthilum maattam varuthilla, kaaranam angane cheiyunnathu klaas shrenikale thakarkkukayum vertual reethi ayaykkunnathil edapedukayum cheyyum. athukondaanu eee bhashakal ekstenshan reethikal sthiramaayi karsanamaayi nadappilaakkukayum avaye abhyarthikkaan staatik dispatching upayogikkukayum cheiyunnathu.
prograaming bhashakalil pinthuna.
sii #, jaava vazhi manifold allengil lombok allengil flunt, gosu, jaavaaskript, ooksijeen, rubie, smoltock, coatlin, dart, vishwal basic ennivayulppede niravadhi bhaashakalude savisheshathakalaan ekstenshan reethikal.nettum sojo. paitthan polulla chalanathmaka bhashakalil, oru ekstenshan reethi enna ashayam anaavasyamaanu, kaaranam prathyeka vaakyaghadanayillaathe klaasukal vipuleekarikkaan kazhiyum (jevent polulla librarikalil upayogikkunna "monkey-patching" ennariyappedunna oru sameepanam). 
vii. bii. yill.nettum ooksijeenum, "cocewed _ 1" enna keevedinteyo attributinteyo saannidhyathaal avaa thirichariyappedunnu. sojoil "cocks _ 2" enna keywade aagola reethikalilaan upayogikkunnathu.
sii #ll avaa staatik klaasukalil staatik reethikalaayi nadappilaakkunnu, aadya aargyument extended classinteyum athinumumbulla "cockways _ 3" keevedinteyum aanu.
ningalude projakttinte claspathilekku ningal cherkkunna oru jaar fayalaaya manifold vazhi jaavayil ningal ekstenshan reethikal cherkkunnu. sii #nuu samaanamaayi, jaava ekstenshan reethi oru <aii. dii. 1> classil staatik aayi prakhyaapikkappedunnu, avide aadyathe aargyumentin extended klaasinte athe tharamund, koodaathe cockves _ 4 upayogichu vyaakhyaanikkunnu. pakaramaayi, eathenkilum staatik reethiye vyaakhyaanangal upayogikkaathe oru ekstenshan reethiyaayi vilikkaan pluggin ningale anuvadikkunnu, reethi signature poruthappedunna kaalatholam.
smoltokkil, upayokthaav vipuleekarikkaan aagrahikkunna classilake oru reethi srishtikkal sandesham (cockways _ 5 polullava) ayachukondu eathu kodinum eppol venamenkilum eathu klaasilekkum oru reethi cherkkaan kazhiyum. nakshathrashikharangalaal chuttapetta vipuleekaranam nalkunna paakkejinte perilaanu smoltock reethi vibhaagam parambaraagathamaayi ariyappedunnathu. udaaharanathinu, ettoy aaplikkeshan coode coor libraryile klaasukal vipuleekarikkumbol, cherttha reethikal kokwos _ 6 vibhaagathil ulppeduthunnu.
rubiyil, smoltock pole, ekstenshanaayi prathyeka bhasha savisheshathayonnumilla, kaaranam eee saahacharyathil, puthiya reethikal cherkkunnathinu, cockways _ 7 keywade upayogichu eppol venamenkilum klaasukal veendum thurakkaan rubie anuvadikkunnu. rubie samooham palappozhum oru ekstenshan reethiye orutharam kurangan paachu ennaanu visheshippikkunnathu. vasthukkalilekku surakshita/praadeshika vipuleekaranangal cherkkunnathinu parishkkaranangal ennu vilikkunna oru puthiya savisheshathayum undu, pakshe ithu kurachumaathrame upayogikkunnulloo.
nilavilulla classilake oru puthiya interface/protocol nadappilakkaanulla kazhivu ulppede nilavilulla classilake reethikal, nirmmathaakkal, feeldukal enniva cherkkaan anuvadikkunna klaas polulla nirmmithiye cockways _ 1 keywade adayaalappeduthunnu.
pravarthanakshamamaakkunna savisheshathayaayi vipuleekarana reethikal.
mattullavar ezhuthiya coode chuvade vivarichathupole vipuleekarikkaan anuvadikkunna vipuleekarana reethikalkku aduthaayi, vipuleekarana reethikal avarudethaaya reethiyil upayogapradamaaya paattenukalum prapthamaakkunnu. ekstanshan reethikal avatharippikkunathinulla pradhana kaaranam langwej integrated kwari (link) aayirunnu. ekstenshan reethikalkkulla compiler pinthuna puthiya kodineppole thanne pazhaya kodumaayi link aazhathil samyojippikkaanum praadhamika microsophtinu thalkkalam savisheshamaaya kwayari vaakyaghadanaykkulla pinthunayum anuvadikkunnu.nettu bhashakal.
kansol.raitlain (puthiya [] {kanakk.paii, kanakk.e}.evide (d => d> 3).(d => kanakk) thiranjedukkuka.paapam (dii/2).thuka ());
// aouttputta
// 1.
pothuvaaya perumaattatthe kendreekarikkuka.
ennirunnaalum, ekstenshan reethikal anantharaavakaashathinteyo vertual reethi abhyarthanakaludeyo melnottatthinteyo aavasyamillaathe veendum upayogikkaan prapthamaakkunna vidhathil savisheshathakal orikkal nadappilakkaan anuvadikkunnu, allengil oru interfasinte nadappaakkunnavar nissaaramo dayaneeyamo aaya sankeernamaaya pravartthanam nadappilakkaan aavashyappedunnu.
klaas library rachayithaav nalkaathatho upayogapradamaaya nadapakkalo illaatha oru interfacil savisheshatha pravartthikkunnundel, prathyekichum upayogapradamaaya oru sahacharyam.jii. developermark oru pluggin architecturo samanamaaya pravartthanamo nalkunna librarikalil palappozhum ithu sambhavikkunnu.
thaazhepparayunna coode pariganikkuka, oru klaas libraryil adangiyirikkunna oreyoru coode aanennu karuthuka. ennirunnaalum, elogar interfasinte oro nadapakkalum oru formet cheytha string ezhuthaanulla kazhivu nedum, oru "using miculogger" prasthavana ulppeduthunnathiloode, athu orikkal nadappilaakkendathilla, elogar nadappaakkunna oru klaas library subclass cheyyendathilla.
namespace miculogger;
public interface elogar
 shoonyamaaya ezhuthu (string tekst);
public staatik klaas logrekstenshanukal
 pothu staatik void raitt (eee elogar logger, string formet, paaram object [] args)
 (logger!= shoonyam)
 logger.ezhuthuka (string.formet (formet, rgs);
logger.ezhuthuka ("{0}: {1}", "kido seys", "mummy mummy mummy...");
logger.ezhuthuka ("{0}: {1}", "kido seys", "maa maa maa maa"... ");
logger.ezhuthuka ("{0}: {1}", "kido seys", "maama maama maama");
logger.ezhuthuka ("{0}: {1}", "kido seys", "mamma mamma mamma... ");
logger.ezhuthuka ("{0}: {1}", "kido seys", "elisabath lissie liss...");
logger.ezhuthuka ("{0}: {1}", "mamma seys", "enthaanu?!?!!!");
logger.ezhuthuka ("{0}: {1}", "kido seys", "haay.");
kooduthal mechappetta ayanja jody.
ekstenshan reethikal klaas librarikalude upayokthaakkale aaa libraryil ninnu varunna oru aargyument, variable allengil mattenthenkilum tharam enniva prakhyapikkunnathil ninnu vittunilkkan anuvadikkunnu. klaas libraryil upayogikkunna tharangalude nirmmanavum parivartthanavum vipuleekarana reethikalaayi nadappilaakkaam. parivartthanangalum faaktarikalum shradhaapoorvvam nadappaakkiya sesham, oru klaas libraryil ninnu mattonnilekku maarunnath compilerinu bandhippikkaan ekstenshan reethikal labhyamaakkunna using stettment maattunnath pole eluppamaakkaam.
pluun aaplikkeshan prograamarude interfaceukal.
fluvent interfaceukal ennu vilikkappedunnava nadappilaakkunnathil ekstenshan reethikalkku prathyeka upayogamundu. udaaharanathinu, saadhaarana engleeshinodu saamyamulla coode praayogikamaayi ezhuthaan anuvadikkunna microsophttinte entitti framework konfigareshan api oru udaaharanamaanu.
ekstenshan reethikal illaathe ithu saadhyamaanennu oraalkk vadikkam, ennaal praayogikamaayi, ekstenshan reethikal oru mikacha anubhavam nalkunnuvennu oraal kandethum, kaaranam klaas shreniyil kurachu parimithikal vaykkunnu, athu pravartthikkukayum vaayikkukayum cheiyunnu.
inipparayunna udaaharanam entitti framework upayogikkukayum daattaabes table listtukalil sambharikkenda todolist klaas krameekarikkukayum oru praadhamika, videsha qee nirvachikkukayum cheiyunnu. coode kurachukoodi ingane manassilakkanam "oru todalistinu qee todalistid undu, athinte entitti settu namam listtukalaan, athil oronninum aavashyamaaya todalist ulla niravadhi todoitangalundu".
pothu klaas todayittem sandarbham db sandarbhangal 
 model nirmmaanatthil (db model builder model builder) samrakshitha override void 
 adithara.onmodelkriyetting (model builder);
 model nirmmaathaav.entitti <todolist> ()
 .hashki (e => e.todalistid)
 .haasantitti settu neyim ("listtukal")
 .hasmani (e => e.todos)
 .aavasyamulla (e => e.todalist);
uthppaadanakshamatha.
udaaharanathinu, ennaavunna alavil pariganikkuka, athinte laalithyam shradhikkuka-oru reethi maathrameyulloo, ennittum athu linkinte adisthaanamaanu. microsophttil eee interfasinte niravadhi nadappaakkalukal undu.nettu. ennirunnaalum, theerchayaayum, eee nadappaakkalukalil oronnum sisttathil nirvachichirikkunna muzhuvan reethikalum nadappilaakkendathu bharamaayirikkum.microsophtinu ellah sozhs kodukalum undengilum, iniyoomarabilukalil pravartthikkaan link namespace. ithilum moshamaayi, microsopht ozhikeyulla ellaavarum eee reethikalellaam nadappilakkaan iniumerable svayam upayogikkunnathinekkur chinthikkendathundu, ithu valare saadhaaranamaaya eee interfasinte vyapakamaaya upayogam kaanumbol valare ulppaadana virudhamaayirikkum. pakaram, eee interfasinte oru reethi nadappilaakkunnathiloode, link kooduthalo kuravo udanadi upayogikkaan kazhiyum. prathyekichum praayogikamaayi mikka kesukalilum iniyoomarabilinte gettenyoomettar reethi oru swakaarya shekharam, listt allengil shreniyude gettenyoomettar nadappaakkal ennivaykku niyogikkappedunnu.
public klaas baank akkounda ennaavunna <dasaamsham> 
 swakaarya pattika <tupple <dettaim, dasaamsha "kredittukal;// ellah negatteevum anumaanikkunnu
 swakaarya pattika <tupple <dettaim, dasaamsha "debittukal;// ellah positeevum anumaanikkunnu
 public iniyoomarettar <dasaamsham> gettinoomarettar () 
 vaar kwari = debittukalil dii. siyil ninnu.union (kredittukal) 
 dii. sii. oordar cheyyuka.inam1/* theeyathi * / 
 dissy thiranjedukkuka.inam 2;/* thuka */
 forch (chodyathilulla vaar thuka)
 varumanam madakkinalkunna thuka;
// baa ennum oru using sisttam ennum vilikkunna baank akkoundinte oru udaaharanam nalkunnu.nilavile fayalinu mukalil link,
// oraalkk ippol baa ezhuthaam.akkoundu balance labhikkunnathin thuka (), baa.ettavum puthiya edapaadukal aadyam kaanunnathin reverse (),
// baa.oru edapaadinte sharashari thuka labhikkaan sharashari () muthalaayava-oru ganitha oopparettare orikkalum ezhuthaathe
prakadanam.
oru ekstenshan reethi nalkunna oru savisheshathayude adhika nadappaakkalukal prakadanam mechappeduthunnathino allengil compilerinu prathyekamaayi arekalkkayi (sisttathil) iniumerable nadappaakkunnathu polulla vyathyasthamayi nadappilaakkiya interface nadappaakkalukal kaikaaryam cheiyunnathino cherkkaan kazhiyum.szarrayhelper), ithu ekstenshan reethikkayi automaattikkaayi thiranjedukkum, kaaranam avarude aargyument iniumerable interfasinte (eee iniumerable moolyam) udaaharanangalil pravartthikkunna athe perilulla ekstenshan reethikk pakaram kooduthal nirddishtamaayirikkum (eee tii [] moolyam).
oru pothu adisthaana klaasinte aavasyakatha laghookarikkuka.
pothuvaaya klaasukalil, pothuvaaya tharatthilulla ellah thalkshanangalkkum labhyamaya perumaattam nadappilakkaan ekstanshan reethikal anuvadikkunnu, avaa oru pothu adisthaana classil ninnu uruthirinjirikkendila, koodaathe tharam paaraamettarukal oru prathyeka anantharaavakaasha shaakhayilekku parimithappedutthaathe. ithu oru valia vijayamaan, kaaranam eee vaadathinu pankitta savisheshatha nadappilakkaan oru saadhaaranamallaatha bays klaas aavasyamullathinaal-athinusesham upayogikkunna tharam oru tharam vaadangalaakumbozhellaam boxing koodaathe/allengil kaastukal nadatthaan pothuvaaya upavibhagam aavasyamaanu.
yaadhaasthithika upayogam.
punarupayogavum sariyaaya object ooriyantad design nedunnathinulla mattu maargangalekkaal ekstenshan reethikalkku munganana nalkunnathil oru kuripp sthaapikkanam.
vishwal studiyoyude intalisense polulla coode edittarmaarude yaanthrika poorttheekarana savisheshathakale ekstenshan reethikal 'kramarahithamaakkiyekkam', athinaal avaa developere thiranjedutthu irakkumathi cheyyaan anuvadikkunnathinu avarude swantham namespaceil aayirikkanam allengil avaye nirvachikkendathu oru tharatthilaanu, athu reethi intalisensil prathyakshappedaan mathiyaya prathyekathayullathaanu, yadhaarthathil prasakthavum mukalil paranjathum nalkumbol maathram, developer avaa pratheekshikkunnuvenkil avaa kandethaan prayaasamaanennu karuthuka, pakshe oru missing using stettment kaaranam intalisensil ninnu avaa nashtamakum, kaaranam developer reethiye nirvachikkunna klaasumaayo athu thamasikkunna namespace poleyo polum bandhippichirikkilla-marichu athu vikasippikkunna tharavum athil thamasikkunna namespace.
prashnam.
prograamingil, nilavilulla oru classilake pravartthanam cherkkenda saahacharyangal undaakunnu-udaaharanathinu oru puthiya reethi cherkkunnathiloode. saadhaaranayaayi prograamar nilavilulla klaasinte sozhs coode parishkkarikkum, ennaal ithu eee puthiya mattangal upayogichu ellah binarykalum veendum samaharikkaan prograamare nirbandhitharaakkunnu, koodaathe prograamarkk klaas parishkkarikkan kazhiyanam, ithu ellaayppozhum saadhyamalla, udaaharanathinu oru moonnaam kakshi asambliyil ninnulla klaasukal upayogikkumbol. ithu saadhaaranayaayi moonnu vazhikalil onnil pravartthikkunnu, avayellaam alppam parimithavum avabodhajanyavumalla
nilavile sii #pariharangal.
aadya oopshan thathwathil eluppamaanu, pakshe nirbhagyavashaal pala klaasukalum chila amgangalude anantharaavakaasham niyanthrikkukayo poornnamaayum nirodhikkukayo cheiyunnu enna vasthuthayal ithu parimithappedutthiyirikku. seal cheytha classes sii #leeii int, float, string thudangiya vividha aadima daatta tharangalum ithil ulppedunnu. randaamathe oopshan, maruvashathu, eee niyanthranangal pankidunnilla, pakshe samshayaaspadamaaya klaasinte reethikal nerittu upayogikkunnathinu pakaram oru prathyeka klaasinekkurichulla reference aavasyamullathinaal ithu avabodhajanyamalla.
udaaharanathinu, ritten moolyam reverse kramatthilulla aksharangalulla oru stringaaya oru puthiya reverse reethi upayogichu string klaas vipuleekarikkendathinte aavasyakatha pariganikkuka. string klaas oru seal cheytha tharamayathinaal, eee reethi saadhaaranayaayi inipparayunnavaykku samanamaaya reethiyil oru puthiya yoottility classilake cherkkum
string x = "chila string moolyam";
string y = yoottility.vipareeta (x);
ennirunnaalum, yoottility reethikaludeyum klaasukaludeyum library vardhikkunnathinaal, prathyekichu puthumukhangalkk ithu naavigettu cheiyunnathu kooduthal budhimuttaayekkaam. mikka string reethikalil ninnum vyathyasthamayi, ithu string classile angamalla, marichu thikachum vyathyasthamaaya classilaayathinaal location avabodhajanyamalla. athinaal oru mikacha vaakyaghadana inipparayunnavayaayirikkum
string x = "chila string moolyam";
string y = x.nere ();
nilavile vii. bii.nettu pariharangal.
mikkavarum, vii. bii.nettu solution mukalilulla sii #solution samaanamaan. ennirunnaalum vii. bii.nettinu oru savisheshamaaya nettamundu, athu reference vazhi extensionilekku amgangale kaimaran anuvadikkunnu (sii #moolyam maathram anuvadikkunnu). inipparayunnava anuvadikkuka;
string aayi x mangikkuka = "chila string moolyam"
x.nere thirichaanu () 
vishwal basic sozhs objectine reference vazhi kaimaran anuvadikkunnathinaal mattoru variable srishtikkenda aavasyamillaathe sozhs objectil nerittu mattangal varuthaan kazhiyum. nilavilulla klaasukalude reethikalkku anusrithamaayi pravarthikkunnathinaal ithu kooduthal avabodhajanyamaan.
vipuleekarana reethikal.
ennirunnaalum, sii #3 leeii ekstenshan reethikalude puthiya bhasha savisheshatha, randaamathethu saadhyamaakkunnu. eee sameepanathin inipparayunna oru staatik classes staatik reethiyum aavasyamaanu.
pothu staatik klaas yoottility
 pothu staatik string reverse (eee string inputt)
 chaar [] aksharangal = inputt.tocharare ();
 shreni.vipareeta (aksharangal);
 puthiya string (aksharangal) thirike nalkuka;
nirvachanathil, aadya vaadathinu munbulla modifier 'ithu' ithu oru ekstenshan reethiyaanennu vyakthamaakkunnu (eee saahacharyathil 'string' tharatthilekku). oru kolil, aadyathe aargyument 'paas inn' allah, kaaranam ithu ithinakam 'colling' object (dottinu munbulla object) ennariyappedunnu.
ekstanshan reethikale vilikkunnathum staatik helper reethikale vilikkunnathum thammilulla pradhana vyathyasam staatik reethikale prefix notteshanil vilikkunnu ennathaanu, athesamayam ekstanshan reethikale infix notteshanil vilikkunnu. oru ooppareshante phalam mattoru ooppareshanaayi upayogikkumbol randaamathethu kooduthal vaayikkaavunna kodilekk nayikkunnu.
vipuleekarana reethikalilum udaaharana reethikalilum vairudhyangal namakaranam cheyyuka.
sii #3ll, oru classinu ore oppulla oru instans reethiyum ekstanshan reethiyum nilanilkkum. atharamoru saahacharyathil, ekstenshan reethiyekkaal instans reethiyaanu munganana nalkunnathu. compilero microsopht vishwal studiyo ideayo naamakarana vairudhyathekkurichu munnariyipp nalkunnilla. eee klaasinte oru udaaharanathil cockways _ 9 reethi abhyarthikkunna eee sii #klaas pariganikkuka
klaas aksharamaalayude nirmmaathaav 
 pothu shoonyamaaya gettalfabett () 
 eee reethi nadappilaakkumbol,
 kansol.raitlain ("abc");// ithu nadappaakkalinte nizhal varum
 extensionmethodes classil}//.
staatik klaas ekstenshan reethikal
 pothu staatik void gettalfabett (eee aksharamala nirmmaathaav aam) 
 {// ithu maathrame vilikkappedukayulloo. 
 kansol.raitlain ("abc");// udaaharanam illengil
 ore oppulla reethi. 
ekstanshan reethi maathrame nilavilulloovenkil, cockways _ 11-nte oru udaaharanathil cockways _ 9 vilikkunnathinte falam
 abc
instans reethiyum ekstanshan reethiyum nilavilundenkil falam
 abc

