This study evaluated the performance of four LLMs (DeepSeek R1, GPT-4o1 Preview, Claude 3.7 Sonnet and Gemini 2.0) in frontend code generation by applying design patterns such as Factory Method, Observer and Strategy. The methodology used zero-shot prompts with three attempts per request, evaluating correct implementation criteria, common errors and response times. The analysis showed that, although the models achieve success rates above 85%, the findings underscore the importance of combining automation through AI with sound software engineering principles. The proper application of design patterns as a compendium of best practices is crucial to ensure maintainable, scalable and efficient code.
Carreras con Impacto is a project of Players Philanthropy Fund a Texas nonprofit corporation recognized by IRS as a tax-exempt public charity under Section 501(c)(3) of the Internal Revenue Code (Federal Tax ID: 27-6601178, ppf.org/pp). Contributions to Carreras con Impacto qualify as tax-deductible to the fullest extent of the law.