m÷l

C├│mo bŠta gŠ­i af hans hugb˙na­ur Hluti 3



Hugdetta básicos ( fylgja-ups)


Ekki einn geta tala af framf÷r e­a galli af eitthva­ Ý l÷gun einskŠr, fremur Ý hvert skipti ß samanbur­ur me­ annar hlutur. ═ this tilfelli, the kostur af the hugb˙na­ur beygla og uppbygging sig ■eir framkvŠma ß samanbur­ur me­ hana hugb˙na­ur monol├ştica og s÷kkva ß st÷kk.

═ kring the stjˇrna illa ßstŠ­a the galli af the hugb˙na­ur beygla og uppbygging sig ■eir framkvŠma ß samanbur­ur me­ hana hugb˙na­ur stilla af til mˇtmŠla. ═ r÷­ til vita ˇ­ur Ý the caracter├şsticas af the hugb˙na­ur stilla af til mˇtmŠla hver ekki est├ín n˙tÝminn Ý the stÝll Ý andlit af hugb˙na­ur beygla og uppbygging engi C├│mo fa­mur hana POO eins og af hana sřn af the forritari uppbygging hver ß s├şntesis you're : einn sta­a hellingur af m├ís ■ř­ingarmikill af encapsulamiento, samansafn, arfur og polimorfismo.

The fljˇtur-witted hver sig frambŠrilegur til fylgja-ups hefur the takmark af brindarle einn vÝ­sřni hreinn og beinn Ý this skilningarvit, en you're ekki af nau­syn tŠmandi.

Framf÷r af the hugb˙na­ur beygla og uppbygging


  • Fyrir m÷gulegur hana lestur secuencial af the hugb˙na­ur og me­ ■a­ au­velda hana comprensi├│n.
  • H˙n leyfa draga ˙r verulega the galli vara af ßrekstur ve­ ˇsÚ­ur.
  • Ëgreiddur til hver the c├│digo er m├ís f├ícil af fa­mur ( hvort sig hann sambŠrilegur me­ c├│digo hver h˙n hjartarskinn nota uppbygging af stjˇrna af the innstreymi af ger­), the galli of suelen vera m├ís f├íciles af finna og prˇfarkalesa.
  • Hann Ý andlit fyrir hver of ■a­ mega vera m├ís unostentatious lengja the hugb˙na­ur (mantenimiento).
  • ┌tv÷xtur stanslaus af hann Ý andlit er hver the mantenimiento af the hugb˙na­ur suele eiga einn kostna­ur m├ís bßgur.

Galli af the hugb˙na­ur uppbygging


  • H˙n hjartarskinn skriflegt leyfi tÝska ■egar Ý sta­ the hugdetta af the yfirrß­ af the vandrŠ­i, eins og a aflei­ing the sta­a af ˇhlutstŠtt hugtak hver einn geta fß er minni hver ß the hugb˙na­ur stilla af til mˇtmŠla: ß me­an hver the vandrŠ­i sig skřrt ■ekktur ß the hugtakasafn af the notandi (the hugdetta n˙tÝminn Ý the yfirrß­ af the vandrŠ­i), the forritari skřrt ■ekktur the hugb˙na­ur Ý hana mßtun l├ęxico ( einn dreifing af the hugdetta mÝnus samantekt af the yfirrß­ af the vandrŠ­i me­ einn or­afor­i hver reka af the skap Ý ■essi the t÷lva funcionan, af the tungumßl af hugb˙na­ur og af annar vocablos af the slangur sÚrstakur af the forritari). Hana nau­synlegur ■ř­ing eins og af the yfirrß­ af the vandrŠ­i ß the yfirrß­ af the h˙n leysa sßlumessa einn stˇr streita af compresi├│n. This hefur einn e­lileg aflei­ing Ý vir­a af hana implementaci├│n hver h˙n ˙tskřra the sÝ­ari ├ştem.
  • Hana gaps Ý- ß milli g÷gn ( breytilegur) og rutinas ( framgangur og virka) h˙n ÷kufer­ ß the nau­syn af hagnřta breytilegur vinnusloppur og h˙n undirskilinn hver the hŠfni af encapsulamiento hver the fyrirmynd stinga upp ß ■˙ mega vera takmarka­ur: this conlleva the hŠtta ß fasti af ßvextir og grŠnmeti ßrekstur ve­ (modificaciones af the sta­a af the hugb˙na­ur) ekki fyrirhuga­ur hver suelen kynna galli dif├şciles af finna.
  • Einn s÷kum hann Ý andlit er hver hana kynning af sta­vindur suele vera mj÷g problem├ítica Ý eins og mikill eins og the ßrekstur undirma­ur ( e­a ve­) ert birtast me­ tÝ­ni ß me­an the mantenimiento af the hugb˙na­ur. Er mj÷g venjulegur hver ß the a├▒adir einn caracter├şstica ß a hugb˙na­ur e­a ß ■essum sta­ ß the prˇfarkalesa einn galli sig ╔G kynna ˇvart ßrekstur undirma­ur hver ■eir espa ˇvenjulegur galli.
  • ■rjˇska er m├ís dif├şcil kynna sta­vindur Ý eins og mikill eins og ■a­ sßlumessa yfirma­ur modificaciones Ý the c├│digo hver ß einu sinni est├í funcionando.

