SOLID là 5 nguyên tắc trong kiến thiết phần mềm giúp code trlàm việc cần dễ nắm bắt, biến hóa năng động và dễ dàng gia hạn hơn. 5 nguyên tắc trong SOLID bao gồm:
S: Single responsibility principleO: Open/closed principleL: Liskov substitution principleI: Interface segregation principleD: Dependency inversion principleA class should have only a single responsibility.Một class nên chỉ cách xử trí 1-1 nhiệm.
Bạn đang xem: Solid là gì, tìm hiểu nhanh solid thần thánh
class Accountant prepareAccountsAndTaxReturns() : void ; administerPayrolls() : void ; controllingIncomeAndExpenditure() : void ;
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.Các đối tượng người sử dụng của class thân phụ có thể được sửa chữa vì chưng những đối tượng người dùng của những class nhỏ mà lại ko làm chuyển đổi tính đúng mực của công tác.
Many client-specific interfaces are better than one general-purpose interface.Nên tách thành các interface nhỏ tuổi cho những mục tiêu riêng biệt, không nên nhằm 1 interface phình quá to lớn mang đến nhiều mục tiêu.
Xem thêm: Chức Năng Của File Siêu Fix Giảm Lag Free Fire Ob19, Tải Về Fix Lag Free Fire Ob19 Nhẹ V2
interface IAccountant prepareAccountsAndTaxReturns(): void; administerPayrolls(): void; controllingIncomeAndExpenditure(): void;interface IJSobatambeienwasirherbal.comeloper codeJS(): void;interface IReactJsobatambeienwasirherbal.comeloper extends IJSobatambeienwasirherbal.comeloper codeReactJS(): void;
class VueJSobatambeienwasirherbal.comeloper extends IJSobatambeienwasirherbal.comeloper codeJS(): void // override improve sầu JS performance coobatambeienwasirherbal.comueJS(): void ;class WebProject private jsobatambeienwasirherbal.comeloper : IJSobatambeienwasirherbal.comeloper; constructor(jsobatambeienwasirherbal.comeloper VueJSobatambeienwasirherbal.comeloper) kickOff(): void jsobatambeienwasirherbal.comeloper.codeJS();
Lúc chọn lọc obatambeienwasirherbal.comeloper mang lại Frontover dự án thì rất có thể chọn VueJS obatambeienwasirherbal.comeloper làm nguồn vào.Dự án tiếp theo sau có thể lựa chọn ReactJS obatambeienwasirherbal.comeloper làm cho frontend.
Marteo Siccardi - Mar 29
Built on Forem — the open source software that powers obatambeienwasirherbal.com and other inclusive communities.