Saltar al contenido
SkillsBundleby SANTACONCHA
ES EN

Skill individual para IA · IA para Desarrollo Web

python-design-patterns

Patrones de diseno en Python: KISS, Separation of Concerns, SOLID, DRY. Incluye ejemplos practicos y refactorizaciones.

Contenido de origen · revisión pendiente Idioma de origen: EN

Esta ficha muestra el contenido disponible en su idioma de origen.

ZIP gratuito · Un único método canónico · Ejemplo de uso · Guía de instalación · Avisos de licencia

Del archivo al resultado útil

Cómo pedir trabajo con esta skill instalada

Instalar la skill da un método a tu IA. Tu petición todavía debe aportar los hechos del caso, las restricciones y el entregable esperado.

1Nombra la tarea real

Describe la decisión o el entregable, no solo el tema.

2Aporta la información

Añade materiales, público, límites y hechos conocidos.

3Define qué significa acabado

Fija formato, criterios de calidad y comprobaciones.

Petición inicial adaptable Sustituye los corchetes por tu caso

Cuándo usarla

  • Designing new components or services
  • Refactoring complex or tangled code
  • Deciding whether to create an abstraction
  • Choosing between inheritance and composition
  • Evaluating code complexity and coupling
  • Planning modular architectures

Errores que conviene evitar

A class is growing and seems to have multiple responsibilities, but splitting it feels wrong. Apply the "reason to change" test: list every change that could require editing this class. If the list has items from different domains (e.g., HTTP parsing AND business rules AND formatting), split it. If all changes stem from the same domain concern, the class may be appropriately sized.

Injecting all dependencies through the constructor is producing constructors with 7+ parameters. This is a sign of too many responsibilities in one class, not a problem with dependency injection. Split the class into smaller units first, then each constructor naturally becomes smaller.

Composition is producing deeply nested wrapper objects that are hard to trace. Keep the composition shallow (2-3 levels). If wrapping is the only mechanism, consider whether a Protocol-based approach or simple function composition would be cleaner than a chain of decorator objects.

The rule of three says not to abstract yet, but the duplication is causing bugs when one copy is updated but not the other. Duplication that diverges in dangerous ways should be abstracted sooner. The rule of three is a heuristic, not a law. If the copies are already diverging incorrectly, extract immediately and add a test that exercises the shared behavior.

A service layer is importing from the API layer, breaking the dependency direction. This is a layering violation. The service layer must not import from handlers. Introduce a shared types/models layer that both can import from, keeping the dependency arrow pointing downward (API → Service → Repository).

Elige el alcance adecuado

Packs que incluyen esta skill

Descarga solo este método o llévatelo junto con el resto de su área profesional.

Esta ficha

Skill individual

La descarga útil más pequeña, preparada para un proyecto web o para un agente.

Elegir formato →
Pack profesional

IA para Desarrollo Web

Esta skill junto a los demás métodos seleccionados para esta área profesional.

Mismo método, distinta instalación

¿Dónde vas a usarla?

No duplicamos la skill para cada plataforma. Conservamos un método canónico y explicamos la ruta de instalación correcta.

Trazable por diseño

El origen y la licencia viajan con el archivo.

SkillsBundle cataloga material propio y de terceros. Su inclusión no atribuye la autoría original a SkillsBundle. El ZIP individual conserva la ruta canónica del catálogo e incluye los avisos de licencia aplicables.

Ruta de catálogo
skills/verticals/web-development/skills/python-design-patterns
Origen de la ficha
Extraída de SKILL.md
Leer términos y política de licencias →

Empieza por una tarea real

Instala el método. Conserva tu criterio.

Elegir formato