Product Roadmap
Business Priorities
Time
Staff Change
Architecture Change
Tech Stack Change
Product Roadmap
Business Priorities
Time
Staff Change
Architecture Change
Tech Stack Change
https://alexmoldovan.dev/code-bites/colocation-is-king
Colocation or the proximity principleΒ ensures that coupled codeΒ unitsΒ are also phisically grouped together.
https://speakerdeck.com/didoo/let-there-be-peace-on-css?slide=62
const HardwareList = () => {
const { data: hardwareList = [] } = useQuery(...);
return (
<ul className="flex flex-col gap-2">
{ hardwareList.map(hw => (
<li key={hw.id}>
{ hw.name }
</li>
))}
</ul>
)
}const HardwareList = () => {
const { data: hardwareList = [] } = useQuery(...);
return (
<ul className="flex flex-col gap-2">
{ hardwareList.map(hw => (
<HardwareListItem key={hw.id} hardware={hw} />
))}
</ul>
)
}
const HardwareListItem = ({ hardware }) => {
return (
<li className="flex item-center gap-1">
<Icon type="harddisk" size={4} />
{ hardware.gpuCount }x { hardware.gpuType } {hardware.gpuLink}
</li>
)
}const HardwareList = () => {
const { data: hardwareList = [] } = useQuery(...);
return (
<ul className="flex flex-col gap-2">
{ hardwareList.map(hw => (
<HardwareListItem hardware={hw} />
))}
</ul>
)
}
const HardwareListItem = ({ hardware }) => {
return (
<li className="flex item-center gap-1">
<Icon type="harddisk" size={4} />
{formatHardwareDisplayLabel(hardware)}
</li>
)
}
const formatHardwareDisplayLabel = (hw) => {
return `${hw.gpuCount}x ${hw.gpuType}-${hardware.gpuLink}`
}Domain
Colocated units
const HardwareList = () => {
const { data: hardwareList = [] } = useQuery(...);
return (
<ul className="flex flex-col gap-2">
{ hardwareList.map(hw => (
<HardwareListItem hardware={hw} />
))}
</ul>
)
}
const HardwareListItem = ({ hardware }) => {
return (
<li className="flex item-center gap-1">
<Icon type="harddisk" size={4} />
{formatHardwareDisplayLabel(hardware)}
</li>
)
}
const formatHardwareDisplayLabel = (hw) => {
return `${hw.gpuCount}x ${hw.gpuType}-${hardware.gpuLink}`
}export const HardwareList = () => {
const { data: hardwareList = [] } = useQuery(...);
return (
<ul className="flex flex-col gap-2">
{ hardwareList.map(hw => (
<HardwareListItem hardware={hw} />
))}
</ul>
)
}
const HardwareListItem = ({ hardware }) => {
return (
<li className="flex item-center gap-1">
<Icon type="harddisk" size={4} />
{formatHardwareDisplayLabel(hardware)}
</li>
)
}
const formatHardwareDisplayLabel = (hw) => {
return `${hw.gpuCount}x ${hw.gpuType}-${hardware.gpuLink}`
}π©βπ»
function whoYouGonnaCall() {
return "GHOSTBUSTERS!";
}π¨π½βπ»
π©πΏβπ»
π©βπ»
π¨π½βπ»
HardwareList.jsxHardwareListItem.jsxformatHardwareDisplayLabel.jsone component per file
one component export per file
unit test
integration test
role based folders
domain based folders
...
...