{"id":"6b08bd3980884893657cc9a0","slug":"layered-architecture","title":"Architektura warstwowa: prezentacja, logika, dane – i gdzie to się psuje","summary":"Najstarszy i najpopularniejszy sposób układania aplikacji biznesowych: warstwy ścisłe i luźne, warstwy a fizyczne poziomy, kod w C#, TypeScript, Javie, Go i Pythonie, testy ArchUnit i NetArchTest oraz droga do heksagonu.","servedLang":"pl","availableLangs":["pl","en"],"topics":["layered-architecture","hexagonal-architecture","clean-architecture"],"techs":["dotnet","java","typescript","go","python"],"tags":["architecture","layers","n-tier","archunit","netarchtest","import-linter"],"level":"beginner","kind":"article","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":11,"stats":{"views":1,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-26T23:14:01.857Z","updatedAt":"2026-11-27T10:04:43.385Z","requestedLang":"pl","theme":{"hero":"classic","heroMedia":null,"accent":"teal","background":"plain","weaveResources":true,"toc":"right"},"seoDescription":"Architektura warstwowa (layered, n-tier): warstwa prezentacji, logiki biznesowej i dostępu do danych, warstwy ścisłe i luźne, antywzorzec sinkhole, testy warstw ArchUnit, NetArchTest, import-linter, przykłady w 5 językach.","wordCount":2065,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Moduł cateringu w pierogarni Haliny – wyceny wesel i komunii – powstał tak, jak uczy większość kursów: kontroler przyjmuje żądanie, serwis liczy cenę, repozytorium czyta menu z bazy. To "},{"type":"text","text":"architektura warstwowa","marks":[{"type":"bold"}]},{"type":"text","text":" (ang. "},{"type":"text","text":"layered architecture","marks":[{"type":"italic"}]},{"type":"text","text":"), domyślny układ niemal każdego szablonu projektu. Jest prosta i czytelna, ale ma jedną cechę, która po latach wraca jak bumerang: logika biznesowa zależy od bazy danych."}]},{"type":"callout","attrs":{"variant":"tip","title":"W skrócie"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Kod dzieli się na "},{"type":"text","text":"warstwy o różnej odpowiedzialności","marks":[{"type":"bold"}]},{"type":"text","text":": prezentacja, logika biznesowa, dostęp do danych; każda zna tylko warstwę pod sobą."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"To świetny start dla aplikacji typu CRUD i zespołów, które potrzebują prostego, wspólnego języka struktury."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Słabość: zależności płyną "},{"type":"text","text":"w dół, do bazy","marks":[{"type":"bold"}]},{"type":"text","text":", więc reguły biznesu są sprzężone z technologią przechowywania danych."}]}]}]}]},{"type":"stats","attrs":{"items":[{"value":"1968","label":"warstwy w systemie THE","hint":"Edsger Dijkstra opisuje system zbudowany z poziomów"},{"value":"3","label":"klasyczne warstwy","hint":"prezentacja, domena, źródło danych (Fowler, 2002)"},{"value":"80/20","label":"reguła sinkhole","hint":"ok. 20% żądań może tylko przechodzić przez warstwy (Mark Richards)"}]}},{"type":"heading","attrs":{"level":2,"id":"kontekst-i-sily"},"content":[{"type":"text","text":"Kontekst i siły"}]},{"type":"paragraph","content":[{"type":"text","text":"Catering ma kilka reguł (minimum tydzień wyprzedzenia, rabat od stu gości), ale większość pracy to zwykłe formularze: menu, terminy, dane klienta. Zespół jest mieszany – juniorzy i dwóch seniorów – i potrzebuje struktury, którą każdy zrozumie od pierwszego dnia."}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Rozdzielenie odpowiedzialności","marks":[{"type":"bold"}]},{"type":"text","text":" – HTML i JSON nie powinny mieszać się z SQL-em i regułami cen."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Przewidywalność","marks":[{"type":"bold"}]},{"type":"text","text":" – każdy wie, gdzie szukać walidacji, gdzie reguł, a gdzie zapytań."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Wymienialność warstw","marks":[{"type":"bold"}]},{"type":"text","text":" – nowy interfejs (aplikacja mobilna) nie powinien wymagać zmian w logice."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Koszt","marks":[{"type":"bold"}]},{"type":"text","text":" – struktura nie może być droższa niż problem, który rozwiązuje."}]}]}]},{"type":"heading","attrs":{"level":2,"id":"struktura"},"content":[{"type":"text","text":"Struktura"}]},{"type":"paragraph","content":[{"type":"text","text":"Wzorzec warstw opisali m.in. Buschmann i współautorzy w "},{"type":"text","text":"Pattern-Oriented Software Architecture","marks":[{"type":"italic"}]},{"type":"text","text":" (1996), a Martin Fowler w "},{"type":"text","text":"Patterns of Enterprise Application Architecture","marks":[{"type":"italic"}]},{"type":"text","text":" (2002) spopularyzował trzy warstwy: prezentacji, domeny i źródła danych."}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart TB\n  user[\"Klient: przeglądarka, aplikacja mobilna\"]\n  subgraph p[\"Warstwa prezentacji\"]\n    ctl[\"CateringController<br/>walidacja wejścia, mapowanie DTO\"]\n  end\n  subgraph b[\"Warstwa logiki biznesowej\"]\n    svc[\"CateringService<br/>reguły: termin, rabat\"]\n  end\n  subgraph d[\"Warstwa dostępu do danych\"]\n    repo[\"CateringRepository<br/>zapytania, encje ORM\"]\n  end\n  db[(\"Baza danych\")]\n  user --> ctl --> svc --> repo --> db","caption":"Trzy warstwy: każda zależy tylko od warstwy niżej"}},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Warstwa"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Odpowiedzialność"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Nie powinna"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Prezentacja"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Przyjęcie żądania, walidacja formatu, mapowanie na DTO, kody HTTP"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"liczyć cen ani pisać SQL-a"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Logika biznesowa"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Reguły, przypadki użycia, transakcje"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"znać "},{"type":"text","text":"HttpContext","marks":[{"type":"code"}]},{"type":"text","text":", "},{"type":"text","text":"req","marks":[{"type":"code"}]},{"type":"text","text":", "},{"type":"text","text":"res","marks":[{"type":"code"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Dostęp do danych"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Zapytania, mapowanie obiektowo-relacyjne, cache"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"podejmować decyzji biznesowych"}]}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Warstwy a poziomy.","marks":[{"type":"bold"}]},{"type":"text","text":" Warstwa ("},{"type":"text","text":"layer","marks":[{"type":"italic"}]},{"type":"text","text":") to podział logiczny w kodzie, poziom ("},{"type":"text","text":"tier","marks":[{"type":"italic"}]},{"type":"text","text":") – fizyczny: osobny proces lub maszyna. Trzy warstwy mogą działać w jednym procesie, a aplikacja trójpoziomowa z lat 90. to przeglądarka, serwer aplikacji i serwer bazy."}]},{"type":"paragraph","content":[{"type":"text","text":"Warstwy ścisłe i luźne.","marks":[{"type":"bold"}]},{"type":"text","text":" W układzie ścisłym ("},{"type":"text","text":"closed","marks":[{"type":"italic"}]},{"type":"text","text":") żądanie przechodzi przez każdą warstwę po kolei. W luźnym ("},{"type":"text","text":"open","marks":[{"type":"italic"}]},{"type":"text","text":") wybrane warstwy można pominąć – na przykład prosty odczyt idzie z kontrolera prosto do repozytorium. Luźność przyspiesza pisanie, ale rozmywa granice, więc warto ją ograniczać do konkretnych, nazwanych przypadków."}]},{"type":"heading","attrs":{"level":2,"id":"jak-to-wyglada-w-kodzie"},"content":[{"type":"text","text":"Jak to wygląda w kodzie"}]},{"type":"codeGroup","attrs":{"title":"Układ warstw w pięciu stosach"},"content":[{"type":"codeBlock","attrs":{"language":"plaintext","filename":"dotnet/solution-tree.txt"},"content":[{"type":"text","text":"Pierogarnia.Catering.sln\n├── Catering.Web/            ← PRESENTATION: controllers, view models, validation of input\n├── Catering.Business/       ← BUSINESS: CateringService, pricing rules, DTOs\n├── Catering.Data/           ← DATA ACCESS: EF Core DbContext, repositories, entities\n└── references: Web → Business → Data   (each layer knows only the one below)"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"java/package-tree.txt"},"content":[{"type":"text","text":"pl.pierogarnia.catering\n├── web/            ← @RestController, request/response records\n├── service/        ← @Service, @Transactional, business rules\n├── repository/     ← Spring Data JPA interfaces\n└── entity/         ← @Entity classes (often shared by service and repository)"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"node/src-tree.txt"},"content":[{"type":"text","text":"src/\n├── controllers/    ← Express routers or NestJS @Controller\n├── services/       ← business rules, no req/res objects here\n├── repositories/   ← Prisma / TypeORM / Knex queries\n└── app.ts"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"go/module-tree.txt"},"content":[{"type":"text","text":"catering/\n├── cmd/catering/main.go\n└── internal/\n    ├── handler/    ← net/http handlers: decode JSON, call service, encode JSON\n    ├── service/    ← business rules\n    └── repository/ ← database/sql or sqlc queries"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"python/package-tree.txt"},"content":[{"type":"text","text":"catering/\n├── api/            ← FastAPI routers (presentation)\n├── services/       ← business rules\n├── repositories/   ← SQLAlchemy queries\n└── models.py       ← ORM models"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Ten sam przypadek użycia – wycena wesela – przechodzi przez trzy warstwy. Zwróć uwagę, gdzie mieszka reguła rabatu i od czego zależy serwis:"}]},{"type":"codeGroup","attrs":{"title":"Wycena wesela przez trzy warstwy"},"content":[{"type":"codeBlock","attrs":{"language":"csharp","filename":"Catering.cs"},"content":[{"type":"text","text":"// PRESENTATION – Catering.Web\n[ApiController, Route(\"api/catering\")]\npublic sealed class CateringController(CateringService service) : ControllerBase\n{\n    [HttpPost(\"quotes\")]\n    public async Task<ActionResult<QuoteDto>> Quote(QuoteRequest req, CancellationToken ct) =>\n        Ok(await service.Quote(req.Guests, req.EventDate, ct));\n}\n\n// BUSINESS – Catering.Business\npublic sealed class CateringService(ICateringRepository repo, TimeProvider clock)\n{\n    public async Task<QuoteDto> Quote(int guests, DateOnly date, CancellationToken ct)\n    {\n        if (date < DateOnly.FromDateTime(clock.GetLocalNow().DateTime.AddDays(7)))\n            throw new BusinessRuleException(\"Weddings need a week's notice.\");\n\n        var menu = await repo.GetWeddingMenu(ct);\n        var perGuest = menu.Sum(i => i.PiecesPerGuest * i.UnitPrice);\n        var discount = guests >= 100 ? 0.10m : 0m;                 // the business rule lives here\n        return new QuoteDto(guests, Math.Round(guests * perGuest * (1 - discount), 2));\n    }\n}\n\n// DATA ACCESS – Catering.Data (the interface is here too: Business references Data)\npublic interface ICateringRepository { Task<IReadOnlyList<MenuItem>> GetWeddingMenu(CancellationToken ct); }\n\npublic sealed class CateringRepository(CateringDb db) : ICateringRepository\n{\n    public async Task<IReadOnlyList<MenuItem>> GetWeddingMenu(CancellationToken ct) =>\n        await db.MenuItems.Where(m => m.Wedding).ToListAsync(ct);\n}"}]},{"type":"codeBlock","attrs":{"language":"typescript","filename":"catering.ts"},"content":[{"type":"text","text":"// PRESENTATION – controllers/catering.controller.ts\nrouter.post(\"/api/catering/quotes\", async (req, res, next) => {\n  try {\n    const { guests, eventDate } = req.body as { guests: number; eventDate: string };\n    res.json(await cateringService.quote(guests, new Date(eventDate)));\n  } catch (err) {\n    next(err); // error middleware turns BusinessRuleError into 422\n  }\n});\n\n// BUSINESS – services/catering.service.ts\nexport const cateringService = {\n  async quote(guests: number, eventDate: Date): Promise<Quote> {\n    const weekAhead = Date.now() + 7 * 24 * 3600 * 1000;\n    if (eventDate.getTime() < weekAhead) throw new BusinessRuleError(\"Weddings need a week's notice.\");\n\n    const menu = await cateringRepository.weddingMenu();\n    const perGuest = menu.reduce((sum, i) => sum + i.piecesPerGuest * i.unitPrice, 0);\n    const discount = guests >= 100 ? 0.1 : 0; // the business rule lives here\n    return { guests, total: Math.round(guests * perGuest * (1 - discount) * 100) / 100 };\n  },\n};\n\n// DATA ACCESS – repositories/catering.repository.ts\nexport const cateringRepository = {\n  weddingMenu: () => prisma.menuItem.findMany({ where: { wedding: true } }),\n};"}]},{"type":"codeBlock","attrs":{"language":"java","filename":"Catering.java"},"content":[{"type":"text","text":"// PRESENTATION – web/CateringController.java\n@RestController\n@RequestMapping(\"/api/catering\")\nclass CateringController {\n    private final CateringService service;\n    CateringController(CateringService service) { this.service = service; }\n\n    @PostMapping(\"/quotes\")\n    QuoteDto quote(@RequestBody QuoteRequest req) { return service.quote(req.guests(), req.eventDate()); }\n}\n\n// BUSINESS – service/CateringService.java\n@Service\nclass CateringService {\n    private final MenuItemRepository repo;\n    private final Clock clock;\n    CateringService(MenuItemRepository repo, Clock clock) { this.repo = repo; this.clock = clock; }\n\n    QuoteDto quote(int guests, LocalDate date) {\n        if (date.isBefore(LocalDate.now(clock).plusDays(7)))\n            throw new BusinessRuleException(\"Weddings need a week's notice.\");\n\n        var perGuest = repo.findByWeddingTrue().stream()\n            .map(i -> i.getUnitPrice().multiply(BigDecimal.valueOf(i.getPiecesPerGuest())))\n            .reduce(BigDecimal.ZERO, BigDecimal::add);\n        var discount = guests >= 100 ? new BigDecimal(\"0.90\") : BigDecimal.ONE; // the business rule\n        return new QuoteDto(guests, perGuest.multiply(BigDecimal.valueOf(guests)).multiply(discount));\n    }\n}\n\n// DATA ACCESS – repository/MenuItemRepository.java\ninterface MenuItemRepository extends JpaRepository<MenuItem, Long> {\n    List<MenuItem> findByWeddingTrue();\n}"}]},{"type":"codeBlock","attrs":{"language":"go","filename":"catering.go"},"content":[{"type":"text","text":"// PRESENTATION – internal/handler/catering.go\nfunc (h CateringHandler) Quote(w http.ResponseWriter, r *http.Request) {\n\tvar req struct {\n\t\tGuests    int       `json:\"guests\"`\n\t\tEventDate time.Time `json:\"eventDate\"`\n\t}\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, err.Error(), http.StatusBadRequest)\n\t\treturn\n\t}\n\tq, err := h.Service.Quote(r.Context(), req.Guests, req.EventDate)\n\tif err != nil {\n\t\thttp.Error(w, err.Error(), http.StatusUnprocessableEntity)\n\t\treturn\n\t}\n\tjson.NewEncoder(w).Encode(q)\n}\n\n// BUSINESS – internal/service/catering.go\nfunc (s CateringService) Quote(ctx context.Context, guests int, date time.Time) (Quote, error) {\n\tif date.Before(s.Now().AddDate(0, 0, 7)) {\n\t\treturn Quote{}, errors.New(\"weddings need a week's notice\")\n\t}\n\tmenu, err := s.Repo.WeddingMenu(ctx) // *repository.CateringRepository: business imports data access\n\tif err != nil {\n\t\treturn Quote{}, err\n\t}\n\tperGuest := 0.0\n\tfor _, i := range menu {\n\t\tperGuest += float64(i.PiecesPerGuest) * i.UnitPrice\n\t}\n\tdiscount := 0.0\n\tif guests >= 100 {\n\t\tdiscount = 0.10 // the business rule lives here\n\t}\n\treturn Quote{Guests: guests, Total: float64(guests) * perGuest * (1 - discount)}, nil\n}"}]},{"type":"codeBlock","attrs":{"language":"python","filename":"catering.py"},"content":[{"type":"text","text":"# PRESENTATION – catering/api/quotes.py\n@router.post(\"/api/catering/quotes\")\ndef quote(req: QuoteRequest, service: CateringService = Depends(get_catering_service)) -> QuoteDto:\n    try:\n        return service.quote(req.guests, req.event_date)\n    except BusinessRuleError as e:\n        raise HTTPException(status_code=422, detail=str(e))\n\n\n# BUSINESS – catering/services/catering.py\nclass CateringService:\n    def __init__(self, repo: CateringRepository, today=date.today):\n        self.repo, self.today = repo, today\n\n    def quote(self, guests: int, event_date: date) -> QuoteDto:\n        if event_date < self.today() + timedelta(days=7):\n            raise BusinessRuleError(\"Weddings need a week's notice.\")\n        per_guest = sum(i.pieces_per_guest * i.unit_price for i in self.repo.wedding_menu())\n        discount = Decimal(\"0.10\") if guests >= 100 else Decimal(\"0\")  # the business rule\n        return QuoteDto(guests=guests, total=round(guests * per_guest * (1 - discount), 2))\n\n\n# DATA ACCESS – catering/repositories/catering.py\nclass CateringRepository:\n    def __init__(self, session: Session):\n        self.session = session\n\n    def wedding_menu(self) -> list[MenuItem]:\n        return list(self.session.scalars(select(MenuItem).where(MenuItem.wedding.is_(True))))"}]}]}]},"toc":[{"id":"kontekst-i-sily","text":"Kontekst i siły","level":2,"locked":false},{"id":"struktura","text":"Struktura","level":2,"locked":false},{"id":"jak-to-wyglada-w-kodzie","text":"Jak to wygląda w kodzie","level":2,"locked":false},{"id":"gdzie-to-sie-psuje","text":"Gdzie to się psuje","level":2,"locked":true},{"id":"kompromisy","text":"Kompromisy","level":2,"locked":true},{"id":"sciezki-ewolucji","text":"Ścieżki ewolucji","level":2,"locked":true},{"id":"w-praktyce","text":"W praktyce","level":2,"locked":true},{"id":"antywzorce","text":"Antywzorce","level":2,"locked":true},{"id":"powiazane-tematy","text":"Powiązane tematy","level":2,"locked":true},{"id":"sprawdz-sie","text":"Sprawdź się","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":40,"visibleBlocks":16,"resources":[{"id":"6b0857be3c96f2d34d0b4230","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures","embedUrl":null,"title":"Common web application architectures - .NET","description":"Architect Modern Web Applications with ASP.NET Core and Azure | Explore the common web application architectures","author":"Microsoft Learn","thumbnailUrl":"https://learn.microsoft.com/dotnet/media/dotnet-bot_microservices.png","durationSec":null,"lang":"en","topics":["monolith","layered-architecture","clean-architecture"],"techs":["dotnet"],"tags":["cloud","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":70,"verifiedAt":"2026-11-26T11:25:50.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857bf3c96f2d34d0b425a","type":"article","provider":"web","url":"https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/n-tier","embedUrl":null,"title":"N-tier Architecture Style","description":"Learn about the benefits, challenges, and best practices for N-tier architectures on Azure, which separates an app into logical layers and physical tiers.","author":"Microsoft Azure Architecture Center","thumbnailUrl":"https://learn.microsoft.com/en-us/media/open-graph-image.png","durationSec":null,"lang":"en","topics":["layered-architecture"],"techs":["general"],"tags":["azure","cloud","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":66,"verifiedAt":"2026-11-26T11:07:38.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857b73c96f2d34d0b3c05","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/software-architecture-fundamentals-2nd-edition-chapter/id1752902467?i=1000756075694","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id1752902467?i=1000756075694","title":"Software Architecture Fundamentals 2nd Edition, Chapter 10: Layered Architectures","description":"This is the first of many chapters that each do a deep-dive on a particular architecture style; in this chapter, we start with the layered monolithic architecture, also known by many as the default architecture. We describe the topology, communication, data strategies, and philosophy underlying…","author":"Software Architecture Book Club","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/05/4c/68/054c68d1-a78e-511c-81f2-225567e7e32f/mza_4756898323908452544.jpg/600x600bb.jpg","durationSec":3551,"lang":"en","topics":["layered-architecture"],"techs":["general"],"tags":["podcast","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2026-03-19T04:00:00.000Z","popularity":68,"verifiedAt":"2026-11-26T10:58:17.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:53.924Z","updatedAt":"2026-11-26T16:00:53.924Z"},{"id":"6b0857ab3c96f2d34d0b3275","type":"package","provider":"maven","url":"https://central.sonatype.com/artifact/com.tngtech.archunit/archunit","embedUrl":null,"title":"com.tngtech.archunit:archunit","description":"Java architecture test library: assert layers, cycles and dependencies in plain Java.","author":"","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["clean-architecture","hexagonal-architecture","layered-architecture","modular-monolith"],"techs":["java"],"tags":["architecture-tests"],"price":"free","featured":false,"featuredOrder":36,"packageName":"com.tngtech.archunit:archunit","source":"seed","publishedAt":null,"popularity":0,"verifiedAt":"2026-11-26T00:00:00.000Z","curated":true,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:43.468Z","updatedAt":"2026-11-26T16:00:43.468Z"},{"id":"6b0857ab3c96f2d34d0b3273","type":"package","provider":"pypi","url":"https://pypi.org/project/import-linter/","embedUrl":null,"title":"import-linter","description":"Lint your Python architecture: contracts for layers and independent modules.","author":"","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["layered-architecture","modular-monolith","clean-architecture"],"techs":["python"],"tags":["architecture-tests"],"price":"free","featured":false,"featuredOrder":34,"packageName":"import-linter","source":"seed","publishedAt":null,"popularity":0,"verifiedAt":"2026-11-26T00:00:00.000Z","curated":true,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:43.387Z","updatedAt":"2026-11-26T16:00:43.387Z"},{"id":"6b0857c03c96f2d34d0b43f1","type":"article","provider":"web","url":"https://threedots.tech/post/database-transactions-in-go","embedUrl":null,"title":"Database Transactions in Go with Layered Architecture","description":"As I join a new company, I often feel like an impostor. After all the interviews, they really seem to know what they’re doing. I’m humbled and ready to learn from the best. On one such occasion, a few days in, I dealt with a production outage and asked the most senior engineer for help. They came…","author":"Three Dots Labs","thumbnailUrl":"https://threedots.tech/images/covers/database-transactions-in-go-social.png","durationSec":null,"lang":"en","topics":["layered-architecture"],"techs":["go"],"tags":["software-architecture","databases"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":"2024-09-04T22:00:00.000Z","popularity":50,"verifiedAt":"2026-11-26T11:28:48.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"}],"challenges":[],"attachments":[],"hasCode":true,"repoUrl":null,"series":[{"slug":"architecture-path","title":"Od monolitu do mikroserwisów","items":[{"slug":"monolith","title":"Monolit: jedna aplikacja, jedno wdrożenie i dlaczego to często dobry start","current":false},{"slug":"modular-monolith","title":"Modularny monolit: twarde granice bez kosztów sieci","current":false},{"slug":"layered-architecture","title":"Architektura warstwowa: prezentacja, logika, dane – i gdzie to się psuje","current":true},{"slug":"hexagonal-architecture","title":"Pierogi w Heksagonie","current":false},{"slug":"clean-architecture","title":"Czysta architektura: reguła zależności i przypadki użycia w centrum","current":false},{"slug":"onion-architecture","title":"Architektura cebulowa: model domeny w środku, infrastruktura na zewnątrz","current":false},{"slug":"vertical-slice-architecture","title":"Architektura pionowych wycinków: kod według funkcji, nie według warstw","current":false},{"slug":"cqrs","title":"CQRS: osobny model do zmieniania, osobny do czytania","current":false},{"slug":"event-sourcing","title":"Event sourcing: zapisuj fakty, a nie tylko ostatni stan","current":false},{"slug":"event-driven-architecture","title":"Architektura sterowana zdarzeniami: kto publikuje, kto słucha i co może pójść nie tak","current":false},{"slug":"microservices","title":"Mikroserwisy: niezależne wdrożenia, prawdziwe koszty i kiedy to się opłaca","current":false},{"slug":"ddd-strategic-design","title":"DDD – projektowanie strategiczne: poddomeny, konteksty ograniczone i mapy kontekstów","current":false}]}],"prev":{"slug":"modular-monolith","title":"Modularny monolit: twarde granice bez kosztów sieci"},"next":{"slug":"hexagonal-architecture","title":"Pierogi w Heksagonie"},"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":68,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Autorytet","articles":63},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Autorytet","articles":53},{"key":"python","title":"Python","level":5,"levelLabel":"Autorytet","articles":52},{"key":"java","title":"Java","level":5,"levelLabel":"Autorytet","articles":38}]}}