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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:02:10+00:00 2026-05-13T16:02:10+00:00

I’m not sure if this is an appropriate question to ask, since it is

  • 0

I’m not sure if this is an appropriate question to ask, since it is pretty specific, but anyway…

In this application I’m working on, I have an extension system based on static events.
The whole idea is taken mostly from the (very cool) extension system created in BlogEngine.NET.

Essentially, on Application_Start, an extension instance is created which hooks to static events on classes in the application.
Take for example an extension that censors blacklisted words from, say, a forum message before displaying it to the page; When a ForumMessage.OnDisplaying event is triggered, the extension would take the ForumMessage sender object and replace blacklisted words with gibberish.

Example:

static class WordBlackListExtension {
    private static string[] _blacklist = new string[] { ... };
    static WordBlacklistExtension() { ForumMessage.OnDisplaying += DoWork; }
    private static void DoWork(object sender, EventArgs e) {
        // Do some blacklist filtering...
        ((ForumMessage)sender).Body = ...;
    }
}

However, since there is only one instance of each extension in the App Domain, it occurs to me this only works on a system where there is a single, system-wide configuration for each extension.
But what if I wanted per-forum or per-user control over those extensions, like in Google Labs? Per-forum blacklist, or per-user ability to enable/disable the extension?
I would have to pass additional information to the extension.

So here’s the part I can’t wrap my head around – Assuming I have a fairly complex object model (therefore doing something like ForumMessage.Forum.etc.Config is bad practice);

How would you recommend to pass that information to each extension?
Should each extension retrieve its own config? Maybe pass some kind of context object through the EventArgs?
Where can I determine which forum’s config to retrieve?

Can you think of a better design for this type of system?

Edit

Can anyone recommend on any reading material about plugin systems?
Anything specifically on web environments would be most appreciated.

  • 1 1 Answer
  • 1 View
  • 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-13T16:02:11+00:00Added an answer on May 13, 2026 at 4:02 pm

    If you want to keep with the current extension system design, I would go to implementing a custom EventArgs class specific to each of your events. In this manner you can pass along various configuration, or simply identification data.

    Your extension providers then can take action based on the passed information. For example, they could configure to only respond to specific forums, etc.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but

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.