[{"data":1,"prerenderedAt":277},["ShallowReactive",2],{"blog-frontend-architecture-3-pl":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":14,"minutes":276},3,"Architektura na jednej stronie","@@diagram:fe-grid@@",[8,11],{"kind":9,"name":10},"diagram","fe-grid",{"kind":12,"html":13},"html","\u003Cpre class=\"code-tree\">\u003Ccode>\u003Cspan class=\"t-dir\">apps\u002F&lt;app&gt;\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">                         thin: bootstrap, root routes, root providers\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Ffeature-&lt;use-case&gt;\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">   smart components for one use case (a page or a flow)\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Fui-&lt;name&gt;\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">            presentational components: inputs in, events out\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Fdata-access\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">          state, effects, HTTP, facade\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Fmodel\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">                types and pure domain functions, no framework\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Futil-&lt;name&gt;\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">          technical helpers for this domain\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Fapi\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">                  the only thing other domains may import\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002F&lt;domain&gt;\u002Ffeature-shell\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">        the domain's routes and providers\u003C\u002Fspan>\n\u003Cspan class=\"t-dir\">libs\u002Fshared\u002F&lt;type&gt;-&lt;name&gt;\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">          used by every domain, knows none of them\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Sześć zdań do zapamiętania:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Każda biblioteka ma jedną domenę i jeden typ\u003C\u002Fstrong>, zapisane jako tagi, a tagi decydują, co może importować.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Importy wskazują w dół drabiny typów\u003C\u002Fstrong>: feature → ui, data-access → model → util. Nigdy w górę, nigdy w bok między feature'ami.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Domena widzi inną domenę tylko przez jej bibliotekę \u003Ccode>api\u003C\u002Fcode>.\u003C\u002Fstrong> Cała reszta domeny jest prywatna.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>shared\u003C\u002Fcode> nie zna żadnej domeny.\u003C\u002Fstrong> Jeśli „wspólny” plik wspomina o zleceniach serwisowych, należy do maintenance.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Komponenty nigdy nie rozmawiają z HTTP.\u003C\u002Fstrong> Dane płyną przez \u003Ccode>data-access\u003C\u002Fcode>; feature widzi fasadę albo selektory, nigdy URL.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Aplikacje są cienkie.\u003C\u002Fstrong> Aplikacja spina trasy i providery; funkcje mieszkają w bibliotekach, więc druga aplikacja nic nie kosztuje.\u003C\u002Fli>\n\u003C\u002Fol>\n",[15,28,32,36,40,60,76,92,116,144,156,176,216,244,248,252,272],{"id":16,"text":17,"depth":18,"children":19},"s1","1. Po co frontendowi architektura",2,[20,24],{"id":21,"text":22,"depth":4,"children":23},"s1-1","1.1. Cele",[],{"id":25,"text":26,"depth":4,"children":27},"s1-2","1.2. Czego ta architektura nie robi",[],{"id":29,"text":30,"depth":18,"children":31},"s2","2. Skąd się wziął ten pomysł",[],{"id":33,"text":34,"depth":18,"children":35},"s3","3. Architektura na jednej stronie",[],{"id":37,"text":38,"depth":18,"children":39},"s4","4. Słownik",[],{"id":41,"text":42,"depth":18,"children":43},"s5","5. Przykład: Fleetline",[44,48,52,56],{"id":45,"text":46,"depth":4,"children":47},"s5-1","5.1. Aplikacje",[],{"id":49,"text":50,"depth":4,"children":51},"s5-2","5.2. Domeny i zespoły",[],{"id":53,"text":54,"depth":4,"children":55},"s5-3","5.3. Workspace",[],{"id":57,"text":58,"depth":4,"children":59},"s5-4","5.4. Jeden przypadek użycia przez wszystkie warstwy",[],{"id":61,"text":62,"depth":18,"children":63},"s6","6. Typy bibliotek",[64,68,72],{"id":65,"text":66,"depth":4,"children":67},"s6-1","6.1. Kto może importować kogo",[],{"id":69,"text":70,"depth":4,"children":71},"s6-2","6.2. Jak duża jest biblioteka",[],{"id":73,"text":74,"depth":4,"children":75},"s6-3","6.3. Style",[],{"id":77,"text":78,"depth":18,"children":79},"s7","7. Domeny i granice",[80,84,88],{"id":81,"text":82,"depth":4,"children":83},"s7-1","7.1. Biblioteka API",[],{"id":85,"text":86,"depth":4,"children":87},"s7-2","7.2. Shared to też domena",[],{"id":89,"text":90,"depth":4,"children":91},"s7-3","7.3. Gdy dwie domeny potrzebują tego samego",[],{"id":93,"text":94,"depth":18,"children":95},"s8","8. Egzekwowanie reguł",[96,100,104,108,112],{"id":97,"text":98,"depth":4,"children":99},"s8-1","8.1. Tagi",[],{"id":101,"text":102,"depth":4,"children":103},"s8-2","8.2. Reguła lintera",[],{"id":105,"text":106,"depth":4,"children":107},"s8-3","8.3. Wymiar frameworka",[],{"id":109,"text":110,"depth":4,"children":111},"s8-4","8.4. Bez Nx: Sheriff",[],{"id":113,"text":114,"depth":4,"children":115},"s8-5","8.5. W CI",[],{"id":117,"text":118,"depth":18,"children":119},"s9","9. Stan w NgRx",[120,124,128,132,136,140],{"id":121,"text":122,"depth":4,"children":123},"s9-1","9.1. Model",[],{"id":125,"text":126,"depth":4,"children":127},"s9-2","9.2. Zdarzenia",[],{"id":129,"text":130,"depth":4,"children":131},"s9-3","9.3. Feature: stan, reducer, selektory",[],{"id":133,"text":134,"depth":4,"children":135},"s9-4","9.4. HTTP i efekty",[],{"id":137,"text":138,"depth":4,"children":139},"s9-5","9.5. Providery",[],{"id":141,"text":142,"depth":4,"children":143},"s9-6","9.6. Publiczne API data-access",[],{"id":145,"text":146,"depth":18,"children":147},"s10","10. Fasada i kiedy ją pominąć",[148,152],{"id":149,"text":150,"depth":4,"children":151},"s10-1","10.1. Po co fasada",[],{"id":153,"text":154,"depth":4,"children":155},"s10-2","10.2. Dlaczego fasada jest opcjonalna",[],{"id":157,"text":158,"depth":18,"children":159},"s11","11. Angular od początku do końca",[160,164,168,172],{"id":161,"text":162,"depth":4,"children":163},"s11-1","11.1. Biblioteka ui",[],{"id":165,"text":166,"depth":4,"children":167},"s11-2","11.2. Biblioteka feature",[],{"id":169,"text":170,"depth":4,"children":171},"s11-3","11.3. Shell",[],{"id":173,"text":174,"depth":4,"children":175},"s11-4","11.4. Aplikacja",[],{"id":177,"text":178,"depth":18,"children":179},"s12","12. React i Next.js",[180,184,188,192,196,200,204,208,212],{"id":181,"text":182,"depth":4,"children":183},"s12-1","12.1. Co odpowiada czemu",[],{"id":185,"text":186,"depth":4,"children":187},"s12-2","12.2. Tagi dla serwera i klienta",[],{"id":189,"text":190,"depth":4,"children":191},"s12-3","12.3. HTTP i klient zapytań",[],{"id":193,"text":194,"depth":4,"children":195},"s12-4","12.4. Zapytania i mutacje",[],{"id":197,"text":198,"depth":4,"children":199},"s12-5","12.5. Stan klienta w Zustandzie",[],{"id":201,"text":202,"depth":4,"children":203},"s12-6","12.6. Hook fasady",[],{"id":205,"text":206,"depth":4,"children":207},"s12-7","12.7. Feature, ui i trasa",[],{"id":209,"text":210,"depth":4,"children":211},"s12-8","12.8. Shell i API innej domeny",[],{"id":213,"text":214,"depth":4,"children":215},"s12-9","12.9. Pułapki specyficzne dla Next.js",[],{"id":217,"text":218,"depth":18,"children":219},"s13","13. Vue i Nuxt",[220,224,228,232,236,240],{"id":221,"text":222,"depth":4,"children":223},"s13-1","13.1. Co odpowiada czemu",[],{"id":225,"text":226,"depth":4,"children":227},"s13-2","13.2. Wyłączcie auto-importy dla bibliotek",[],{"id":229,"text":230,"depth":4,"children":231},"s13-3","13.3. Store",[],{"id":233,"text":234,"depth":4,"children":235},"s13-4","13.4. Composable fasady i zasięg store'a",[],{"id":237,"text":238,"depth":4,"children":239},"s13-5","13.5. Feature, ui, shell i strona",[],{"id":241,"text":242,"depth":4,"children":243},"s13-6","13.6. Pułapki specyficzne dla Nuxt",[],{"id":245,"text":246,"depth":18,"children":247},"s14","14. Obok siebie",[],{"id":249,"text":250,"depth":18,"children":251},"s15","15. Testy według typu biblioteki",[],{"id":253,"text":254,"depth":18,"children":255},"s16","16. Dorastanie do tej architektury i migracja",[256,260,264,268],{"id":257,"text":258,"depth":4,"children":259},"s16-1","16.1. Migracja w ośmiu krokach",[],{"id":261,"text":262,"depth":4,"children":263},"s16-2","16.2. Co zwykle idzie źle",[],{"id":265,"text":266,"depth":4,"children":267},"s16-3","16.3. Kiedy podzielić bibliotekę",[],{"id":269,"text":270,"depth":4,"children":271},"s16-4","16.4. Kiedy to za dużo",[],{"id":273,"text":274,"depth":18,"children":275},"s17","17. Pytania",[],33,1795449738468]