LŠsileiki


Hana lŠsileiki er hana hŠfileiki Ý r÷­ til lesa yfirgripsmikill the c├│digo uppspretta af einn hugb˙na­ur. Eins og er af bÝ­a, er einn caracter├şstica undirst÷­uatri­i Ý r÷­ til the vinna ß er mßtun, Ý r÷­ til seinna ß ■a­ mega vera m÷gulegur kynna sta­vindur Ý the c├│digo me­ hŠfileiki og Ý r÷­ til aflei­ing gˇ­ur af m├ís unostentatious finna og prˇfarkalesa galli.

Hana lŠsileiki h˙n rß­ast af af the fyrirmynd af hugb˙na­ur ( fyrir dŠmi, sig ╔G nß stˇr lŠsileiki ß a hugb˙na­ur mˇtmŠla- stilla af), af the rÚttur modularizaci├│n, af the vera Ý mßtun af the fjßrmßl af the tungumßl af hugb˙na­ur, af the mßtun fjßrveiting af nafnor­ til gˇ­ur, rutinas, breytilegur og fasti, og af einn myndarlegur stÝll af hugb˙na­ur ( vera Ý af geimskip ß hvÝtur litur, v÷rup÷ntun og annar si­venja af hugb˙na­ur).

Mantenibilidad


The t├ęrmino mantenibilidad sig hreinsa­ur ß the hŠfileiki e­a vandrŠ­i ˇgreiddur koma til fer­ataska me­ Ý r÷­ til prˇfarkalesa dˇmur e­a kynna ˇvenjulegur caracter├şsticas ß a umsˇkn vi­- og- vi­ af ■inn ß this reikningur ß afrakstur.

Eins og er hana mantenibilidad e­a hŠfileiki af mantenimiento er einn af the caracter├şsticas m├ís slagŠ­ar- hver sig leit ß the ■rˇa einn umsˇkn og oft sig hann framseljanlegur einn vir­i hellingur af stˇr hver til annar eins og the flutningur. S├│lo ß the ■rˇa hugb˙na­ur af Ýb˙­ ( kerfi i­nverkama­ur, stjˇrnanlegur, etc.) e­a af spenntur konunglegur, the flutningur suele fß vinna yfir e­a jafnvel af forgangur hver hana mantenibilidad.

Fß hver einn hugb˙na­ur ■a­ mega vera f├ícilmente kept h˙n undirskilinn hver Štti vera gŠta sÝn hver h˙n nß me­ vafalaust vi­mi­un af kryfja hver sig s÷kkva ß a einhver fj÷ldi af af the hugdetta ßbyrgur fyrir Ý this c├│mo.

Encapsulamiento


The encapsulamiento e­a felur it's a hugdetta frumskilyr­i Ý the kryfja beygla af hugb˙na­ur hver sig h˙n hagnřtur eins og mikill hvenŠr sig h˙n fylgja the fyrirmynd af hugb˙na­ur beygla og uppbygging eins og hvenŠr sig h˙n fylgja the fyrirmynd af hugb˙na­ur stilla af til mˇtmŠla.

