๐Ÿ“
til
  • TIL(Today I Learned)
  • javascript
    • value-number-string-boolean-null-undefined
    • primitive-reference
    • Hoisting
    • Prototypes in Javascript
    • this
    • prototype
    • ์ฝœ๋ฐฑํ•จ์ˆ˜ (Callback function)
    • ํ•จ์ˆ˜์˜ ํ˜ธ์ถœ
    • ์ž๋ฃŒ๊ตฌ์กฐ new keyword
    • closure
    • Promise
    • event-loop
    • array-object
    • ๊ฐ์ฒด
    • Arguments
    • higher order function
    • operators-function-control-flow
    • ๊ฐ์ฒด ์ƒ์„ฑ ํŒจํ„ด 3๊ฐ€์ง€
    • Javascript scopes
    • Functional Programming
    • Design Patterns
    • ๋ฐ์ดํ„ฐ ํƒ€์ž…
    • Object ๊ฐ์ฒด
    • ํ‘œ์ค€ ๋‚ด์žฅ ๊ฐ์ฒด์˜ ํ™•์žฅ
    • ์ฐธ์กฐ
    • ํ•จ์ˆ˜
    • ์ƒ์†(Inheritance)
    • this - 'this'๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํ•ด๋‹น ํ•จ์ˆ˜๋ฅผ '์–ด๋–ป๊ฒŒ' ์‹คํ–‰ํ•˜๋А๋ƒ์— ๋”ฐ๋ฅธ 4๊ฐ€์ง€ this ์ •์˜
    • ์ „์—ญ๊ฐ์ฒด(Global object)
    • ๊ฐ์ฒด ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ
    • The 'new' keyword - Object Creation in JavaScript
  • javascript-api
    • Number
      • Number.MAX_VALUE
      • Number.isInteger
      • Number.NEGATIVE_INFINITY
      • Number.isNaN()
      • Number.POSITIVE_INFINITY
      • Number.parseFloat
      • Number.EPSILON
      • number.toExponential
      • Number.MAX_SAFE_INTEGER
      • Number1 - ์ž์—ฐ์ˆ˜, ์ •์ˆ˜, 10์ง„์ˆ˜, 2์ง„์ˆ˜, ๋ถ€๋™์†Œ์ˆ˜์ , ์‹ค์ˆ˜
      • Number.isSafeInteger()
      • Number.MIN_VALUE
      • Number.parseInt
      • Number.NaN
      • Number.isFinite()
      • Number.MIN_SAFE_INTEGER
      • toFixed
    • string.split
    • String.fromCodePoint
    • string.trimEnd
    • string.padStart
    • string.@@iterator
    • String.fromCharCode
    • string.toUpperCase
    • string.codePointAt
    • string.toLowerCase()
    • string.toString
    • string.includes
    • string.replace()
    • string.charAt
    • String.lastIndexOf
    • string.slice
    • string.search
    • string.padEnd
    • string.substring
    • string.length
    • string.trim
    • string.localeCompare
    • String.indexOf
    • string.endsWith
    • string.valueOf
    • String.raw
    • string.matchAll()
    • string.repeat
    • string.match
    • String.prototype
    • string.startsWith
    • string.charCodeAt
    • string.trimStart
    • string.concat
    • string.toLocaleUpperCase()
    • string.toLocaleLowerCase
    • String
  • learn-node
    • debugger
    • Tip
  • schema-design
    • Database Schema Design
    • Database Schema Design
  • react
    • LifeCycle
    • redux
    • Context API
    • ํ•จ์ˆ˜ํ˜• ์ปดํฌ๋„ŒํŠธ์™€ ํด๋ž˜์Šค, ์–ด๋–ค ์ฐจ์ด๊ฐ€ ์กด์žฌํ• ๊นŒ?
    • Hooks๊ณผ useEffect ์‚ฌ์šฉํ•ด ๋ณด๊ธฐ
    • Route
    • async wait ์‚ฌ์šฉํ•˜๊ธฐ
    • Hooks API Reference
    • context
    • npm uninstall ํ•˜๋Š”๋ฒ•
    • test ๋งŒ๋“ค๊ธฐ
  • tip
    • ํด๋ฆฐ์ฝ”๋“œ
    • BxSlider๋กœ ํ…์ŠคํŠธ ํ๋ฅด๋Š” ํšจ๊ณผ ๋งŒ๋“ค๊ธฐ
  • javascript30
    • Event Capture, Propagation, Bubbling and Once
    • Object and Arrays - Reference VS Copy
  • typescript
    • ์šฐ์•„ํ•œ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ 2๋ถ€
    • The Basic Cheatsheet
    • TypeScript
    • Type Guards and Differnetiating Types
    • ์šฐ์•„ํ•œ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ
    • Generics
  • git-from-the-hell
    • git
    • init-status-add-commit-log-stage-repository
    • log-diff
    • ๋จธ์ง€ ํ›„ branch ์‚ญ์ œํ•˜๊ธฐ
    • ์ง€์˜ฅ์—์„œ ์˜จ Git
    • reset-revert
    • develop branch ๋ฅผ pull ํ•˜๊ณ  ์‹ถ์„๋•Œ
  • conference-and-seminar
    • ๋ชจ๋˜ ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœํ™˜๊ฒฝ์˜ ์ดํ•ด
  • fire-base
    • Firebase .gitignore
  • vanillacoding
    • Data Structures
    • Sorting Algorithms - part 1
    • Promise
    • class
    • 04.quiz
    • 07.event-loop
    • Design Patterns
    • OOP (Object Oriented Programming)
  • etc
    • ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ฝ”๋“œ๋ฆฌ๋ทฐ
    • ์Šค์Šค๋กœ ๊ณต๋ถ€ํ•˜๋Š” ๋ฒ•
    • ๋ฐ”๋‹๋ผ์ฝ”๋”ฉ ์ˆ˜๊ฐ• ํ›„๊ธฐ
    • async ๊ณผ์ œ ํ›„๊ธฐ - ๋น„๋™๊ธฐ, ๋™๊ธฐ, ํด๋กœ์ €, ๋ฐฐ์—ด๊ณผ ๊ฐ์ฒด
    • ์œ ์šฉํ•œ ์‚ฌ์ดํŠธ
  • algorithm
    • The Supermarket Queue
    • Find the odd int
    • The Office III - Broken Photocopier
    • Directions Reduction
    • The Office II - Boredom Score
    • Divisible Sum Pairs
    • Codewars ์ด์šฉ์ž ์†”๋ฃจ์…˜ ๋ชจ์Œ
    • Shortest Word
    • find key
    • Two Sum
    • Simple Pig Latin
  • Book
    • the essence of object-orientation
      • ํƒ€์ž…๊ณผ ์ถ”์ƒํ™”
      • ๊ฐ์ฒด ์ง€๋„
      • ์ด์ƒํ•œ ๋‚˜๋ผ์˜ ๊ฐ์ฒด
      • ์ถ”์ƒํ™” ๊ธฐ๋ฒ•
      • 05. ์ฑ…์ž„๊ณผ ๋ฉ”์‹œ์ง€
      • 07.ํ•จ๊ป˜ ๋ชจ์œผ๊ธฐ
      • 04. ์—ญํ• , ์ฑ…์ž„, ํ˜‘๋ ฅ
      • ํ˜‘๋ ฅํ•˜๋Š” ๊ฐ์ฒด๋“ค์˜ ๊ณต๋™์ฒด
  • ecma-script2015
    • Object Literal Upgrades
    • default-parameter-template-literals-arrow-functions
    • spread-operator-rest-param
    • let-const-rest-parameter-spread-operator-destructuring
  • http
    • ์›น ๋ธŒ๋ผ์šฐ์ €์— URL์„ ์ž…๋ ฅํ–ˆ์„ ๋•Œ ์–ด๋–ป๊ฒŒ ์›น ํŽ˜์ด์ง€๊ฐ€ ๋ณด์—ฌ์งˆ๊นŒ?
  • jest
    • toThrow(error?)
  • data-structures
    • Data Structures
  • express
    • express generator
    • CORS
  • css-flexible-box-layout
    • flex ํ•ด๋ฒ„๋ ธ์ง€ ๋ญ์•ผ
  • git
    • Git
  • mongodb
    • MongoDB
  • markdown
    • use-markdown
  • cmder
    • cmd ๋ช…๋ น์–ด ๋ชจ์Œ
  • debug
    • trackClicksEx function error
  • npm
    • NPM TOKEN ์„ค์ •ํ•˜๊ธฐ
  • storybook
    • Storybook
  • sort
    • Sorting Algorithms - part 1
  • javascript-koans
    • Javascript Koans ์˜ค๋‹ต๋…ธํŠธ
  • rxjs
    • Rx.js
  • dom-elements
    • HTML Element
  • redux-toolkit
    • Redux Toolkit
  • github-actions
    • GitHub Actions
  • redux-middleware
    • redux middleware
  • rest
    • rest
  • css-rendering
    • ์ฝ”๋“œ ์Šคํ”ผ์ธ  - CSS Rendering 1ํšŒ์ฐจ 2/2
    • ์ฝ”๋“œ ์Šคํ”ผ์ธ  - CSS Rendering 1ํšŒ์ฐจ 1/2
  • you-dont-know-js
    • ํƒ€์ž…
  • server
    • # shutdown local server
  • semantic-versioning
    • Semantic Versioning 2.0.0
