μ μ°μ±, μ μ§λ³΄μμ±, ν μ€νΈ μ©μ΄μ±μ κ°μΆ 볡μ‘ν κ°μ²΄ μμ±μ μν κ³ κΈ μλ°μ€ν¬λ¦½νΈ λͺ¨λ ν¨ν΄μ μ΄ν΄λ³΄μΈμ. ν©ν 리, λΉλ, νλ‘ν νμ ν¨ν΄μ μ€μ μμ μ ν¨κ» λ°°μλ΄ λλ€.
μλ°μ€ν¬λ¦½νΈ λͺ¨λ λΉλ ν¨ν΄: 볡μ‘ν κ°μ²΄ μμ± λ§μ€ν°νκΈ°
μλ°μ€ν¬λ¦½νΈμμ 볡μ‘ν κ°μ²΄λ₯Ό μμ±νλ κ²μ κΈλ°© λ€λ£¨κΈ° μ΄λ €μμ Έ μ μ§λ³΄μ, ν μ€νΈ, νμ₯μ΄ μ΄λ €μ΄ μ½λλ‘ μ΄μ΄μ§ μ μμ΅λλ€. λͺ¨λ ν¨ν΄μ μ½λλ₯Ό ꡬμ±νκ³ κΈ°λ₯μ μΊ‘μννλ ꡬ쑰μ μΈ μ κ·Ό λ°©μμ μ 곡ν©λλ€. μ΄λ¬ν ν¨ν΄ μ€μμλ ν©ν 리(Factory), λΉλ(Builder), νλ‘ν νμ (Prototype) ν¨ν΄μ 볡μ‘ν κ°μ²΄ μμ±μ κ΄λ¦¬νλ κ°λ ₯ν λκ΅¬λ‘ λ보μ λλ€. μ΄ κΈμμλ μ΄λ¬ν ν¨ν΄λ€μ κΉμ΄ μκ² λ€λ£¨κ³ , μ€μ μμ λ₯Ό μ 곡νλ©°, κ²¬κ³ νκ³ νμ₯ κ°λ₯ν μλ°μ€ν¬λ¦½νΈ μ ν리μΌμ΄μ μ ꡬμΆνλ λ° μμ΄ κ·Έ μ΄μ λ€μ κ°μ‘°ν©λλ€.
κ°μ²΄ μμ± ν¨ν΄μ νμμ± μ΄ν΄νκΈ°
μμ±μλ₯Ό μ¬μ©νμ¬ λ³΅μ‘ν κ°μ²΄λ₯Ό μ§μ μΈμ€ν΄μ€ννλ©΄ μ¬λ¬ λ¬Έμ κ° λ°μν μ μμ΅λλ€:
- κ°ν κ²°ν©(Tight Coupling): ν΄λΌμ΄μΈνΈ μ½λκ° νΉμ μΈμ€ν΄μ€νλλ ν΄λμ€μ κ°νκ² κ²°ν©λμ΄, ꡬνμ λ°κΎΈκ±°λ μλ‘μ΄ λ³νμ λμ νκΈ° μ΄λ €μμ§λλ€.
- μ½λ μ€λ³΅(Code Duplication): κ°μ²΄ μμ± λ‘μ§μ΄ μ½λλ² μ΄μ€μ μ¬λ¬ λΆλΆμ μ€λ³΅λ μ μμ΄, μ€λ₯ λ°μ μνμ λμ΄κ³ μ μ§λ³΄μλ₯Ό λ μ΄λ ΅κ² λ§λλλ€.
- 볡μ‘μ±(Complexity): μμ±μ μμ²΄κ° μλ§μ λ§€κ°λ³μμ μ΄κΈ°ν λ¨κ³λ₯Ό μ²λ¦¬νλ©΄μ μ§λμΉκ² 볡μ‘ν΄μ§ μ μμ΅λλ€.
κ°μ²΄ μμ± ν¨ν΄μ μΈμ€ν΄μ€ν κ³Όμ μ μΆμννκ³ , λμ¨ν κ²°ν©μ μ΄μ§νλ©°, μ½λ μ€λ³΅μ μ€μ΄κ³ , 볡μ‘ν κ°μ²΄μ μμ±μ λ¨μνν¨μΌλ‘μ¨ μ΄λ¬ν λ¬Έμ λ€μ ν΄κ²°ν©λλ€.
ν©ν 리 ν¨ν΄(The Factory Pattern)
ν©ν 리 ν¨ν΄μ μΈμ€ν΄μ€νν μ νν ν΄λμ€λ₯Ό μ§μ νμ§ μκ³ λ λ€μν νμ μ κ°μ²΄λ₯Ό μμ±νλ μ€μ μ§μ€μ λ°©λ²μ μ 곡ν©λλ€. μ΄λ κ°μ²΄ μμ± λ‘μ§μ μΊ‘μννμ¬, νΉμ κΈ°μ€μ΄λ ꡬμ±μ λ°λΌ κ°μ²΄λ₯Ό μμ±ν μ μκ² ν΄μ€λλ€. μ΄λ₯Ό ν΅ν΄ λμ¨ν κ²°ν©μ΄ μ΄μ§λκ³ λ€λ₯Έ ꡬνμΌλ‘ μ½κ² μ νν μ μμ΅λλ€.
ν©ν 리 ν¨ν΄μ μ’ λ₯
ν©ν 리 ν¨ν΄μλ μ¬λ¬ λ³νμ΄ μμ΅λλ€:
- λ¨μ ν©ν 리(Simple Factory): μ£Όμ΄μ§ μ λ ₯μ κΈ°λ°μΌλ‘ κ°μ²΄λ₯Ό μμ±νλ λ¨μΌ ν©ν 리 ν΄λμ€μ λλ€.
- ν©ν 리 λ©μλ(Factory Method): κ°μ²΄ μμ±μ μν λ©μλλ₯Ό μ μνλ μΈν°νμ΄μ€ λλ μΆμ ν΄λμ€λ‘, μλΈν΄λμ€κ° μ΄λ€ ν΄λμ€λ₯Ό μΈμ€ν΄μ€νν μ§ κ²°μ νλλ‘ ν©λλ€.
- μΆμ ν©ν 리(Abstract Factory): ꡬ체μ μΈ ν΄λμ€λ₯Ό μ§μ νμ§ μκ³ κ΄λ ¨ μκ±°λ μμ‘΄μ μΈ κ°μ²΄λ€μ ν¨λ°λ¦¬λ₯Ό μμ±νκΈ° μν μΈν°νμ΄μ€λ₯Ό μ 곡νλ μΈν°νμ΄μ€ λλ μΆμ ν΄λμ€μ λλ€.
λ¨μ ν©ν 리 μμ
μ¬μ©μμ μν (μ: AdminUser, RegularUser, GuestUser)μ λ°λΌ λ€λ₯Έ νμ μ μ¬μ©μ κ°μ²΄λ₯Ό μμ±ν΄μΌ νλ μλ리μ€λ₯Ό μκ°ν΄ λ΄ μλ€.
// User classes
class AdminUser {
constructor(name) {
this.name = name;
this.role = 'admin';
}
}
class RegularUser {
constructor(name) {
this.name = name;
this.role = 'regular';
}
}
class GuestUser {
constructor() {
this.name = 'Guest';
this.role = 'guest';
}
}
// Simple Factory
class UserFactory {
static createUser(role, name) {
switch (role) {
case 'admin':
return new AdminUser(name);
case 'regular':
return new RegularUser(name);
case 'guest':
return new GuestUser();
default:
throw new Error('Invalid user role');
}
}
}
// Usage
const admin = UserFactory.createUser('admin', 'Alice');
const regular = UserFactory.createUser('regular', 'Bob');
const guest = UserFactory.createUser('guest');
console.log(admin);
console.log(regular);
console.log(guest);
ν©ν 리 λ©μλ μμ
μ΄μ ν©ν 리 λ©μλ ν¨ν΄μ ꡬνν΄ λ΄ μλ€. ν©ν 리λ₯Ό μν μΆμ ν΄λμ€λ₯Ό λ§λ€κ³ κ° μ¬μ©μ νμ μ ν©ν 리μ λν μλΈν΄λμ€λ₯Ό λ§λ€ κ²μ λλ€.
// Abstract Factory
class UserFactory {
createUser(name) {
throw new Error('Method not implemented');
}
}
// Concrete Factories
class AdminUserFactory extends UserFactory {
createUser(name) {
return new AdminUser(name);
}
}
class RegularUserFactory extends UserFactory {
createUser(name) {
return new RegularUser(name);
}
}
// Usage
const adminFactory = new AdminUserFactory();
const regularFactory = new RegularUserFactory();
const admin = adminFactory.createUser('Alice');
const regular = regularFactory.createUser('Bob');
console.log(admin);
console.log(regular);
μΆμ ν©ν 리 μμ
κ΄λ ¨ κ°μ²΄λ€μ ν¨λ°λ¦¬λ₯Ό ν¬ν¨νλ λ 볡μ‘ν μλ리μ€λ₯Ό μν΄ μΆμ ν©ν 리λ₯Ό κ³ λ €ν΄ λ΄ μλ€. λ€λ₯Έ μ΄μ 체μ (μ: Windows, macOS)λ₯Ό μν UI μμλ₯Ό μμ±ν΄μΌ νλ€κ³ μμν΄ λ³΄μΈμ. κ° OSλ νΉμ UI μ»΄ν¬λνΈ(λ²νΌ, ν μ€νΈ νλ λ±) μΈνΈλ₯Ό νμλ‘ ν©λλ€.
// Abstract Products
class Button {
render() {
throw new Error('Method not implemented');
}
}
class TextField {
render() {
throw new Error('Method not implemented');
}
}
// Concrete Products
class WindowsButton extends Button {
render() {
return 'Windows Button';
}
}
class macOSButton extends Button {
render() {
return 'macOS Button';
}
}
class WindowsTextField extends TextField {
render() {
return 'Windows TextField';
}
}
class macOSTextField extends TextField {
render() {
return 'macOS TextField';
}
}
// Abstract Factory
class UIFactory {
createButton() {
throw new Error('Method not implemented');
}
createTextField() {
throw new Error('Method not implemented');
}
}
// Concrete Factories
class WindowsUIFactory extends UIFactory {
createButton() {
return new WindowsButton();
}
createTextField() {
return new WindowsTextField();
}
}
class macOSUIFactory extends UIFactory {
createButton() {
return new macOSButton();
}
createTextField() {
return new macOSTextField();
}
}
// Usage
function createUI(factory) {
const button = factory.createButton();
const textField = factory.createTextField();
return {
button: button.render(),
textField: textField.render()
};
}
const windowsUI = createUI(new WindowsUIFactory());
const macOSUI = createUI(new macOSUIFactory());
console.log(windowsUI);
console.log(macOSUI);
ν©ν 리 ν¨ν΄μ μ₯μ
- λμ¨ν κ²°ν©(Loose Coupling): ν΄λΌμ΄μΈνΈ μ½λλ₯Ό μΈμ€ν΄μ€νλλ ꡬ체μ μΈ ν΄λμ€λ‘λΆν° λΆλ¦¬ν©λλ€.
- μΊ‘μν(Encapsulation): κ°μ²΄ μμ± λ‘μ§μ ν κ³³μ μΊ‘μνν©λλ€.
- μ μ°μ±(Flexibility): λ€λ₯Έ ꡬνμΌλ‘ μ ννκ±°λ μλ‘μ΄ νμ μ κ°μ²΄λ₯Ό μΆκ°νκΈ° μ½κ² λ§λλλ€.
- ν μ€νΈ μ©μ΄μ±(Testability): ν©ν 리λ₯Ό λͺ¨μ(mock)νκ±°λ μ€ν (stub)μΌλ‘ μ²λ¦¬ν μ μμ΄ ν μ€νΈλ₯Ό λ¨μνν©λλ€.
λΉλ ν¨ν΄(The Builder Pattern)
λΉλ ν¨ν΄μ μλ§μ μ νμ λ§€κ°λ³μλ ꡬμ±μ κ°μ§ 볡μ‘ν κ°μ²΄λ₯Ό μμ±ν΄μΌ ν λ νΉν μ μ©ν©λλ€. μ΄λ¬ν λͺ¨λ λ§€κ°λ³μλ₯Ό μμ±μμ μ λ¬νλ λμ , λΉλ ν¨ν΄μ κ°μ²΄λ₯Ό λ¨κ³λ³λ‘ ꡬμ±ν μ μκ² ν΄μ£Όλ©°, κ° λ§€κ°λ³μλ₯Ό κ°λ³μ μΌλ‘ μ€μ ν μ μλ μ μ°ν(fluent) μΈν°νμ΄μ€λ₯Ό μ 곡ν©λλ€.
λΉλ ν¨ν΄μ μ¬μ©ν΄μΌ ν λ
λΉλ ν¨ν΄μ λ€μκ³Ό κ°μ μλ리μ€μ μ ν©ν©λλ€:
- κ°μ²΄ μμ± κ³Όμ μ΄ μ¬λ¬ λ¨κ³λ‘ μ΄λ£¨μ΄μ§ λ.
- κ°μ²΄μ μ νμ λ§€κ°λ³μκ° λ§μ λ.
- κ°μ²΄λ₯Ό ꡬμ±νλ λͺ ννκ³ κ°λ μ± μ’μ λ°©λ²μ μ 곡νκ³ μΆμ λ.
λΉλ ν¨ν΄ μμ
λ€μν μ νμ κ΅¬μ± μμ(μ: CPU, RAM, μ μ₯ 곡κ°, κ·Έλν½ μΉ΄λ)λ₯Ό κ°μ§ `Computer` κ°μ²΄λ₯Ό μμ±ν΄μΌ νλ μλ리μ€λ₯Ό μκ°ν΄ λ΄ μλ€. λΉλ ν¨ν΄μ μ΄ κ°μ²΄λ₯Ό ꡬ쑰μ μ΄κ³ κ°λ μ± μ’κ² λ§λλ λ° λμμ μ€ μ μμ΅λλ€.
// Computer class
class Computer {
constructor(cpu, ram, storage, graphicsCard, monitor) {
this.cpu = cpu;
this.ram = ram;
this.storage = storage;
this.graphicsCard = graphicsCard;
this.monitor = monitor;
}
toString() {
return `Computer: CPU=${this.cpu}, RAM=${this.ram}, Storage=${this.storage}, GraphicsCard=${this.graphicsCard}, Monitor=${this.monitor}`;
}
}
// Builder class
class ComputerBuilder {
constructor() {
this.cpu = null;
this.ram = null;
this.storage = null;
this.graphicsCard = null;
this.monitor = null;
}
setCPU(cpu) {
this.cpu = cpu;
return this;
}
setRAM(ram) {
this.ram = ram;
return this;
}
setStorage(storage) {
this.storage = storage;
return this;
}
setGraphicsCard(graphicsCard) {
this.graphicsCard = graphicsCard;
return this;
}
setMonitor(monitor) {
this.monitor = monitor;
return this;
}
build() {
return new Computer(this.cpu, this.ram, this.storage, this.graphicsCard, this.monitor);
}
}
// Usage
const builder = new ComputerBuilder();
const myComputer = builder
.setCPU('Intel i7')
.setRAM('16GB')
.setStorage('1TB SSD')
.setGraphicsCard('Nvidia RTX 3080')
.setMonitor('32-inch 4K')
.build();
console.log(myComputer.toString());
const basicComputer = new ComputerBuilder()
.setCPU("Intel i3")
.setRAM("8GB")
.setStorage("500GB HDD")
.build();
console.log(basicComputer.toString());
λΉλ ν¨ν΄μ μ₯μ
- κ°λ μ± ν₯μ(Improved Readability): 볡μ‘ν κ°μ²΄λ₯Ό ꡬμ±νκΈ° μν μ μ°ν μΈν°νμ΄μ€λ₯Ό μ 곡νμ¬ μ½λλ₯Ό λ μ½κΈ° μ½κ³ μ μ§λ³΄μνκΈ° μ’κ² λ§λλλ€.
- 볡μ‘μ± κ°μ(Reduced Complexity): κ°μ²΄ μμ± κ³Όμ μ μκ³ κ΄λ¦¬ κ°λ₯ν λ¨κ³λ‘ λλμ΄ λ¨μνν©λλ€.
- μ μ°μ±(Flexibility): λ§€κ°λ³μμ λ€μν μ‘°ν©μ ꡬμ±νμ¬ κ°μ²΄μ μ¬λ¬ λ³νμ λ§λ€ μ μμ΅λλ€.
- μ μΈ΅μ μμ±μ λ°©μ§(Prevents Telescoping Constructors): λ€μν λ§€κ°λ³μ λͺ©λ‘μ κ°μ§ μ¬λ¬ μμ±μκ° νμν κ²½μ°λ₯Ό νΌν μ μμ΅λλ€.
νλ‘ν νμ ν¨ν΄(The Prototype Pattern)
νλ‘ν νμ ν¨ν΄μ νλ‘ν νμ μ΄λΌκ³ μλ €μ§ κΈ°μ‘΄ κ°μ²΄λ₯Ό 볡μ νμ¬ μλ‘μ΄ κ°μ²΄λ₯Ό μμ±ν μ μκ² ν΄μ€λλ€. μ΄λ μλ‘ μ μ¬ν κ°μ²΄λ₯Ό μμ±ν λλ κ°μ²΄ μμ± κ³Όμ μ λΉμ©μ΄ λ§μ΄ λ€ λ νΉν μ μ©ν©λλ€.
νλ‘ν νμ ν¨ν΄μ μ¬μ©ν΄μΌ ν λ
νλ‘ν νμ ν¨ν΄μ λ€μκ³Ό κ°μ μλ리μ€μ μ ν©ν©λλ€:
- μλ‘ μ μ¬ν κ°μ²΄λ₯Ό λ§μ΄ μμ±ν΄μΌ ν λ.
- κ°μ²΄ μμ± κ³Όμ μ μ°μ° λΉμ©μ΄ λ§μ΄ λ€ λ.
- μλΈν΄λμ±μ νΌνκ³ μΆμ λ.
νλ‘ν νμ ν¨ν΄ μμ
λ€λ₯Έ μμ±(μ: μμ, μμΉ)μ κ°μ§ μ¬λ¬ `Shape` κ°μ²΄λ₯Ό μμ±ν΄μΌ νλ μλ리μ€λ₯Ό μκ°ν΄ λ΄ μλ€. κ° κ°μ²΄λ₯Ό μ²μλΆν° λ§λλ λμ , νλ‘ν νμ λͺ¨μμ λ§λ€κ³ μ΄λ₯Ό 볡μ νμ¬ μμ±μ΄ μμ λ μλ‘μ΄ λͺ¨μμ λ§λ€ μ μμ΅λλ€.
// Shape class
class Shape {
constructor(color = 'red', x = 0, y = 0) {
this.color = color;
this.x = x;
this.y = y;
}
draw() {
console.log(`Drawing shape at (${this.x}, ${this.y}) with color ${this.color}`);
}
clone() {
return Object.assign(Object.create(Object.getPrototypeOf(this)), this);
}
}
// Usage
const prototypeShape = new Shape();
const shape1 = prototypeShape.clone();
shape1.x = 10;
shape1.y = 20;
shape1.color = 'blue';
shape1.draw();
const shape2 = prototypeShape.clone();
shape2.x = 30;
shape2.y = 40;
shape2.color = 'green';
shape2.draw();
prototypeShape.draw(); // Original prototype remains unchanged
κΉμ 볡μ¬(Deep Cloning)
μμ μμ λ μμ 볡μ¬(shallow copy)λ₯Ό μνν©λλ€. μ€μ²©λ κ°μ²΄λ λ°°μ΄μ ν¬ν¨νλ κ°μ²΄μ κ²½μ°, μ°Έμ‘°λ₯Ό 곡μ νμ§ μμΌλ €λ©΄ κΉμ 볡μ¬(deep cloning) λ©μ»€λμ¦μ΄ νμν©λλ€. Lodashμ κ°μ λΌμ΄λΈλ¬λ¦¬λ κΉμ λ³΅μ¬ ν¨μλ₯Ό μ 곡νλ©°, μ§μ μ¬κ·μ μΈ κΉμ λ³΅μ¬ ν¨μλ₯Ό ꡬνν μλ μμ΅λλ€.
// Deep clone function (using JSON stringify/parse)
function deepClone(obj) {
return JSON.parse(JSON.stringify(obj));
}
// Example with nested object
class Circle {
constructor(radius, style = { color: 'red' }) {
this.radius = radius;
this.style = style;
}
clone() {
return deepClone(this);
}
draw() {
console.log(`Drawing a circle with radius ${this.radius} and color ${this.style.color}`);
}
}
const originalCircle = new Circle(5, { color: 'blue' });
const clonedCircle = originalCircle.clone();
clonedCircle.radius = 10;
clonedCircle.style.color = 'green';
originalCircle.draw(); // Output: Drawing a circle with radius 5 and color blue
clonedCircle.draw(); // Output: Drawing a circle with radius 10 and color green
νλ‘ν νμ ν¨ν΄μ μ₯μ
- κ°μ²΄ μμ± λΉμ© κ°μ(Reduced Object Creation Cost): κΈ°μ‘΄ κ°μ²΄λ₯Ό 볡μ νμ¬ μλ‘μ΄ κ°μ²΄λ₯Ό μμ±νλ―λ‘, λΉμ©μ΄ λ§μ΄ λλ μ΄κΈ°ν λ¨κ³λ₯Ό νΌν μ μμ΅λλ€.
- λ¨μνλ κ°μ²΄ μμ±(Simplified Object Creation): κ°μ²΄ μ΄κΈ°νμ 볡μ‘μ±μ μ¨κ²¨ κ°μ²΄ μμ± κ³Όμ μ λ¨μνν©λλ€.
- λμ κ°μ²΄ μμ±(Dynamic Object Creation): κΈ°μ‘΄ νλ‘ν νμ μ κΈ°λ°μΌλ‘ λμ μΌλ‘ μλ‘μ΄ κ°μ²΄λ₯Ό μμ±ν μ μμ΅λλ€.
- μλΈν΄λμ± ννΌ(Avoids Subclassing): κ°μ²΄μ λ³νμ λ§λ€κΈ° μν μλΈν΄λμ±μ λμμΌλ‘ μ¬μ©λ μ μμ΅λλ€.
μ¬λ°λ₯Έ ν¨ν΄ μ ννκΈ°
μ΄λ€ κ°μ²΄ μμ± ν¨ν΄μ μ¬μ©ν μ§ μ ννλ κ²μ μ ν리μΌμ΄μ μ νΉμ μꡬ μ¬νμ λ°λΌ λ¬λΌμ§λλ€. λ€μμ λΉ λ₯Έ κ°μ΄λμ λλ€:
- ν©ν 리 ν¨ν΄: νΉμ κΈ°μ€μ΄λ ꡬμ±μ λ°λΌ λ€λ₯Έ νμ μ κ°μ²΄λ₯Ό μμ±ν΄μΌ ν λ μ¬μ©ν©λλ€. κ°μ²΄ μμ±μ΄ λΉκ΅μ κ°λ¨νμ§λ§ ν΄λΌμ΄μΈνΈμ λΆλ¦¬λμ΄μΌ ν λ μ’μ΅λλ€.
- λΉλ ν¨ν΄: μλ§μ μ νμ λ§€κ°λ³μλ ꡬμ±μ κ°μ§ 볡μ‘ν κ°μ²΄λ₯Ό μμ±ν΄μΌ ν λ μ¬μ©ν©λλ€. κ°μ²΄ ꡬμ±μ΄ λ€λ¨κ³ νλ‘μΈμ€μΌ λ κ°μ₯ μ’μ΅λλ€.
- νλ‘ν νμ ν¨ν΄: μλ‘ μ μ¬ν κ°μ²΄λ₯Ό λ§μ΄ μμ±ν΄μΌ νκ±°λ κ°μ²΄ μμ± κ³Όμ μ λΉμ©μ΄ λ§μ΄ λ€ λ μ¬μ©ν©λλ€. κΈ°μ‘΄ κ°μ²΄μ 볡μ¬λ³Έμ λ§λλ λ° μ΄μμ μ΄λ©°, νΉν 볡μ κ° μ²μλΆν° λ§λλ κ²λ³΄λ€ ν¨μ¨μ μΌ κ²½μ°μ μ’μ΅λλ€.
μ€μ μΈκ³μ μμ
μ΄λ¬ν ν¨ν΄λ€μ λ§μ μλ°μ€ν¬λ¦½νΈ νλ μμν¬μ λΌμ΄λΈλ¬λ¦¬μμ κ΄λ²μνκ² μ¬μ©λ©λλ€. λ€μμ λͺ κ°μ§ μ€μ μμμ λλ€:
- 리μ‘νΈ μ»΄ν¬λνΈ(React Components): ν©ν 리 ν¨ν΄μ propsλ ꡬμ±μ λ°λΌ λ€λ₯Έ νμ μ 리μ‘νΈ μ»΄ν¬λνΈλ₯Ό μμ±νλ λ° μ¬μ©λ μ μμ΅λλ€.
- 리λμ€ μ‘μ (Redux Actions): ν©ν 리 ν¨ν΄μ λ€λ₯Έ νμ΄λ‘λλ₯Ό κ°μ§ 리λμ€ μ‘μ μ μμ±νλ λ° μ¬μ©λ μ μμ΅λλ€.
- κ΅¬μ± κ°μ²΄(Configuration Objects): λΉλ ν¨ν΄μ μλ§μ μ νμ μ€μ μ κ°μ§ 볡μ‘ν κ΅¬μ± κ°μ²΄λ₯Ό μμ±νλ λ° μ¬μ©λ μ μμ΅λλ€.
- κ²μ κ°λ°(Game Development): νλ‘ν νμ ν¨ν΄μ νλ‘ν νμ μ κΈ°λ°μΌλ‘ κ²μ μν°ν°(μ: μΊλ¦ν°, μ )μ μ¬λ¬ μΈμ€ν΄μ€λ₯Ό μμ±νκΈ° μν΄ κ²μ κ°λ°μμ μμ£Ό μ¬μ©λ©λλ€.
κ²°λ‘
ν©ν 리, λΉλ, νλ‘ν νμ ν¨ν΄κ³Ό κ°μ κ°μ²΄ μμ± ν¨ν΄μ λ§μ€ν°νλ κ²μ κ²¬κ³ νκ³ , μ μ§λ³΄μ κ°λ₯νλ©°, νμ₯ κ°λ₯ν μλ°μ€ν¬λ¦½νΈ μ ν리μΌμ΄μ μ ꡬμΆνλ λ° νμμ μ λλ€. κ° ν¨ν΄μ κ°μ κ³Ό μ½μ μ μ΄ν΄ν¨μΌλ‘μ¨, μ£Όμ΄μ§ μμ μ μ ν©ν λꡬλ₯Ό μ ννκ³ μ°μνκ³ ν¨μ¨μ μΌλ‘ 볡μ‘ν κ°μ²΄λ₯Ό μμ±ν μ μμ΅λλ€. μ΄λ¬ν ν¨ν΄λ€μ λμ¨ν κ²°ν©μ μ΄μ§νκ³ , μ½λ μ€λ³΅μ μ€μ΄λ©°, κ°μ²΄ μμ± κ³Όμ μ λ¨μννμ¬ λ κΉ¨λνκ³ , ν μ€νΈνκΈ° μ¬μ°λ©°, μ μ§λ³΄μνκΈ° μ’μ μ½λλ‘ μ΄μ΄μ§λλ€. μ΄λ¬ν ν¨ν΄λ€μ μ μ€νκ² μ μ©ν¨μΌλ‘μ¨ μλ°μ€ν¬λ¦½νΈ νλ‘μ νΈμ μ λ°μ μΈ νμ§μ ν¬κ² ν₯μμν¬ μ μμ΅λλ€.