@VrxXaferusr@idextratime Itu namanya Black Magic bro. Dulu pernah kan menang lawan siapa tapi shoot on targetnya 0 wkwk. Emang gamau berkembang ini tim. Udh capek dukungnya, musim ini aja ketolong mudric. Gatau dah kalau mudric pensiun/keluar gimana nasibnya wkwk
@reyfearless@TxtdariHI Wkwkw dari jaman covid emang gapernah belajar.
Negara lain udh pada lockdown dan nutup penerbangan dari luar, eh kita malah sebaliknya ๐คฃ.
Gabisa apa ya mereka ga nunggu parah dulu baru gerak tapi antisipasi sebelum itu menjadi parah
@hisanaburger@LambeSahamjja Kemarin Iran udh kasih 4 point buat mereka berhenti kirim rudal ke Israel. Salah satunya jangan pernah ganggu Iran lagi sama Amerika harus bener-bener cabut dari negara-negara Teluk. Dari 2 point ini aja agak sulit wkwk
Clean Architecture
โ Clean Architecture is a software design approach that separates business logic from frameworks, databases, and external tools.
โ The core idea is independence โ your application logic should not depend on UI, databases, or third-party services.
โ Dependencies always point inward, toward the business rules.
Analogy: A Castle with Protected Inner Chambers
โ Imagine a castle:
โ The inner chamber holds the king and royal secrets (core business logic).
โ The outer walls protect the castle and handle interactions with the outside world (UI, APIs, databases).
โ You can replace the gates or walls without touching the royal chamber.
That is how Clean Architecture protects your application core.
Architecture Layers (Outside โ Inside)
โ Frameworks & Drivers Layer (Castle Walls)
โ Includes UI frameworks, databases, web servers, external APIs.
โ Examples: React, Spring Boot, Express, PostgreSQL.
โ Handles communication with the outside world.
โ Interface Adapters Layer (Guards & Translators)
โ Converts data between external formats and internal formats.
โ Contains controllers, presenters, gateways.
โ Makes sure the outside world can talk to the inner layers safely.
โ Use Cases Layer (Castle Operations Room)
โ Contains application-specific business rules.
โ Coordinates workflows and system behavior.
โ Example: CreateOrder, RegisterUser, ProcessPayment.
โ Entities Layer (Royal Chamber)
โ Holds core business rules and enterprise logic.
โ Completely independent of frameworks and tools.
โ The most stable and reusable part of the system.
Dependency Rule
โ Outer layers โ depend on โ inner layers
โ Inner layers โ never depend on โ outer layers
โ Business logic remains protected from technical changes.
Flow
โ User action โ UI โ Controller โ Use Case โ Entity
โ Result โ Use Case โ Presenter โ UI
โ Infrastructure supports the flow but never controls it.
Benefits
โ Strong separation of concerns.
โ Highly testable business logic.
โ Easy to swap databases, UI frameworks, or APIs.
โ Long-term maintainability.
โ Encourages clean, scalable codebases.
Drawbacks
โ More abstraction and initial setup.
โ Requires discipline to enforce boundaries.
โ Can feel complex for small projects.
Best Practices
โ Keep business logic framework-independent.
โ Define interfaces in inner layers.
โ Implement details in outer layers.
โ Use dependency injection.
โ Treat tools and frameworks as replaceable plugins.
When to Use
โ Medium to large-scale applications.
โ Systems with complex business rules.
โ Long-term projects requiring maintainability.
โ Teams following domain-driven design principles.
๐ Mastering Software Architectures: From Monoliths to Microservices and Beyond
Learn Clean Architecture, Hexagonal Architecture, Onion Architecture, CQRS, MVC, MVVM, Event-Driven, Microservices, and more โ with real-world analogies, diagrams, and best practices to help you design scalable and maintainable systems.
๐ https://t.co/rQ5uqOjO5c
What is JWT and how it works?
JWT (JSON Web Token) is a compact, URL-safe token used to securely transmit information between a client and a server.
It is most commonly for authentication in modern web apps.
A JWT has three parts separated by dots: xxxxx[dot]yyyyy[dot]zzzzz
1. ๐๐๐๐๐๐ซ: Contains the algorithm used for signing the JWT (e.g., HMAC SHA256 or RSA) and the token type (JWT).
2. ๐๐๐ฒ๐ฅ๐จ๐๐: Contains the "claims", statements about an entity (typically, the user) and additional data.
3. ๐๐ข๐ ๐ง๐๐ญ๐ฎ๐ซ๐: Used to verify that the sender and ensure the token hasnโt been tampered with. Generated by taking the encoded header, the encoded payload, a secret, and the algorithm specified in the header, and signing it.
How does it work?
1. The user logs in with credentials.
2. The server validates credentials and generates a signed JWT.
3. The server sends the JWT back to the client.
4. The client stores the JWT token (typically in localStorage or cookies).
5. For future requests, the client includes the JWT in the Authorization header.
Key Benefits:
- Statelessness: No need to store session information on the server, making APIs more scalable.
- Security: Digitally signed to prevent tampering.
- Compact: Small size allows for efficient transmission.
โป๏ธ Repost to help others in your network