Powered by GitBook
On this page
  • ์บก์Аํ™”(Encapsulation)
  • ์ถ”์ƒํ™”(Abstraction)
  • Inheritance
  • SOLID Principle(๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„)

Was this helpful?

  1. vanillacoding

OOP (Object Oriented Programming)

npm ๋ชจ๋“ˆ ๊ฐ™์€๊ฑฐ ์“ฐ๊ธฐ ํŽธํ•œ, ๋ฐœ๋ช…ํ’ˆ ๊ฐ์ฒด๋ฅผ ์œ„์ฃผ๋กœ ์ฝ”๋“œ๋ฅผ ์ •๋ฆฌํ•œ๋‹ค.

๋ฌผ๊ฑด์„ ๋ฐœ๋ช…ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•œ๋‹ค.

๋ ˆ๊ณ ๋ฅผ ์ค€๋‹ค. ์ด๊ฑธ ์ด์šฉํ•ด์„œ ๋ฌด์—‡์„ ๋งŒ๋“ค์ง€๋Š” ์ฐฝ์˜์„ฑ์— ๋‹ฌ๋ฆฐ๊ฒƒ์ด๋‹ค.

๋„ˆ๋ฌด ๊นœ๊นœํ•ด! ๋žจํ”„๋ฅผ ๋งŒ๋“ค๊ณ  ์‹ถ์–ด!

