Created at 9pm, Feb 24
furkanSoftware Development
1
Clean Architecture
sjTwYYmV3wD3hxliLAHpSURoDOClebaaeIgVlveR1eQ
File Type
PDF
Entry Count
684
Embed. Model
jina_embeddings_v2_base_en
Index Type
hnsw

Clean Architecture - Martin, Robert C

So what does the architecture of your application scream? When you look at the top-level directory structure, and the source files in the highest-level package, do they scream Health Care System, or Accounting System, or Inventory Management System? Or do they scream Rails, or Spring/Hibernate, or ASP?
id: 0b7d7c76bdf10a60a8acd595aa4237c2 - page: 209
THE THEME OF AN ARCHITECTURE Go back and read Ivar Jacobsons seminal work on software architecture: Object Oriented Software Engineering. Notice the subtitle of the book: A Use Case Driven Approach. In this book Jacobson makes the point that software architectures are structures that support the use cases of the system. Just as the plans for a house or a library scream about the use cases of those buildings, so should the architecture of a software application scream about the use cases of the application. Architectures are not (or should not be) about frameworks. Architectures should not be supplied by frameworks. Frameworks are tools to be used, not architectures to be conformed to. If your architecture is based on frameworks, then it cannot be based on your use cases.
id: fbd9c2ade9ef41f4c2dff64b78242787 - page: 209
THE PURPOSE OF AN ARCHITECTURE Good architectures are centered on use cases so that architects can safely describe the structures that support those use cases without committing to frameworks, tools, and environments. Again, consider the plans for a house. The first concern of the architect is to make sure that the house is usable not to ensure that the house is made of bricks. Indeed, the architect takes pains to ensure that the homeowner can make decisions about the exterior material (bricks, stone, or cedar) later, after the plans ensure that the use cases are met.
id: 0521f0966db62211b96b024c082096ee - page: 209
A good software architecture allows decisions about frameworks, databases, web servers, and other environmental issues and tools to be deferred and delayed. Frameworks are options to be left open. A good architecture makes it unnecessary to decide on Rails, or Spring, or Hibernate, or Tomcat, or MySQL, until much later in the project. A good architecture makes it easy to change your mind about those decisions, too. A good architecture emphasizes the use cases and decouples them from peripheral concerns. BUT WHAT ABOUT THE WEB?
id: 79f4e84de1a1c72b857effb432f5aaf3 - page: 210
How to Retrieve?
# Search

curl -X POST "https://search.dria.co/hnsw/search" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"rerank": true, "top_n": 10, "contract_id": "sjTwYYmV3wD3hxliLAHpSURoDOClebaaeIgVlveR1eQ", "query": "What is alexanDRIA library?"}'
        
# Query

curl -X POST "https://search.dria.co/hnsw/query" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"vector": [0.123, 0.5236], "top_n": 10, "contract_id": "sjTwYYmV3wD3hxliLAHpSURoDOClebaaeIgVlveR1eQ", "level": 2}'