EngineeringSenior DeveloperArchitecture and Patterns

07 - Structural Design Patterns

Premium

Patterns tổ chức quan hệ giữa các objects: Adapter, Decorator, Facade, Proxy, Composite.


Adapter - Chuyển Đổi Interface

csharp
// Bọc third-party SDK cho phù hợp với interface của bạn
public interface IPaymentGateway
{
    Task<PaymentResult> ChargeAsync(decimal amount, string currency);
}

// Stripe SDK dùng API khác hoàn toàn
Premium

Continue with premium access

07 - Structural Design Patterns is part of the premium library. Sign in with a premium account to unlock the full lesson and the rest of this track.

01 Full premium lesson access
02 Deeper implementation notes
03 Ongoing content updates