var lamp = {
  brightness: 0, //this๋ฅผ ๋ถ™์ด์ง€ ์•Š์•„๋„ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค. ํ•จ์ˆ˜ํ˜•ํƒœ๊ฐ€ ์•„๋‹ˆ๋ผ์„œ 'ใ…'?
  turnOn: function () {
    this.brightness = 100;
  },
  turnOff: function () {
    this.brightness = 0;
  }
};

lamp.turnOn();
lamp.turnOff();
lamp.brightness = 10000000000000;
function lamp() {
  var brightness = 0; // ์บก์Аํ™” ์ง€์—ญ๋ณ€์ˆ˜๋กœ ๋งŒ๋“ค์—ˆ๋‹ค.
  this.turnOn = function () { // ํด๋กœ์ €๋กœ ๊ธฐ์–ตํ•œ๋‹ค.
    brightness = 100;
    console.log(brightness);
  };
  this.turnOff = function () {
    brightness = 0;
  }
};

var myLamp = new lamp();
myLamp.turnOn();

์บก์Аํ™”(Encapsulation)

์‚ฌ์šฉ์ž๊ฐ€ ๋‚ด๋ถ€์ •๋ณด๋ฅผ ์ ‘๊ทผํ•˜์ง€ ๋ชปํ•˜๋„๋ก ํ•œ๋‹ค.

