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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:30:46+00:00 2026-06-13T12:30:46+00:00

The methodful roles contains the actual algorithm, but what should the Contexts executing method

  • 0

The methodful roles contains the actual algorithm, but what should the Contexts executing method do but execute one of those methods?

public class SomeContext
{
    // ... Constructor omitted ...

    public void Execute()
    {
        // Is this all?
        someRole.DoStuff(this.anotherRole, this.otherData);
    }
}

It seems very simple, so I’m thinking that the Context should be responsible of for example database lookups. Wouldn’t that simplify the methodful roles?

  • 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-06-13T12:30:47+00:00Added an answer on June 13, 2026 at 12:30 pm

    The main responsibility of a context is to bind roles to objects. Sometimes one or more of the “execute” methods will be complex but often they are not.
    They are there to capture the interaction between objects

    The binding of role to objects is atomic. It happens at one location in the context and for all roles at the same time.

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

Sidebar

Related Questions

Does TestNG have something like @Rule ? I am thinking specifically about: @Rule public
I have a class, let's say public class GeneralClass<T> { methodA() {...} methodB() {...}
I saw in WCF they have the [OperationContract(IsOneWay = true)] attribute. But WCF seems
I have classes with methods implemented as follow: void methodOne() { try { getHelper().doActionOne();
Here's a simple ajax call wrapped in a method. MyNS.GetStringList = function (successCallback, failedCallback)
org.junit.rules.MethodRule and org.junit.rules.TestWatchman have been deprecated. one interesting note was at: https://github.com/junit-team/junit/pull/519 , in
I took a look on questions q1 , q2 , q3 , but they
I'm working on an android app that has to send and receive information from
This is quite straight forward. I'm calling a web-service (.asmx, with session enabled) from
I am currently working with a lot of C# code-behinds which were not originally

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.