<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dustyways.wiki/index.php?action=history&amp;feed=atom&amp;title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch</id>
	<title>Jak uspořádat verzování kódu při více knihovnách - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dustyways.wiki/index.php?action=history&amp;feed=atom&amp;title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch"/>
	<link rel="alternate" type="text/html" href="https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;action=history"/>
	<updated>2026-08-31T09:26:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163264&amp;oldid=prev</id>
		<title>ONHLavonda at 18:34, 21 August 2026</title>
		<link rel="alternate" type="text/html" href="https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163264&amp;oldid=prev"/>
		<updated>2026-08-21T18:34:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:34, 21 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na &lt;/del&gt;co &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se zaměřit při testování Prvním krokem &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vyzkoušet alespoň dva nebo tři kandidáty&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Věnujte každému alespoň jeden den&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ne jen půl hodiny. Všímejte si, jak rychle &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otevírá, jak reaguje &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;psaní &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zda nabízí automatické doplňování kódu&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které skutečně rozumí kontextu&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Důležité &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;také ladění – vyzkoušejte si spustit program &lt;/del&gt;s &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;přerušením &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;řádku a projít proměnné&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Typickou chybou začátečníků je přeskakovat tento krok &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zůstat u nástroje&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;který je sice populární, ale nevyhovuje jejich způsobu myšlení&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při používání Reduxu v Reactu &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;také důležité správně používat hooky useDispatch a useSelector&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vyhněte se volání useDispatch v každé komponentě&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pokud to není nutné – místo toho můžete předávat dispatch přes props&lt;/del&gt;, ale &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to vede k prop-drilling&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;V praxi je lepší použít useDispatch přímo v komponentě&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale mějte na paměti&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že dispatch funkce je stabilní &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nemění &lt;/del&gt;se. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pro výběr dat používejte useSelector s co nejmenším výběrem &lt;/del&gt;– &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nevybírejte celý state&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale pouze konkrétní část. To minimalizuje počet rerenderů&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Klíčové kroky pro čistou strukturu kódu Pro větší projekty &lt;/del&gt;se vyplatí &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rozdělit kód &lt;/del&gt;do &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;modulů – routery pro jednotlivé zdroje&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kontrolery pro logiku a služby pro práci &lt;/del&gt;s &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;daty&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Místo psaní &lt;/del&gt;všech &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;endpointů do jednoho souboru použijte express&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Router()&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Například pro správu uživatelů: ve složce routes vytvořte userRoutes.js a v něm definujte GET&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;POST&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PUT a DELETE. Poté router připojte v hlavním souboru &lt;/del&gt;pomocí &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;app&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;use(&#039;/api/users&#039;, userRouter). Tím udržíte kód přehledný &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;snadno testovatelný&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při návrhu endpointů dbejte na správné &lt;/del&gt;použití &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HTTP metod&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GET pro čtení&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;POST pro vytvoření&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PUT nebo PATCH pro úpravu a DELETE pro mazání&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nezapomeňte na validaci vstupních dat – bez ní se brzy dočkáte neočekávaných chyb. Pro validaci použijte knihovnu (například Joi nebo express-validator)&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která vám umožní definovat pravidla pro jednotlivá pole&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Typickou chybou začátečníků je spoléhat &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;na to&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že data z klienta jsou vždy správná &lt;/del&gt;– to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;je cesta &lt;/del&gt;k &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;děravému rozhraní&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud jste se ještě nerozhodli&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zkuste si na jednom malém projektu vyzkoušet dvě různá prostředí a porovnejte, jak vám sedí&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sledujte nejen funkce&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale i to&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jak vám vyhovuje rozložení oken&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;klávesové zkratky a celkový pocit z práce&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nejdůležitější &lt;/del&gt;je, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abyste &lt;/del&gt;se v &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nástroji cítili dobře a nestrávili víc času bojem s prostředím než samotným programováním. Správná volba &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pozná podle toho, že na ni během práce vůbec nemyslíte&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jak nastavit závislosti &lt;/del&gt;mezi &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;knihovnami a projektem Nejprve si definujte&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které knihovny &lt;/del&gt;jsou &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pro běh projektu nezbytné a které jsou volitelné. Pro každou knihovnu si &lt;/del&gt;vytvořte &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vlastní repozitář s vlastním verzováním. Hlavní &lt;/del&gt;projekt &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pak odkazuje na konkrétní verze knihoven&lt;/del&gt;, a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to nejlépe pomocí tagů nebo commitů&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vyhněte se používání „latest&quot; nebo „master&quot; – to vždy vede k nečekaným změnám&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Místo toho vždy uveďte číslo verze&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které je v daném okamžiku stabilní. Tím zajistíte&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že build projektu bude reprodukovatelný&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na závěr: Express &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mocný nástroj&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale nechte se vést jeho filozofií&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pište middleware&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které řeší jeden úkol&lt;/del&gt;, a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;komponujte je dohromady&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Testujte své endpointy pomocí nástrojů pro testování API, abyste odhalili problémy dřív, než je objeví uživatel&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;S těmito návyky si vybudujete rozhraní&lt;/del&gt;, které &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bude robustní, snadno rozšiřitelné a hlavně funkční v praxi&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Stavba REST API s Node&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Express &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dnes standardem pro backend aplikací. Než začnete&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ujistěte &lt;/del&gt;se, že &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;máte nainstalovaný Node&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js a npm. V prázdné složce inicializujte projekt příkazem npm init -y a poté nainstalujte Express&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Základní server je otázkou několika řádků: stačí vytvořit soubor index.js&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;importovat express, definovat port a spustit posluchač&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tím získáte funkční základ&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;na který můžete navěsit jednotlivé endpointy&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Prakticky to znamená&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že &lt;/del&gt;v &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;konfiguračním souboru projektu (např&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pro balíčkovací nástroj) zapíšete konkrétní číslo verze knihovny&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při změně knihovny vytvoříte nová verze v jejím repozitáři a teprve poté aktualizujete odkaz v hlavním projektu&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud potřebujete experimentovat s neoficiální verzí&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;použijte branch &lt;/del&gt;nebo &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fork, ale nikdy nezasahujte do hlavního vývojového toku&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tím se vyhnete situaci&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kdy knihovna funguje jen v jednom prostředí a jinak ne&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na co se zaměřit při konfiguraci &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;běžné prá&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Při výběru &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zaměřte také na to, jak snadno lze prostředí rozšířit&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Potřebujete-li podporu &lt;/del&gt;pro &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jiné jazyky nebo nástroje&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zkontrolujte&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zda existují oficiální pluginy&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vyhněte &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale instalování desítek rozšíření hned &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;začátku&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protože každé z nich zpomaluje start a může způsobovat konflikty&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Začněte s minimem a přidávejte jen to&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co skutečně využíváte. Ušetříte si starosti s nekompatibilitou a přehlednost si udržíte i ve složitějších projektech&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při řešení konfliktů se zaměřte na to, &lt;/ins&gt;co je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skutečně potřeba změnit&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Než začnete konflikt ručně upravovat&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;podívejte &lt;/ins&gt;se na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;obě verze kódu &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pochopte, proč ke konfliktu došlo. Často se stává&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že konflikt je pouze zdánlivý — obě větve dělají stejnou věc jiným způsobem&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;V takovém případě &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lepší konzultovat &lt;/ins&gt;s &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;autorem druhé změny a domluvit se &lt;/ins&gt;na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jednotném řešení&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Po vyřešení konfliktů vždy spusťte testy &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zkontrolujte&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že vaše změny nezpůsobily regresi&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Retrospektiva &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;srdcem zlepšování, ale jen pokud ji berete vážně&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;České týmy často sklouznou k tomu&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že si postěžují&lt;/ins&gt;, ale &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nenavrhnou žádná konkrétní opatření&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Zkuste metodu „start, stop, continue&quot; – každý člen navrhne jednu věc, kterou začneme dělat, jednu, kterou přestaneme&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a jednu&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kterou budeme dělat dál. Na konci si vyberte maximálně tři akční body a přiřaďte jim vlastníka. Bez vlastníka &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;termínu &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;retrospektiva mění v tlachání&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A pozor &lt;/ins&gt;– &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;změny z retrospektivy musí být viditelné už v dalším sprintu&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jinak tým ztratí motivaci&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nakonec &lt;/ins&gt;se vyplatí &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;investovat čas &lt;/ins&gt;do &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;automatizace testů, které ověří&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že projekt funguje &lt;/ins&gt;s &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;novou verzí knihovny&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Před uvolněním nové verze knihovny spusťte testy &lt;/ins&gt;všech &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;projektů, které ji používají&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tím odhalíte případné problémy dříve, než se dostanou k uživatelům&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Když se přesto stane&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že nová verze knihovny rozbije projekt&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mějte připravený postup pro rychlé vrácení zpět – ideálně &lt;/ins&gt;pomocí &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;reverze commitu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;S tímto přístupem bude vaše verzování přehledné &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;projekty bez zbytečného chaosu&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Mezi časté omyly patří i to, že „bez licence&quot; znamená volné &lt;/ins&gt;použití. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Není tomu tak – autorský zákon chrání vaše dílo automaticky&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a kdokoli by ho chtěl použít&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;musí žádat o svolení&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud chcete být opravdu otevření&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;musíte licenci explicitně udělit&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Také &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vyhněte vlastním vymyšleným licencím&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které kombinují prvky různých standardů &lt;/ins&gt;– to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vede &lt;/ins&gt;k &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;právní nejistotě a většina vývojářů se jim vyhne. Držte se osvědčených šablon, které jsou srozumitelné a mají jasnou judikaturu&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Když už zvládáš jednoduché volání&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zkus přidat parametry dotazu. Třeba pro filtr nebo stránkování&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To je častý bod&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kde začátečníci tápou – nevědí&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jestli parametry patří do URL&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nebo do těla&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pro GET &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;používej v URL za otazníkem&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pro POST je dej do těla jako JSON. Vždy si přečti dokumentaci konkrétního API, protože formát &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;liší. A hlavně: nikdy neposílej citlivé údaje &lt;/ins&gt;v &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;URL – může &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ti to vymstít v logách&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jednotkové testy jsou základem udržovatelného kódu. Framework NUnit patří &lt;/ins&gt;mezi &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nejpoužívanější nástroje pro testování v ekosystému .NET. Pokud začínáte&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;první kroky &lt;/ins&gt;jsou &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jednoduché: &lt;/ins&gt;vytvořte &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;testovací &lt;/ins&gt;projekt, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;přidejte balíček NUnit &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;napište první třídu s atributem [TestFixture]&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Každá testovací metoda pak nese atribut [Test]&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Důležité je&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aby testy byly nezávislé&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rychlé a jejich výsledek nebyl ovlivněn pořadím spuštění&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Verzování kódu při paralelním vývoji více feature větví je častým zdrojem konfliktů a ztráty času. Klíčem k efektivní práci &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;disciplína a jasná pravidla&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která platí pro celý tým&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Než začnete s jakoukoli větví&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ujistěte se&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že máte aktuální stav hlavní větve &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že vaše lokální změny jsou založeny na stabilním bodu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ideálně si před vytvořením nové větve stáhněte nejnovější změny z remote a vytvořte větev až z aktuálního stavu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tím se vyhnete zbytečným konfliktům&lt;/ins&gt;, které &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vznikají při mergování starých větví&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Scrum není o tom, že budete dělat víc věcí za kratší dobu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Je o tom, že budete dělat ty správné věci &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;budete mít zpětnou vazbu dřív. Pro české týmy &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;klíčové, aby si ujasnily role&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;definici hotového a hlavně aby &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nebály říct managementu&lt;/ins&gt;, že &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;něco nestihnou&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Začněte malým pilotním projektem, ne celou organizací&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Až uvidíte první výsledky&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rozšiřte působnost&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jinak skončíte s byrokratickým monstrem&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které nemá s agilitou nic společného&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Začni s voláním GET na veřejné API, které nevyžaduje registraci ani klíč. Otevři si terminál a použij nástroj pro příkazovou řádku&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nebo si vytvoř malý skript &lt;/ins&gt;v &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jazyce, který už znáš&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tvůj první požadavek může být jen načtení dat ve formátu JSON&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Odpověď si vytiskni na obrazovku&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Důležité je sledovat, jakou strukturu data mají – jestli je to pole, objekt&lt;/ins&gt;, nebo &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vnořený objekt&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To je základ pro to&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abys uměl data zpracovat dál&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Největší český problém je vztah k odhadům. Tým často vnímá odhady jako závazek vůči managementu, &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;proto buď nadhodnocuje, nebo &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bojí říct pravdu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Odhady jsou ale pouze nástroj &lt;/ins&gt;pro &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;plánování&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ne výkonnostní kritérium. Pokud management začne měřit rychlost týmu (velocity) a tlačit na vyšší čísla&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;tým začne uměle navyšovat odhady&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Místo toho &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zaměřte &lt;/ins&gt;na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;stabilní tempo – pokud je rychlost konstantní&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;můžete plánovat s větší jistotou&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A pokud tým dodává méně, než slíbil, řešte příčiny&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ne čísla&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ONHLavonda</name></author>
	</entry>
	<entry>
		<id>https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163145&amp;oldid=prev</id>
		<title>LarueQec023224 at 18:23, 21 August 2026</title>
		<link rel="alternate" type="text/html" href="https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163145&amp;oldid=prev"/>
		<updated>2026-08-21T18:23:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:23, 21 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Retrospektiva &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nejdůležitější ceremonie agile týmu&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale často skončí u obecného tlachání&lt;/del&gt;, které &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nikam nevede&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Klíčem k posunu &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;strukturovaná zpětná vazba, která nutí každého mluvit konkrétně &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;měřitelně&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Bez ní se diskuse točí v kruzích &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;stejné problémy se vracejí každý sprint&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jak na to?&lt;/del&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Častou chybou &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;psát zprávy &lt;/del&gt;v &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;minulém čase&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jako byste popisovali hotovou věc&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Lepší &lt;/del&gt;je použít &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rozkazovací způsob nebo přítomný čas&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protože to odpovídá tomu&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co commit dělá, když je aplikován. Například „Přidej testy pro přihlášení&quot; &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jasné &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;akční&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vyhněte se také vágním slovům jako „úpravy&quot;, „oprava&quot; nebo „refaktoring&quot; &lt;/del&gt;– &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pokud neřeknou&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co konkrétně je upraveno, opraveno nebo refaktorováno&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vždy doplňte, co je předmětem změny, ať už jde o soubor, funkci nebo chování&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Typickou chybou je verzování celého projektu jako jedné velké verze&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která zahrnuje i změny v knihovnách&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pak není jasné, která verze knihovny je v které verzi projektu obsažena&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při hledání chyby pak musíte procházet celou historii, místo abyste se podívali na seznam závislostí&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Další častou chybou je&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že knihovny mají příliš časté aktualizace&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které mění veřejné rozhraní&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To pak nutí všechny projekty k okamžitým úpravám&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Proto pro knihovny platí pravidlo: měnit veřejné rozhraní pouze ve větších&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;předem oznámených verzích&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Testovací pyramida není jen teoretický model, ale praktický nástroj, který vám pomůže udržet náklady &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;testování pod kontrolou&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Základní myšlenka je jednoduchá: čím níže v pyramidě test stojí&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;tím by ho mělo být více&lt;/del&gt;, a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;naopak&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na dně jsou rychlé a levné jednotkové testy&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;uprostřed integrační testy a &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vrcholu pomalé end-&lt;/del&gt;to&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-end testy. Když tohle rozdělení nedodržíte, skončíte s testy, které běží desítky minut&lt;/del&gt;, jsou &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;křehké a při každé změně kódu vyžadují ruční opravy&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Když procházíte historii projektu&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;každá commit zpráva by měla odpovědět &lt;/del&gt;na dvě &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otázky: co se změnilo &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;proč&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Většina vývojářů &lt;/del&gt;ale &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;píše zprávy jako „oprava bugu&quot; nebo „úpravy&quot;. Takové popisy jsou k ničemu&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protože neříkají, co přesně se dělo&lt;/del&gt;, a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hlavně proč&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Bez kontextu se po pár měsících vracíte k hádankám a musíte ručně procházet diff&lt;/del&gt;, abyste &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zjistili, co &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vlastně stalo&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cílem není psát romány&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale dodat dostatek informací, aby se kdokoli v historii rychle zorientoval&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dalším bodem je délka zprávy&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Krátké shrnutí je povinné, ale podrobný popis by měl být maximálně pár odstavců&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud potřebujete vysvětlit více&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;je lepší rozdělit změny na menší commity&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nepište ale ani zprávy, které jsou jen shrnutím diffu &lt;/del&gt;– to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;je zbytečné&lt;/del&gt;. Místo toho &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se zaměřte na kontext: jaké problémy změna řeší&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jaké jsou její vedlejší účinky, co by mohlo být překvapivé&lt;/del&gt;. Tím &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pomůžete kolegům i budoucímu sobě&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jakmile &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jednotková vrstva pevná&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;přejděte na integrační testy&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ty ověřují&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že vaše komponenty spolupracují správně – typicky s databází&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;externími službami nebo frontendem&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Zde platí pravidlo: testujte jen to&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co jednotkově nejde pokrýt. Například mapování ORM&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SQL dotazy nebo synchronizaci mezi moduly&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;U integračních testů &lt;/del&gt;si &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dejte pozor na stav prostředí. Vždy používejte izolovanou testovací databázi &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;po každém běhu ji vracejte do původního stavu. Jinak se vám testy navzájem ovlivňují a vy strávíte hodiny hledáním chyby, která je jen artefaktem pořadí testů&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na závěr si zkuste přečíst svou zprávu očima někoho, kdo projekt nezná&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud by mu dávala smysl &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;věděl by&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;proč byla změna provedena&lt;/del&gt;, máte &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vyhráno&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A pokud si nejste jistí, podívejte se na historii svých posledních commitů – často uvidíte, co &lt;/del&gt;je &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;třeba zlepšit&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Psaní kvalitních zpráv je dovednost&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která se dá trénovat&lt;/del&gt;, a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;odměnou je vám přehledná historie&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která šetří čas při každé spolupráci&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nakonec si pamatujte&lt;/del&gt;, že &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;retrospektiva není jen o zpětné vazbě, ale i o oslavě úspěchů&lt;/del&gt;. Pokud &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;tým splnil cíl &lt;/del&gt;nebo &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zvládl náročnou situaci&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;řekněte to nahlas&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pozitivní zpětná vazba posiluje důvěru a motivaci, a to je základ pro to, aby lidi vůbec chtěli mluvit o tom, co &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nedaří. Strukturovaná vazba vám dá rámec&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale teprve bezpečné &lt;/del&gt;prostředí &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;z ní udělá skutečný nástroj růstu&lt;/del&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Klíčové je rozlišovat mezi „co&quot; &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;„proč&quot;&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Diff vám ukáže&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co &lt;/del&gt;se &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;změnilo, &lt;/del&gt;ale &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ne proč. Proto v popisu vždy vysvětlete důvod. Například místo „Změněna barva tlačítka&quot; napište „Změněna barva tlačítka &lt;/del&gt;na &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;tmavší&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aby byl lépe viditelný na světlém pozadí&quot;&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Taková informace šetří čas při revizi kódu i při budoucí údržbě. Pokud je změna složitější&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rozdělte ji do více commitů, ať každý dělá jednu věc&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To usnadní reverz &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hledání příčiny chyb&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na co se zaměřit při testování Prvním krokem &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vyzkoušet alespoň dva nebo tři kandidáty. Věnujte každému alespoň jeden den, ne jen půl hodiny. Všímejte si&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jak rychle se otevírá, jak reaguje na psaní a zda nabízí automatické doplňování kódu&lt;/ins&gt;, které &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skutečně rozumí kontextu&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Důležité &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;také ladění – vyzkoušejte si spustit program s přerušením na řádku &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;projít proměnné&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Typickou chybou začátečníků je přeskakovat tento krok &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zůstat u nástroje, který je sice populární, ale nevyhovuje jejich způsobu myšlení&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při používání Reduxu v Reactu &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;také důležité správně používat hooky useDispatch a useSelector. Vyhněte se volání useDispatch &lt;/ins&gt;v &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;každé komponentě&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pokud to není nutné – místo toho můžete předávat dispatch přes props, ale to vede k prop-drilling&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;V praxi &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lepší &lt;/ins&gt;použít &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;useDispatch přímo v komponentě&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale mějte na paměti&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že dispatch funkce &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;stabilní &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nemění se&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pro výběr dat používejte useSelector s co nejmenším výběrem &lt;/ins&gt;– &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nevybírejte celý state&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale pouze konkrétní část&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To minimalizuje počet rerenderů&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Klíčové kroky pro čistou strukturu kódu Pro větší projekty se vyplatí rozdělit kód do modulů – routery pro jednotlivé zdroje&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kontrolery pro logiku a služby pro práci s daty. Místo psaní všech endpointů do jednoho souboru použijte express&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Router()&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Například pro správu uživatelů: ve složce routes vytvořte userRoutes&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js a v něm definujte GET&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;POST&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PUT a DELETE&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Poté router připojte v hlavním souboru pomocí app&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;use(&#039;/api/users&#039;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;userRouter). Tím udržíte kód přehledný a snadno testovatelný&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Při návrhu endpointů dbejte &lt;/ins&gt;na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;správné použití HTTP metod&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GET pro čtení&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;POST pro vytvoření&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PUT nebo PATCH pro úpravu &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;DELETE pro mazání&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nezapomeňte na validaci vstupních dat – bez ní se brzy dočkáte neočekávaných chyb. Pro validaci použijte knihovnu (například Joi nebo express-validator)&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;která vám umožní definovat pravidla pro jednotlivá pole. Typickou chybou začátečníků je spoléhat se &lt;/ins&gt;na to, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že data z klienta &lt;/ins&gt;jsou &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vždy správná – to je cesta k děravému rozhraní&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pokud jste se ještě nerozhodli&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zkuste si &lt;/ins&gt;na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jednom malém projektu vyzkoušet &lt;/ins&gt;dvě &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;různá prostředí &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;porovnejte, jak vám sedí&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sledujte nejen funkce, &lt;/ins&gt;ale &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;i to&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jak vám vyhovuje rozložení oken&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;klávesové zkratky &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;celkový pocit z práce&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nejdůležitější je&lt;/ins&gt;, abyste se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v nástroji cítili dobře a nestrávili víc času bojem s prostředím než samotným programováním&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Správná volba se pozná podle toho&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že na ni během práce vůbec nemyslíte&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Jak nastavit závislosti mezi knihovnami a projektem Nejprve si definujte, které knihovny jsou pro běh projektu nezbytné a které jsou volitelné&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pro každou knihovnu si vytvořte vlastní repozitář s vlastním verzováním&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Hlavní projekt pak odkazuje na konkrétní verze knihoven&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a to nejlépe pomocí tagů nebo commitů&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Vyhněte se používání „latest&quot; nebo „master&quot; &lt;/ins&gt;– to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vždy vede k nečekaným změnám&lt;/ins&gt;. Místo toho &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vždy uveďte číslo verze&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které je v daném okamžiku stabilní&lt;/ins&gt;. Tím &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zajistíte, že build projektu bude reprodukovatelný&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na závěr: Express &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mocný nástroj&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale nechte se vést jeho filozofií&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pište middleware&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;které řeší jeden úkol&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a komponujte je dohromady&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Testujte své endpointy pomocí nástrojů pro testování API&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;abyste odhalili problémy dřív&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;než je objeví uživatel&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;S těmito návyky &lt;/ins&gt;si &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vybudujete rozhraní, které bude robustní, snadno rozšiřitelné &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hlavně funkční v praxi&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Stavba REST API s Node&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Express je dnes standardem pro backend aplikací. Než začnete&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ujistěte se&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;že &lt;/ins&gt;máte &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nainstalovaný Node&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js a npm. V prázdné složce inicializujte projekt příkazem npm init -y a poté nainstalujte Express. Základní server &lt;/ins&gt;je &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otázkou několika řádků: stačí vytvořit soubor index&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;importovat express&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;definovat port &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;spustit posluchač. Tím získáte funkční základ&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;na který můžete navěsit jednotlivé endpointy&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Prakticky to znamená&lt;/ins&gt;, že &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v konfiguračním souboru projektu (např. pro balíčkovací nástroj) zapíšete konkrétní číslo verze knihovny. Při změně knihovny vytvoříte nová verze v jejím repozitáři a teprve poté aktualizujete odkaz v hlavním projektu&lt;/ins&gt;. Pokud &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;potřebujete experimentovat s neoficiální verzí, použijte branch &lt;/ins&gt;nebo &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fork&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ale nikdy nezasahujte do hlavního vývojového toku&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tím &lt;/ins&gt;se &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vyhnete situaci&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kdy knihovna funguje jen v jednom &lt;/ins&gt;prostředí &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a jinak ne&lt;/ins&gt;.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Na co se zaměřit při konfiguraci &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;běžné prá&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Při výběru se zaměřte také na to, jak snadno lze prostředí rozšířit&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Potřebujete-li podporu pro jiné jazyky nebo nástroje, zkontrolujte&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;zda existují oficiální pluginy. Vyhněte &lt;/ins&gt;se ale &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;instalování desítek rozšíření hned &lt;/ins&gt;na &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;začátku&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protože každé z nich zpomaluje start a může způsobovat konflikty&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Začněte s minimem a přidávejte jen to&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;co skutečně využíváte&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ušetříte si starosti s nekompatibilitou &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;přehlednost si udržíte i ve složitějších projektech&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>LarueQec023224</name></author>
	</entry>
	<entry>
		<id>https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163092&amp;oldid=prev</id>
		<title>CarmellaBaines: Created page with &quot;Retrospektiva je nejdůležitější ceremonie agile týmu, ale často skončí u obecného tlachání, které nikam nevede. Klíčem k posunu je strukturovaná zpětná vazba, která nutí každého mluvit konkrétně a měřitelně. Bez ní se diskuse točí v kruzích a stejné problémy se vracejí každý sprint. Jak na to?&lt;br&gt;&lt;br&gt;Častou chybou je psát zprávy v minulém čase, jako byste popisovali hotovou věc. Lepší je použít rozkazovací způsob nebo pří...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dustyways.wiki/index.php?title=Jak_uspo%C5%99%C3%A1dat_verzov%C3%A1n%C3%AD_k%C3%B3du_p%C5%99i_v%C3%ADce_knihovn%C3%A1ch&amp;diff=163092&amp;oldid=prev"/>
		<updated>2026-08-21T18:19:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Retrospektiva je nejdůležitější ceremonie agile týmu, ale často skončí u obecného tlachání, které nikam nevede. Klíčem k posunu je strukturovaná zpětná vazba, která nutí každého mluvit konkrétně a měřitelně. Bez ní se diskuse točí v kruzích a stejné problémy se vracejí každý sprint. Jak na to?&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Častou chybou je psát zprávy v minulém čase, jako byste popisovali hotovou věc. Lepší je použít rozkazovací způsob nebo pří...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Retrospektiva je nejdůležitější ceremonie agile týmu, ale často skončí u obecného tlachání, které nikam nevede. Klíčem k posunu je strukturovaná zpětná vazba, která nutí každého mluvit konkrétně a měřitelně. Bez ní se diskuse točí v kruzích a stejné problémy se vracejí každý sprint. Jak na to?&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Častou chybou je psát zprávy v minulém čase, jako byste popisovali hotovou věc. Lepší je použít rozkazovací způsob nebo přítomný čas, protože to odpovídá tomu, co commit dělá, když je aplikován. Například „Přidej testy pro přihlášení&amp;quot; je jasné a akční. Vyhněte se také vágním slovům jako „úpravy&amp;quot;, „oprava&amp;quot; nebo „refaktoring&amp;quot; – pokud neřeknou, co konkrétně je upraveno, opraveno nebo refaktorováno. Vždy doplňte, co je předmětem změny, ať už jde o soubor, funkci nebo chování.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Typickou chybou je verzování celého projektu jako jedné velké verze, která zahrnuje i změny v knihovnách. Pak není jasné, která verze knihovny je v které verzi projektu obsažena. Při hledání chyby pak musíte procházet celou historii, místo abyste se podívali na seznam závislostí. Další častou chybou je, že knihovny mají příliš časté aktualizace, které mění veřejné rozhraní. To pak nutí všechny projekty k okamžitým úpravám. Proto pro knihovny platí pravidlo: měnit veřejné rozhraní pouze ve větších, předem oznámených verzích.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Testovací pyramida není jen teoretický model, ale praktický nástroj, který vám pomůže udržet náklady na testování pod kontrolou. Základní myšlenka je jednoduchá: čím níže v pyramidě test stojí, tím by ho mělo být více, a naopak. Na dně jsou rychlé a levné jednotkové testy, uprostřed integrační testy a na vrcholu pomalé end-to-end testy. Když tohle rozdělení nedodržíte, skončíte s testy, které běží desítky minut, jsou křehké a při každé změně kódu vyžadují ruční opravy.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Když procházíte historii projektu, každá commit zpráva by měla odpovědět na dvě otázky: co se změnilo a proč. Většina vývojářů ale píše zprávy jako „oprava bugu&amp;quot; nebo „úpravy&amp;quot;. Takové popisy jsou k ničemu, protože neříkají, co přesně se dělo, a hlavně proč. Bez kontextu se po pár měsících vracíte k hádankám a musíte ručně procházet diff, abyste zjistili, co se vlastně stalo. Cílem není psát romány, ale dodat dostatek informací, aby se kdokoli v historii rychle zorientoval.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Dalším bodem je délka zprávy. Krátké shrnutí je povinné, ale podrobný popis by měl být maximálně pár odstavců. Pokud potřebujete vysvětlit více, je lepší rozdělit změny na menší commity. Nepište ale ani zprávy, které jsou jen shrnutím diffu – to je zbytečné. Místo toho se zaměřte na kontext: jaké problémy změna řeší, jaké jsou její vedlejší účinky, co by mohlo být překvapivé. Tím pomůžete kolegům i budoucímu sobě.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Jakmile je jednotková vrstva pevná, přejděte na integrační testy. Ty ověřují, že vaše komponenty spolupracují správně – typicky s databází, externími službami nebo frontendem. Zde platí pravidlo: testujte jen to, co jednotkově nejde pokrýt. Například mapování ORM, SQL dotazy nebo synchronizaci mezi moduly. U integračních testů si dejte pozor na stav prostředí. Vždy používejte izolovanou testovací databázi a po každém běhu ji vracejte do původního stavu. Jinak se vám testy navzájem ovlivňují a vy strávíte hodiny hledáním chyby, která je jen artefaktem pořadí testů.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Na závěr si zkuste přečíst svou zprávu očima někoho, kdo projekt nezná. Pokud by mu dávala smysl a věděl by, proč byla změna provedena, máte vyhráno. A pokud si nejste jistí, podívejte se na historii svých posledních commitů – často uvidíte, co je třeba zlepšit. Psaní kvalitních zpráv je dovednost, která se dá trénovat, a odměnou je vám přehledná historie, která šetří čas při každé spolupráci.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Nakonec si pamatujte, že retrospektiva není jen o zpětné vazbě, ale i o oslavě úspěchů. Pokud tým splnil cíl nebo zvládl náročnou situaci, řekněte to nahlas. Pozitivní zpětná vazba posiluje důvěru a motivaci, a to je základ pro to, aby lidi vůbec chtěli mluvit o tom, co se nedaří. Strukturovaná vazba vám dá rámec, ale teprve bezpečné prostředí z ní udělá skutečný nástroj růstu.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Klíčové je rozlišovat mezi „co&amp;quot; a „proč&amp;quot;. Diff vám ukáže, co se změnilo, ale ne proč. Proto v popisu vždy vysvětlete důvod. Například místo „Změněna barva tlačítka&amp;quot; napište „Změněna barva tlačítka na tmavší, aby byl lépe viditelný na světlém pozadí&amp;quot;. Taková informace šetří čas při revizi kódu i při budoucí údržbě. Pokud je změna složitější, rozdělte ji do více commitů, ať každý dělá jednu věc. To usnadní reverz a hledání příčiny chyb.&lt;/div&gt;</summary>
		<author><name>CarmellaBaines</name></author>
	</entry>
</feed>