var lamp = (function(){
  var brightness = 0;

  return { // ํด๋กœ์ €๋กœ ๊ธฐ์–ตํ•˜๊ณ  ์žˆ๋‹ค. ๊ฐ์ฒด๋กœ ๋ฆฌํ„ดํ•ด์ค€๋‹ค. - ํฌ์ธํŠธ
    turnOn: function () {
      brightness = 100;
    },
    turnOff: function () {
      brightness = 0;
    }
  }
})(); // ์ง€์—ญ๋ณ€์ˆ˜๋กœ ๋งŒ๋“ฌ

lamp.turnOn();
lamp.turnOff();

์ถ”์ƒํ™”(Abstraction)

์†Œํ”„ํŠธ๋Š” ๋ณต์žกํ•  ์ˆ˜ ์žˆ์œผ๋‚˜, ์‚ฌ์šฉ์ž๋Š” ๊ธฐ๊ณ„์•ˆ์— ์ƒ์„ธ๋‚ด์šฉ์„ ์•Œ ํ•„์š”๋Š” ์—†๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

factory ํ•จ์ˆ˜ - ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“œ๋Š”๋ฐ ๊ฐ์ฒด๋ฅผ returnํ•˜๊ฒŒ ๋งŒ๋“ ๋‹ค. ์ƒ์„ฑ์žํ•จ์ˆ˜์™€ ํด๋ž˜์Šค๊ฐ€ ์•„๋‹ˆ๋‹ค.

๊ณต์žฅ์ฒ˜๋Ÿผ ์ฐ์–ด๋‚ด๋Š” ํ•จ์ˆ˜๋ฅผ ๋งํ•œ๋‹ค.

ํ˜„๊ด€๋ฌธ์— ์žˆ๋Š” ๋žจํ”„๋ฅผ ๋งŒ๋“ค๊ณ ์ž ํ•œ๋‹ค. ์ด ๋žจํ”„๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๊ฐ„๋‹จํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋ฉด ๋˜๋Š”๊ฑฐ์ง€, ์ด ์ƒ์„ธ๋‚ด์šฉ์„ ์•Œ ํ•„์š”๋Š” ์—†๋‹ค.

var lamp = (function () {
  var brightness = 0;
  return {
    turnOn: function() {
      brightness = 100;
    },
    turnOff: function() {

    },
    autoOnAndOff: function() {
      brightness = 100;
      setTimeout(function () {
        brightness = 0;
      }, 5000)
    }
  };
})();

lamp.autoOnAndOff();

๋žจํ”„๊ฐ€ ๋ช‡ ๊ฐœ ๋” ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

construrctor ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์˜€๋‹ค

function Lamp () {
  this.brightness = 0; // ์—ฌ๊ธฐ์„œ brightness๊ฐ€ ๋…ธ์ถœ์ด ๋˜์ง€๋งŒ ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋” ์ค‘์š”์‹œํ•˜์—ฌ ๋…ธ์ถœ์‹œํ‚ด 
}
Lamp.prototype.turnOn = function () {
  this.brightness = 100;
};
Lamp.prototype.tyrnOff = function () {
  this.brightness = 0;
};
Lamp.prototype.autoOnAndOff = function () {
  var that = this;
  that.brightness = 100;
  setTimeout(function () {
    that.brightness = 0;
  }, 5000);
};

var lamp1 = new Lamp();
var lamp2 = new Lamp();
var lamp3 = new Lamp();

Factory๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ brightness๋ฅผ ์ด์šฉํ•ด์„œ brightness๋ฅผ privateํ•˜๊ฒŒ ๋งŒ๋“ฌ

var lampPrototype = {
  brightness: 0,
  turnOn: function() {
    this.brightness = 100;
  },
  turnOff: function() {
    this.brightness = 0;
  },
  autoOnAndOff: function () {
    this.brightness = 100;

    setTimeout(() => {
      this.brightness = 0;
    }, 5000);
  }
};