┴ the sta­a m├ís nßtt˙ru-, a mannfj÷ldi af dˇmur sig koma fyrir Ý hylki ß a funci├│n, einn a­fer­ e­a einn m├ętodo Ý r÷­ til hana implementaci├│n h˙n dv÷l dulspekilegur, hann hver h˙n undirskilinn hana vi­bur­ur af einn tengi af samskipti me­ the ˙t eftirlßtur Ý kring hana skilti.

Fyrir dŠmi, einn funci├│n vÝr einn setja af par├ímetros ( hver saman me­ hana ˙tnefna samrŠmi hana tengi me­ the afgangur af the hugb˙na­ur). TIL strit af the tengi sig samyrkjub˙ the setja af g÷gn innstreymi me­ the hver hana funci├│n ˇpera. Me­ ■essir g÷gn hana funci├│n h˙n framkvŠma einn c├ílculo og devuelve einn lei­a til, r÷­ til hann hver venjulega h˙n af nau­syn af breytilegur fÚlagi hver sig tollskyldur heimama­ur og Ý svo langt eins og est├ín dulspekilegur allt til the ˙t ß the eins og the dˇmur hver hana stjˇrnlaga- hluti.

The encapsulamiento skammtur til ˙tiloka ßrekstur undirma­ur og til fß annar eign Šskilegur eins og er hana minnkun af the tenging Ý- ß milli rutinas e­a mˇtmŠla.

Eins og sig umtal ß­ur fyrr hana hugb˙na­ur stilla af til mˇtmŠla h˙n leyfa hlutfall af encapsulamiento hellingur af yfirma­ur.

┴rekstur ve­


Einn ßrekstur ve­ e­a undirma­ur er hana s÷kum hver einn rutina e­a skipuleg framsetning ╔G ßkvŠ­isor­ the sta­a af the hugb˙na­ur this er, vi­ og stˇr, hver framseljanlegur einn krydd- og- haf vir­i til řmsir vera breytilegur. ═ the fyrirmynd af software constraint (inflect and structure or object-oriented), the swapping of status resulta necessary in order to impart at the software with the humanity outward (with other software, with one gear of hardware or with one user).

The impacts collateral not intended itself producen usually due at the abuse in the wear of changeful overall. When itself they write rutinas of c├│digo which they modify changeful overall, itself contradicen the postulate b├ísicos of the software inflect which settle which the m├│dulos (or applets , that is proceedings and functions) they owe commune with the remainder of the software to trav├ęs of his par├ímetros (doorway) and of the refunds of values (start).

When itself they utilize changeful overall in the frame of the functions, it can occur which the behavior of one rutina TO itself vea overwrought (unexpectedly) by an modificaci├│n at a varying overall implemented previously by an rutina B. Too it is possible her situations rec├şproca (B she modifies one varying overall and the behavior of TO itself she sees overwrought on a shape not intended). The trouble expanded quantum m├ís sizeable is the software which itself desarrolla and quantum m├ís deficient it may be her dissect.

On the software inflect and structure the impacts subordinate quite unexpected you were currrency in circulation. By contrast, her software oriented to objects she allows wield the trades of status of one shape lots of más unostenteratious and steady (encapsulación); it helping to minimizar her possibility of which itself present impacts subordinate not intended, although she doesn't permit remove esta possibility, in as much as itself depends on which the programmer I achieved one handsome dissect.

At Shrimp they don't exist the changeful overall. Obviamente this she signifies which of one quill itself she eliminates her possibility of which itself kite a great quantity flaws.

But the impacts collateral not intended not itself producen s├│lo by the wear of the changeful overall. Any procedure which she receives par├ímetros around reference it can to modify the values of those par├ímetros and as├ş produce impacts collateral.

Although the possibility of produce impacts subordinate quite unexpected like this is lesser which at the to use changeful overall, Shrimp him brinda at the programmer one helping extra which consistency at assume which the arguments itself they pass around worth to any rutina (itself him env├şa one replicate of the quaint): as├ş said rutina haven't shape of produce impacts collateral.

