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

  • Home
  • SEARCH
  • 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 272451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:18:59+00:00 2026-05-12T00:18:59+00:00

I am now trying to understand some code and I have found a pattern,

  • 0

I am now trying to understand some code and I have found a pattern, which seem a bit strange to me. There is a user’s control class with ‘EditorOpen’ event. At first, I thought this name is incorrect, because it does not end with ‘-ing’ or ‘-ed’, as MSDN suggests. However, later I have found out, that this event does not INFORM about something happening, but it is rather some kind of REQUEST to do the actual operation. This is the client code, which is expected to perform the “opening of the editor”!

I was a bit surprised to find out that this is actually some form of Template Method Design Pattern, in which there can be multiple actions connected with a single action placeholder.

I think it is quite interesting, but I am also afraid that using events in such cases may be highly misleading. Anyway, we are not talking about EVENTS here, but about REQUESTS. Hm… maybe it would be ok, if only the name of the event was ‘EditorOpeningRequest’ or ‘EditorOpeningRequested’. What do you think? How would you comment this during a code review?

  • 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-12T00:18:59+00:00Added an answer on May 12, 2026 at 12:18 am

    Unless there is a very good reason for you to have multiple objects handling a request for opening an editor, I would suggest that should be a delegate instead of an event. This restricts you to having one handler of the request, which in this case seems more logical.

    Further more I would change the name to OpenEditor as this is more descriptive as to what you’re going to expect. If you do stick with the event model, then OpenEditorRequested may be a better name.

    HTH.

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

Sidebar

Ask A Question

Stats

  • Questions 225k
  • Answers 225k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Development environments do not require you to restart the server… May 13, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer From Apple's docs.... In short it's a design pattern used… May 13, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer I'm assuming you're using Lightbox 2 Open your lightbox.css file… May 13, 2026 at 12:59 am

Related Questions

I'm getting an Undefined Instruction error while running an embedded system, no coprocessor, no
I am working with a third-party framework, and the code is pretty bad, and
How feasible is it( and some guidance ) to build a WPF ( Silverlight
I am trying to understand if I really have any case for using git/mercurial.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.