function createLamp () {
  return Object.create(lampPrototype); // ๊ฐ์ฒด๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค. ํŒฉํ† ๋ฆฌ ํ•จ์ˆ˜๋‹ค.
}

var lamp1 = createLamp();
var lamp2 = createLamp();
var lamp3 = createLamp();

Factory ํ•จ์ˆ˜๋ž€? ์–ด๋– ํ•œ ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“œ๋Š”๋ฐ ๊ฐ์ฒด๋ฅผ ๋ฆฌํ„ดํ•˜๊ฒŒ ๋งŒ๋“ ๋‹ค. ๊ทธ์น˜๋งŒ ์ด๊ฒƒ์€ ์ƒ์„ฑ์žํ•จ์ˆ˜๋‚˜ ํด๋ž˜์Šค๊ฐ€ ์•„๋‹ˆ๋‹ค.

๋งŒ์•ฝ brightness๋ฅผ ๋ณดํ˜ธํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด?

function createLamp () {
  var brightness = 0; // ํด๋กœ์ €๋ฅผ ์ด์šฉํ•˜๊ณ , ์ง€์—ญ๋ณ€์ˆ˜๋กœ ๋งŒ๋“ ๋‹ค.
  return { // ๊ฐ์ฒด๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค. ํŒฉํ† ๋ฆฌํ•จ์ˆ˜
    turnOn: function() {
        brightness = 100;
    },
    turnOff: functi on() {
      brightness = 0;
    },
    autoOnAndOff: function () {
      brightness = 100;

      setTimeout(() => {
        brightness = 0;
      }, 5000);
    }
  };
}

var lamp1 = createLamp();
var lamp2 = createLamp();
var lamp3 = createLamp();

Inheritance

SOLID Principle, Principle, KISS, GRASP

function Car (owner) {
  this.owner = owner;
}

Car.prototype.soldTo = function (newOwner) {
  this.owner = newOwner;
};

var car = new Car('ken nim');
var car2 = new Car('hoho');

์ „๊ธฐ์ฐจ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž

function ElectricCar (owner) {
  this.owner = owner;
  this.power = 0;
}

ElectricCar.prototype.soldTo = function (newOwner) {
  this.owner = newOwner;
}

ElectricCar.prototype.recharge = function (time) {
  var that = this;
  setTimeout(function () {
    that.power = Math.min((time / 100), 100);
  }, time);
};

Car์ƒ์„ฑ์ž ํ•จ์ˆ˜์™€ ์œ ์‚ฌํ•œ ๋ถ€๋ถ„์ด ์žˆ๋‹ค.

  • ์ฃผ์ธ์ด ์กด์žฌํ•œ๋‹ค.

  • ์–‘๋„๋ฅผ ํ•œ๋‹ค.

์ž๋™์ฐจ๊ฐ€ ํฐ ์นดํ…Œ๊ณ ๋ฆฌ์— ์žˆ๊ณ  ๊ทธ ๋ฐ‘์— ์ „๊ธฐ์ฐจ๊ฐ€ ์žˆ๋‹ค. ํ–‰๋™ ์œ„์ž„์„ ํ†ตํ•ด ์ž๋™์ฐจ์˜ ๊ธฐ๋Šฅ์„ ์ „๊ธฐ์ฐจ๊ฐ€ ์‚ฌ์šฉํ•˜๋„๋ก ํ•˜์ž.

function ElectricCar (owner) {
  // ์—ฌ๊ธฐ์— this๋Š” new ElectricCar('ken'); ํ•˜๋ฉด์„œ ์ƒ์„ฑ๋œ ๋นˆ ๊ฐ์ฒด์˜ this์ด๋‹ค.
  // Car์— ๋นˆ๊ฐ์ฒด์˜ this๋ฅผ ์„ค์ •ํ•˜์˜€๋‹ค.
  Car.call( , owner);
  this.power = 0;
}

