[{"data":1,"prerenderedAt":275},["ShallowReactive",2],{"blog-frontend-architecture-0-pl":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":11,"minutes":274},0,"","Ten przewodnik opisuje, jak budujemy duże frontendy: jeden workspace, wiele aplikacji, wiele zespołów i reguła dla każdego pliku. Budujemy go w Nx i Angular…",[8],{"kind":9,"html":10},"html","\u003Cp>Ten przewodnik opisuje, jak budujemy duże frontendy: jeden workspace, wiele aplikacji, wiele zespołów i reguła dla każdego pliku. Budujemy go w \u003Cstrong>Nx\u003C\u002Fstrong> i \u003Cstrong>Angular\u003C\u002Fstrong>, wspólny stan trzymamy w \u003Cstrong>NgRx\u003C\u002Fstrong>, a przed store'em stawiamy \u003Cstrong>opcjonalną fasadę\u003C\u002Fstrong>. Potem pokazujemy tę samą architekturę, reguła po regule, w \u003Cstrong>React z Next.js\u003C\u002Fstrong> i w \u003Cstrong>Vue z Nuxt\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>Przykłady są pisane pod \u003Cstrong>Angular 22\u003C\u002Fstrong> z NgRx 22, \u003Cstrong>React 19\u003C\u002Fstrong> z Next.js 16, \u003Cstrong>TanStack Query\u003C\u002Fstrong> i \u003Cstrong>Zustandem\u003C\u002Fstrong> oraz \u003Cstrong>Vue 3.5\u003C\u002Fstrong> z Nuxt 4 i \u003Cstrong>Pinią 3\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>Ta architektura nie jest nasza. Jej rdzeń opracował i opublikował \u003Cstrong>Manfred Steyer\u003C\u002Fstrong>, trener i konsultant Angulara, Google Developer Expert for Angular i twórca \u003Ca href=\"https:\u002F\u002Fwww.angulararchitects.io\u002F\">ANGULARarchitects\u003C\u002Fa>. Jego pomysł polega na tym, żeby ciąć frontend \u003Cstrong>pionowo według domen\u003C\u002Fstrong> i \u003Cstrong>poziomo według typów bibliotek\u003C\u002Fstrong>, pozwolić domenom rozmawiać tylko przez jawne API i zostawić pilnowanie tych granic narzędziu, a nie wiki. Sekcja 2 wymienia dokładnie, co pochodzi od niego, co od Nx, a co dodaliśmy my.\u003C\u002Fp>\n\u003Cp>Mały przykład nie pokaże, dlaczego to wszystko ma znaczenie. Jedna domena z jednym store'em mieści się każdemu w głowie. Dlatego każdy przykład na tej stronie pochodzi z jednego realistycznego workspace'u: \u003Cstrong>Fleetline\u003C\u002Fstrong>, platformy do obsługi serwisowej flot z trzema aplikacjami, dziewięcioma domenami, około siedemdziesięcioma bibliotekami i pięcioma zespołami. Przedstawiamy go w sekcji 5 i używamy w każdej kolejnej.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Dla zespołów, które już mają albo wkrótce będą mieć więcej niż jedną aplikację frontendową, więcej niż jeden zespół albo więcej niż około 50 000 linii kodu frontendu. Poniżej tej skali zacznijcie od sekcji 16.4.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n",[12,26,30,34,38,58,74,90,114,142,154,174,214,242,246,250,270],{"id":13,"text":14,"depth":15,"children":16},"s1","1. Po co frontendowi architektura",2,[17,22],{"id":18,"text":19,"depth":20,"children":21},"s1-1","1.1. Cele",3,[],{"id":23,"text":24,"depth":20,"children":25},"s1-2","1.2. Czego ta architektura nie robi",[],{"id":27,"text":28,"depth":15,"children":29},"s2","2. Skąd się wziął ten pomysł",[],{"id":31,"text":32,"depth":15,"children":33},"s3","3. Architektura na jednej stronie",[],{"id":35,"text":36,"depth":15,"children":37},"s4","4. Słownik",[],{"id":39,"text":40,"depth":15,"children":41},"s5","5. Przykład: Fleetline",[42,46,50,54],{"id":43,"text":44,"depth":20,"children":45},"s5-1","5.1. Aplikacje",[],{"id":47,"text":48,"depth":20,"children":49},"s5-2","5.2. Domeny i zespoły",[],{"id":51,"text":52,"depth":20,"children":53},"s5-3","5.3. Workspace",[],{"id":55,"text":56,"depth":20,"children":57},"s5-4","5.4. Jeden przypadek użycia przez wszystkie warstwy",[],{"id":59,"text":60,"depth":15,"children":61},"s6","6. Typy bibliotek",[62,66,70],{"id":63,"text":64,"depth":20,"children":65},"s6-1","6.1. Kto może importować kogo",[],{"id":67,"text":68,"depth":20,"children":69},"s6-2","6.2. Jak duża jest biblioteka",[],{"id":71,"text":72,"depth":20,"children":73},"s6-3","6.3. Style",[],{"id":75,"text":76,"depth":15,"children":77},"s7","7. Domeny i granice",[78,82,86],{"id":79,"text":80,"depth":20,"children":81},"s7-1","7.1. Biblioteka API",[],{"id":83,"text":84,"depth":20,"children":85},"s7-2","7.2. Shared to też domena",[],{"id":87,"text":88,"depth":20,"children":89},"s7-3","7.3. Gdy dwie domeny potrzebują tego samego",[],{"id":91,"text":92,"depth":15,"children":93},"s8","8. Egzekwowanie reguł",[94,98,102,106,110],{"id":95,"text":96,"depth":20,"children":97},"s8-1","8.1. Tagi",[],{"id":99,"text":100,"depth":20,"children":101},"s8-2","8.2. Reguła lintera",[],{"id":103,"text":104,"depth":20,"children":105},"s8-3","8.3. Wymiar frameworka",[],{"id":107,"text":108,"depth":20,"children":109},"s8-4","8.4. Bez Nx: Sheriff",[],{"id":111,"text":112,"depth":20,"children":113},"s8-5","8.5. W CI",[],{"id":115,"text":116,"depth":15,"children":117},"s9","9. Stan w NgRx",[118,122,126,130,134,138],{"id":119,"text":120,"depth":20,"children":121},"s9-1","9.1. Model",[],{"id":123,"text":124,"depth":20,"children":125},"s9-2","9.2. Zdarzenia",[],{"id":127,"text":128,"depth":20,"children":129},"s9-3","9.3. Feature: stan, reducer, selektory",[],{"id":131,"text":132,"depth":20,"children":133},"s9-4","9.4. HTTP i efekty",[],{"id":135,"text":136,"depth":20,"children":137},"s9-5","9.5. Providery",[],{"id":139,"text":140,"depth":20,"children":141},"s9-6","9.6. Publiczne API data-access",[],{"id":143,"text":144,"depth":15,"children":145},"s10","10. Fasada i kiedy ją pominąć",[146,150],{"id":147,"text":148,"depth":20,"children":149},"s10-1","10.1. Po co fasada",[],{"id":151,"text":152,"depth":20,"children":153},"s10-2","10.2. Dlaczego fasada jest opcjonalna",[],{"id":155,"text":156,"depth":15,"children":157},"s11","11. Angular od początku do końca",[158,162,166,170],{"id":159,"text":160,"depth":20,"children":161},"s11-1","11.1. Biblioteka ui",[],{"id":163,"text":164,"depth":20,"children":165},"s11-2","11.2. Biblioteka feature",[],{"id":167,"text":168,"depth":20,"children":169},"s11-3","11.3. Shell",[],{"id":171,"text":172,"depth":20,"children":173},"s11-4","11.4. Aplikacja",[],{"id":175,"text":176,"depth":15,"children":177},"s12","12. React i Next.js",[178,182,186,190,194,198,202,206,210],{"id":179,"text":180,"depth":20,"children":181},"s12-1","12.1. Co odpowiada czemu",[],{"id":183,"text":184,"depth":20,"children":185},"s12-2","12.2. Tagi dla serwera i klienta",[],{"id":187,"text":188,"depth":20,"children":189},"s12-3","12.3. HTTP i klient zapytań",[],{"id":191,"text":192,"depth":20,"children":193},"s12-4","12.4. Zapytania i mutacje",[],{"id":195,"text":196,"depth":20,"children":197},"s12-5","12.5. Stan klienta w Zustandzie",[],{"id":199,"text":200,"depth":20,"children":201},"s12-6","12.6. Hook fasady",[],{"id":203,"text":204,"depth":20,"children":205},"s12-7","12.7. Feature, ui i trasa",[],{"id":207,"text":208,"depth":20,"children":209},"s12-8","12.8. Shell i API innej domeny",[],{"id":211,"text":212,"depth":20,"children":213},"s12-9","12.9. Pułapki specyficzne dla Next.js",[],{"id":215,"text":216,"depth":15,"children":217},"s13","13. Vue i Nuxt",[218,222,226,230,234,238],{"id":219,"text":220,"depth":20,"children":221},"s13-1","13.1. Co odpowiada czemu",[],{"id":223,"text":224,"depth":20,"children":225},"s13-2","13.2. Wyłączcie auto-importy dla bibliotek",[],{"id":227,"text":228,"depth":20,"children":229},"s13-3","13.3. Store",[],{"id":231,"text":232,"depth":20,"children":233},"s13-4","13.4. Composable fasady i zasięg store'a",[],{"id":235,"text":236,"depth":20,"children":237},"s13-5","13.5. Feature, ui, shell i strona",[],{"id":239,"text":240,"depth":20,"children":241},"s13-6","13.6. Pułapki specyficzne dla Nuxt",[],{"id":243,"text":244,"depth":15,"children":245},"s14","14. Obok siebie",[],{"id":247,"text":248,"depth":15,"children":249},"s15","15. Testy według typu biblioteki",[],{"id":251,"text":252,"depth":15,"children":253},"s16","16. Dorastanie do tej architektury i migracja",[254,258,262,266],{"id":255,"text":256,"depth":20,"children":257},"s16-1","16.1. Migracja w ośmiu krokach",[],{"id":259,"text":260,"depth":20,"children":261},"s16-2","16.2. Co zwykle idzie źle",[],{"id":263,"text":264,"depth":20,"children":265},"s16-3","16.3. Kiedy podzielić bibliotekę",[],{"id":267,"text":268,"depth":20,"children":269},"s16-4","16.4. Kiedy to za dużo",[],{"id":271,"text":272,"depth":15,"children":273},"s17","17. Pytania",[],33,1795449738454]