Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7428745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:51:14+00:00 2026-05-29T08:51:14+00:00

In my company, we have a project built upon this pattern. I would like

  • 0

In my company, we have a project built upon this pattern. I would like to know if this is an existing and acknowledged design pattern, a combination various patterns or just a convenient coding solution to a problem.

interface IService <TRequest, TResponse>
    where TRequest : IRequest, TResponse : IResponse
{
     TResponse ProcessRequest(TRequest request);
}

public class ConcreteService : IService<ConcreteRequest, ConcreteResponse>
{
    public ConcreteResponse ProcessRequest(ConcreteRequest request)
    {
        // Do some stuff to create the ConcreteResponse object
    }
}

And then in a web service action:

[WebMethod]
public ConcreteResponse SomeService(ConcreteRequest request)
{
    // Do some validations...

    // And then...
    var service = new ConcreteService();
    return service.ProcessRequest(request);
}

Note: I have seen other real world projects following a similar approach.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:51:15+00:00Added an answer on May 29, 2026 at 8:51 am

    Yes – it is very close to the Request-Response pattern and it is quite common in SOA applications, or in scenarios where you present a public interface to external callers.

    The main advantage to this pattern is that it is highly version tolerant.

    Normally, if I want to add a new argument to an existing method on an interface, it breaks the compatibility of that interface – because the signature of the method has changed. Clients compiled against one version, cannot call another – even if the new field is optional, or if an old field has been obsoleted and can be ignored.

    Using this apporach, the signature of the method (ProcessRequest in your example) itself stays the same, but the request type (ConcreteRequest in your example) now has an additional property on it. Generally speaking most serialization/deserialization is tolerant of this (or can be configured to be tolerant of this); if the property appears in the data but not on the type it is being deserialized to, it will be ignored. Conversley if the property doesn’t appear in the data, but does on the instance then the instance will just have a default value (null, zero or whatever).

    So I can add/remove parameters from the method in a way that I wouldn’t be able to do if I had a normal method with a list of arguments. As you extend and evolve a public interface, this can become a very powerful tool.

    Having said all of that – it is only useful if you need it. I’ve seen it used in scenarios where this brings no benefit too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built an MSI that I would like to deploy, and update frequently.
I have a project that was built for company X. Then they decided to
I have an old project at our company that uses shell scripting a lot.
I have 4 models in my project. Which are : class Company(Group): address_1 =
So I have to send a java project to someone outside our company who
I am a student developer and I have built several installers for the company
my company has recently upgraded from VS2005 to VS2010. We have a huge project
I have been recently overhauling a website I built for the company I work
I have an internal enterprise application I've developed for my company built on .Net
I have a project which is built for multiple OSes(Linux and Windows for now,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.