ElectricCar.prototype = Object.create(Car.prototype);
// console.log(ElectricCar.prototype.constructor) //car๊ฐ€ ๋‚˜์˜จ๋‹ค. 
// ElectricCar.prototype = { constructor: ElectricCar };
// ElectricCar.prototype๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ํ”„๋กœํ† ํƒ€์ž…์ด๋ผ๋Š” ๊ฐ์ฒด๋Š” ํ•ญ์ƒ constructor๋ผ๋Š” ์†์„ฑ์„
// ๊ฐ€์ง„๋‹ค. ํ•˜์ง€๋งŒ ์œ„์—์„œ ์ƒˆ๋กœ์šด Object.create(Car.prototype);๋ฅผ ๋งŒ๋“ค์–ด์ค˜์„œ
// constructor๋ฅผ ์žƒ๋Š”๊ฒƒ์ด๋‹ค.
ElectricCar.prototype.constructor = ElectricCar;

ElectricCar.prototype.recharge = function (time) {
  var that = this; // ec๋ผ๋Š” reference๋ฅผ ์ƒ์„ฑํ•ด์คฌ๋‹ค.
  setTimeout(function () { // ํ•จ์ˆ˜๊ฐ€ ๋๋‚œ ํ›„ ๋น„๋™๊ธฐ๋กœ ์‹คํ–‰๋˜๊ธฐ ๋•Œ๋ฌธ์— this๋ฅผ ์žƒ๊ณ  ๋งŒ๋‹ค.
    that.power = Math.min((time / 100), 100); // ์Šค์ฝ”ํ”„์ฒด์ธ์„ ํƒ€๊ณ  ์˜ฌ๋ผ๊ฐ€์„œ that์„ ์ฐพ๋Š”๋‹ค.
  }, time);
};

var ec = new ElectricCar('ken');
ec.soldto('aaa') // soldto๋ผ๋Š”๊ฒŒ ์‹ค์ œ ๋งŒ๋“ค์–ด๋†“์ง„ ์•Š์•˜์ง€๋งŒ ํ”„๋กœํ† ํƒ€์ž… ์ฒด์ธ์œผ๋กœ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•ด์กŒ๋‹ค.

SOLID Principle(๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„)

๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„๋ฅผ ๋งํ•˜๋ฉฐ, ๊ฐ์ฒด์ง€ํ–ฅ์˜ ๋‹ค์„ฏ๊ฐ€์ง€ ๊ธฐ๋ณธ ์›์น™์„ ๋งํ•œ๋‹ค. ์‹œ๊ฐ„์ด ์ง€๋‚˜๋„ ์œ ์ง€๋ณด์ˆ˜์™€ ํ™•์žฅ์ด ์‰ฌ์šด ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค๊ณ ์ž ํ•  ๋•Œ ์ด ์›์น™๋“ค์„ ํ•จ๊ป˜ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

๊ฐœ๋…

์„ค๋ช…

Single responsibility principle(๋‹จ์ผ ์ฑ…์ž„ ์›์น™)

ํ•œ ํด๋ž˜์Šค๋Š” ํ•˜๋‚˜์˜ ์ฑ…์ž„๋งŒ ๊ฐ€์ ธ์•ผ ํ•œ๋‹ค.

Open / closed principle(๊ฐœ๋ฐฉ ํ์‡„ ์›์น™)

ํ™•์žฅ์—๋Š” ์—ด๋ ค ์žˆ์–ด์•ผ ํ•˜๊ณ  ๋ณ€๊ฒฝ์—๋Š” ๋‹ซํ˜€ ์žˆ์–ด์•ผํ•œ๋‹ค.

Dependency inversion principle(์˜์กด๊ด€๊ณ„ ์—ญ์ „ ์›์น™)

ํ”„๋กœ๊ทธ๋ž˜๋จธ๋Š” ์ถ”์ƒํ™”์— ์˜์กดํ•ด์•ผ์ง€, ๊ตฌ์ฒดํ™”์— ์˜์กดํ•˜๋ฉด ์•ˆ๋œ๋‹ค.???

PreviousDesign PatternsNextetc

Last updated 5 years ago

Was this helpful?

link