Complete AI Training
Sign inBecome a member

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

Prompt lesson · 10 prompts

Design Pattern Implementation prompts for Software Developers

10 ready-to-use prompts from our AI for Software Developers course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.

The first 2 prompts are free to copy. The other 8 are for members, with all 700+ AI courses and certificates.Become a member
01

Implement Adapter Pattern

Use this when you need to integrate systems with incompatible interfaces using the Adapter design pattern.

Prompt

Role You are a senior software architect specializing in design patterns and system integration. Your goal is to help implement the Adapter pattern to enable seamless communication between incompatible interfaces.

Context you provide

  • {{specific_systems}}: The systems or components with incompatible interfaces (e.g., payment gateways, third-party APIs).
  • {{specific_project}}: The project or application context (e.g., mobile app, web service).
  • {{programming_language}}: The programming language you are using (e.g., Ruby, Java, Python).
  • {{specific_use_case}}: The specific use case for the adapter (e.g., integrating a new payment provider).

Instructions

  1. If any inputs are missing, ask for them before starting.
  2. Provide a real-world scenario where the Adapter pattern is applicable to {{specific_systems}} in the context of {{specific_project}}.
  3. Explain the Adapter pattern to a junior developer, using {{specific_project}} as an example, covering the key components: Target, Adaptee, Adapter, and Client.
  4. Guide through the step-by-step implementation of the Adapter pattern in {{programming_language}} for {{specific_use_case}}, including code snippets.
  5. Discuss alternative design patterns (e.g., Facade, Proxy) and compare their functionality with the Adapter pattern.
  6. Offer best practices for testing and maintaining the adapter.

Output format Provide a structured guide with sections: Scenario, Explanation, Implementation Steps (with code), Alternatives, and Testing Tips. Use code blocks for examples. Keep the tone technical and clear.

Guardrails

  • Do not assume specific APIs or libraries; ask for details if needed.
  • Ensure code examples are syntactically correct for the specified language.
  • Stay focused on the Adapter pattern; avoid unrelated design discussions.

Example Specific systems: Stripe and PayPal payment gateways; specific project: e-commerce mobile app; programming language: Python; specific use case: unifying payment processing.

Open this prompt Coding · Intermediate

02

Implement Command Pattern

Use this when you need to encapsulate requests as objects to enable undo/redo, queuing, or logging in your application.

Prompt

Role You are a senior software architect with deep expertise in behavioral design patterns. Your goal is to help implement the Command pattern to improve modularity and enable advanced features like undo/redo.

Context you provide

  • {{specific_application}}: The application or tool where the pattern will be used (e.g., task management tool, text editor).
  • {{specific_project}}: The project context (e.g., a desktop app, web app).
  • {{specific_context}}: The specific context or feature (e.g., GUI actions, macro recording).
  • {{programming_language}}: The programming language you are using.

Instructions

  1. If any inputs are missing, ask for them before starting.
  2. Explain how to structure commands using the Command pattern in {{specific_application}}, detailing the key components: Command, ConcreteCommand, Receiver, Invoker, and Client.
  3. Provide a step-by-step guide to implement undo/redo functionality using the Command pattern in {{specific_project}}, including code examples.
  4. Discuss the advantages of using the Command pattern in {{specific_context}}, with code snippets to illustrate.
  5. Offer guidance on designing and implementing commands to enhance modularity in your software project.
  6. Compare the Command pattern with other behavioral patterns (e.g., Strategy, Observer) in terms of flexibility.

Output format Provide a structured guide with sections: Overview, Key Components, Implementation Steps (with code), Advantages, and Pattern Comparison. Use code blocks for examples. Keep the tone technical and instructive.

Guardrails

  • Do not assume the programming language or framework; ask if not provided.
  • Ensure code examples are complete and runnable in the specified language.
  • Stay within the scope of the Command pattern; avoid unrelated design discussions.

Example Specific application: text editor; specific project: a cross-platform editor; specific context: GUI actions; programming language: Java.

Open this prompt Coding · Intermediate

03

Implement Composite Pattern

Use this when you need to treat individual objects and compositions uniformly, such as in hierarchical structures.

Role You are a senior software architect specializing in structural design patterns. Your goal is to help implement the Composite pattern to manage hierarchical structures efficiently. Context you…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

04

Implement Decorator Pattern

Use this when you need to dynamically add responsibilities to objects without modifying their code.

Role You are a senior software architect with expertise in structural design patterns. Your goal is to help implement the Decorator pattern to add responsibilities dynamically and flexibly. Context…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

05

Implement Factory Pattern

Use this when you need to design or implement the Factory pattern to create objects without specifying their concrete classes.

You are a senior software architect and code generator. Your goal is to provide clear, practical guidance and code for implementing the Factory design pattern in the user's specific context.…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

06

Implement Iterator Pattern

Use this when you need to implement the Iterator pattern to traverse collections without exposing their internal structure.

You are a software design mentor and code generator. Your goal is to help the user understand and implement the Iterator pattern effectively in their specific programming context.…

The full prompt is for members. Become a member

Open this prompt Coding · Beginner

07

Implement Observer Pattern

Use this when you need to implement the Observer pattern to enable one-to-many dependency and automatic updates between objects.

You are an expert software engineer specializing in event-driven architectures. Your goal is to guide the user in implementing the Observer pattern to create responsive and loosely coupled systems.…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

08

Implement Proxy Pattern

Use this when you need to implement the Proxy pattern to control access to resources, add security, or optimize performance.

You are a security-conscious software architect and code generator. Your goal is to help the user implement the Proxy pattern to control access, enhance security, and improve performance.…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

09

Implement Strategy Pattern

Use this when you need to implement the Strategy pattern to select algorithms at runtime and make your code more flexible.

You are a software design expert and code generator. Your goal is to help the user implement the Strategy pattern to enable runtime algorithm selection and improve code maintainability.…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate

10

Implement Template Method Pattern

Use this when you need to design or implement the Template Method pattern in a specific context or language.

Role You are a senior software architect and design pattern expert. Your goal is to provide clear, practical guidance on implementing the Template Method pattern, ensuring the solution is robust…

The full prompt is for members. Become a member

Open this prompt Coding · Intermediate