Pátrúin dhearaidh ná réitigh athnuaite, cruthaithe ar fhadhbanna coitianta dearaidh bogearraí — teimpléid ghinearálta maidir le conas struchtúr a dhéanamh ar chód chun dúshláin athrialach a réiteach. Cuireann siad foclóir comhroinnte agus cur chuige tástála ar fáil, agus cabhraíonn siad le cód níos fearr, níos sochreidte a scríobh.
Cad iad pátrúin dhearaidh
DESIGN PATTERNS = proven, reusable solutions to RECURRING design problems:
→ not code to copy, but TEMPLATES/approaches for structuring code
→ distilled from experience (best practices for common situations)
→ e.g. "how do I ensure only one instance of a class?" → Singleton pattern
→ describe the PROBLEM, the SOLUTION structure, and the trade-offs