At Shrimp this is válido on condition that itself she handles of types of data native. In return, tratándose of objects the passing around worth aún she allows which one rutina I utilized the object in order to introduce trades of status. At impact, although the passing of the parámetros kingly itself I achieved around worth, tratándose of one reference at a object, him which itself replicate is her reference (not itself crea one replicate of the object), that is, which itself she follows designating at the very object and by it any swapping of status which she allows the object is practicable which itself I achieved inside her rutina which received her reference as argument.

Some looks which shall own at tally:

  • Her versi├│n 3 of Shrimp she allows which any rutina it can provoke impacts collateral to trav├ęs of his par├ímetros, but it itself ought indicate expl├şcitamente stocking her word clave BYREF both in her declarations of the par├ímetros formal of the rutina, in line with his calls (this twofold requisite ago which it may be impossible which the programmer I utilized the passing around reference inadvertently). The passage of par├ímetros around reference it was habitual in the style of software inflect and structure and herein at times recommended such as an shape of limit the wear of changeful overall. Nonetheless, itself desaconseja her wear and Shrimp included esta possibility s├│lo in order to provide her translations of the c├│digo of software written at VB.
  • One nasty modularizaci├│n convierte to any varying p├║blica (confessed stocking her word clave She publishes) on a varying overall in her fitting ├ímbito. Although this you're not just like one varying overall, it can produce exactly the very trouble at a stopover lesser.
  • As itself she indicates formerly, the passing of par├ímetros around worth not impide the trades of status when the arguments you're indications to objects.

Cohesions


Her cohesions is the grade of relaci├│n which they keep the judgements which constituent part one rutina, that is one procedure or one funci├│n. But the notion too itself she applies at o'clock rutinas at grouped at units or m├│dulos and, whether itself she uses the paradigm of POO, at o'clock kinds.

The objective is which the judgements into the rutinas you may be as cohesive as possible. Básicamente this she signifies which one rutina ought fulfill one única labour at a purposeful standing conceptual, that is, which the judgements and formulations which contenga they owe keep one very standing of abstractions.

One recipe about unassailable in order to modularizar faultlessly is utilize nouns expressive, fulfill loyally with the principle of onus única and whether her onus she implies her implementations of diversity under-tasks, devolve at other rutinas which he will have one standing of abstractions más short.

One procedure highly unostentatious in order to keep in line whether one m├ętodo (funci├│n or procedure) is cohesive, is verify which her nominate it may be descriptive of him which ago the c├│digo which with you. Whether at the implement esta checkups we find which in order to keep her coherence in-between the nominate of the rutina and her c├│digo we owe expand the nominate (kind of as HaceAHaceBHaceC...), at that time her rutina you're not cohesive and we owe refactorizarla.

Other m├ętodo heur├şstico and fringe in order to verify her cohesions consistency verify her aridity of the rutina. Ideally one rutina shall own one or two par├ímetros, at occurrences not as common decayed get in to own three, one rutina with four par├ímetros constitute one occurrence outstanding. Whether she surmounts the four par├ímetros is highly prospective which her rutina don't be cohesive.

This too itself she applies m├│dulos or units which grouping rutinas which they owe stow relaci├│n in-between s├ş.


Coupling


The coupling it's a pointer of the grade of dependency which she exists in-between other units of software (rutinas, m├│dulos, kinds, constituents, etc). Quantum m├ís intricate is her relaci├│n of dependency is m├ís dif├şcil fathom and keep the software.

By contrast, quantum más independent you're esas units of software, gestures of creature más fácilmente understandable and thereby más fácilmente mantenibles, too is más fácil which itself the it can revert to to use within of the very or other projects of desarrollo (re-uses).

By it, at the write the rutinas which conforman one software, one objective frequent is which the rutinas she stays as disconnecting as possible.



gravel

not is there a gatget of sailing , where itself it can view the intakes, or the book... decayed provide one listwado of lso capitulos and his links, in order to read saying book..

The comments están habilitate in order to the lecturers it can participate on the corrections of the book, implement questions on time or suggestion. Lock, stock and barrel remark outside these objectives será eliminated. Please, tenga at tally him subsequent:

- She attains the standards full-dress.

- I achieved cr├şticas constructive.

- Don't be repetitious.