Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevCoach 157 : Back-End | Mendesain Aplikasi de...

Nad
July 01, 2024
56

DevCoach 157 : Back-End | Mendesain Aplikasi dengan Clean Architecture

Nad

July 01, 2024
Tweet

More Decks by Nad

Transcript

  1. Back-End Software yang ideal itu … Software was invented to

    be “soft.” It was intended to be a way to easily change the behavior of machines
  2. • Testability: Software gampang di-test. • Maintainability: Software gampang di-manage.

    • Scalability: Software gampang di-scale. • Flexibility: Flexible ketika bisnis berubah. Kenapa software architecture penting? Back-End
  3. Architecture Pattern Architectural Pattern lebih berfokus pada separation of concern

    (soc), yaitu pembagian tugas yang lebih jelas antar komponennya. Tujuan utama dari architecture adalah mendukung siklus hidup perangkat lunak. Back-End
  4. Prinsip Architecture Pattern • Independent of Framework • Testable •

    Independent of UI • Independent of Database • Independent of External Back-End
  5. Apa itu Clean Architecture? Clean Architecture adalah software architecture yang

    berfokus untuk mengenkapsulasi logika bisnis dari framework atau teknologi luar. Back-End
  6. Enterprise Business Rules An entity can be an object with

    methods, or it can be a set of data structures and functions. Back-End
  7. Application Business Rules These use cases orchestrate the flow of

    data to and from the entities, and direct those entities to use their enterprise wide business rules to achieve the goals of the use case. Back-End
  8. Interface Adapters The software in this layer convert data for

    the use cases and entities, to the format most convenient for some external agency such as the Database or the Web Back-End
  9. The Dependency Rule Dependency hanya boleh terjadi dari arah luar

    ke dalam. Lingkaran dalam tidak bisa mengetahui apa pun yang ada di lingkaran luarnya. Bagian dalam tidak bisa mengetahui apa pun yang ada di lingkaran luar. Back-End
  10. Clean Architecture di REST API • Entities • Use Cases

    • Repository • Database dan HTTP Server Back-End
  11. Crossing Boundaries Back-End Flow aplikasi ga harus berurutan, kita bisa

    melewati batasnya dengan menggunakan Dependency Inversion Principle (DIP).
  12. Dependency Inversion Back-End "High-level modules should not depend on low-level

    modules. Both should depend on abstractions." (Robert Cecil Martin)
  13. Feedback! Hadiah: • 1 Token Langganan Academy (30 Hari) *untuk

    pengisi feedback terpilih! dicoding.id/devcoachfeedback