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 6753083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:07:09+00:00 2026-05-26T13:07:09+00:00

I am brushing up on my design patterns at the moment and got a

  • 0

I am brushing up on my design patterns at the moment and got a little confused when I came across this tutorial:

http://www.asp.net/mvc/tutorials/iteration-4-make-the-application-loosely-coupled-cs

If you look at listing 7 onwards, the author says it is using the decorator pattern. However, is one of the main principles of this pattern to wrap objects and ADD responsibilities and behaviour?

I think it looks more like and adapter pattern as it is adapting the MVC specific ModelStateDictionary to work with a more flexible IValidationDictionary so that different implementations can be used with the service if WPF etc were used instead. There is new responsibility or behaviour added.

Do I have this correct or not? If I’m wrong can anyone please explain why?

Thanks

  • 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-26T13:07:09+00:00Added an answer on May 26, 2026 at 1:07 pm

    I agree with you, that looks to me like the Adapter Pattern, that is, the ModelStateDictionary is abstracted behind the interface IValidationDictionary (the adapter interface) using a concrete type (the adapter) such that the implementation can be changed later.

    The Decorator Pattern usually provides additional functionality via composition, exposing the same interface as the decorated type. This is usually done via sub-classing or through interface implementation.

    An example of a decorator would be:

    1. you have a repository class that fetches “objects” from the database
    2. you have a repository decorator class that can cache objects without needing to fetch them from the database each time. This decorator class provides the cache fetching and retrieving through composition by sub-classing the original repository class and overriding the Get() method to first check the cache for the item (and Save() would be overridden to also update the cache as well as the database).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been brushing up on my design patterns and came across a thought
I was brushing up (not homework)on some computation-theory and came accross this problem: How
I'm brushing up on my software testing theory and came across an interesting phenomenon
For brushing up my C, I'm writing some useful library code. When it came
just brushing up on some C for a class and I've run across a
I've been meaning to do a little bit of brushing up on my knowledge
Currently I'm brushing up on my Fortran95 knowledge (don't ask why)... I'm running in
I am brushing up again and I am getting an error: Cannot call member
I was brushing up on different tree traversal methods and ended up reading the
I'm brushing up on my Java so forgive me it doesn't make sense. I

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.