Thursday, March 9, 2023

solid

 SOLID / solid

1. đ—Ļđ—ļđ—ģ𝗴𝗹𝗲 đ—Ĩ𝗲𝘀đ—Ŋđ—ŧđ—ģ𝘀đ—ļđ—¯đ—ļ𝗹đ—ļ𝘁𝘆 đ—Ŗđ—ŋđ—ļđ—ģ𝗰đ—ļđ—Ŋ𝗹𝗲 (đ—Ļđ—Ĩđ—Ŗ)

A class should have only one reason to change. In other words, a class should have a single, well-defined responsibility. That class should entirely encapsulate responsibility.

2. đ—ĸđ—Ŋ𝗲đ—ģ/𝗖𝗹đ—ŧ𝘀𝗲𝗱 đ—Ŗđ—ŋđ—ļđ—ģ𝗰đ—ļđ—Ŋ𝗹𝗲 (đ—ĸđ—–đ—Ŗ)

Software entities (classes, functions, etc.) should be open for extension but closed for modification. You should be able to add new functionality to a class without changing its existing code, but you should not need to modify the class itself to do so.

3. 𝗟đ—ļ𝘀𝗸đ—ŧ𝘃 đ—Ļđ˜‚đ—¯đ˜€đ˜đ—ļ𝘁𝘂𝘁đ—ļđ—ŧđ—ģ đ—Ŗđ—ŋđ—ļđ—ģ𝗰đ—ļđ—Ŋ𝗹𝗲 (𝗟đ—Ļđ—Ŗ)

Subtypes must be substitutable for their base types. In other words, if a class is derived from another class, you should be able to use the derived class in the same way as the base class without any issues.

4. 𝗜đ—ģ𝘁𝗲đ—ŋđ—ŗđ—Žđ—°đ—˛ đ—Ļ𝗲𝗴đ—ŋ𝗲𝗴𝗮𝘁đ—ļđ—ŧđ—ģ đ—Ŗđ—ŋđ—ļđ—ģ𝗰đ—ļđ—Ŋ𝗹𝗲 (𝗜đ—Ļđ—Ŗ)

Clients should not depend on interfaces they do not use. This means you should design your interfaces as specific and focused as possible.

5. 𝗗𝗲đ—Ŋ𝗲đ—ģ𝗱𝗲đ—ģ𝗰𝘆 𝗜đ—ģ𝘃𝗲đ—ŋ𝘀đ—ļđ—ŧđ—ģ đ—Ŗđ—ŋđ—ļđ—ģ𝗰đ—ļđ—Ŋ𝗹𝗲 (đ——đ—œđ—Ŗ)

High-level modules should not depend on low-level modules. Both should depend on abstractions. Design your software so high-level modules depend on abstractions rather than concrete implementations.





















TWIN MODULE - Dyncraft

eBom vs mBom  SELECT distinct * FROM [DataStage].[dbo].[CUMEBOM_LOADING] as CL where CL.LineSeqNbr='T0890F0' and CL.ChassisNbr='...