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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:02:19+00:00 2026-05-15T20:02:19+00:00

I have a very tough problem for me to solve, and I thought and

  • 0

I have a very tough problem for me to solve, and I thought and searched alot and came down t one conclusion which I will mention down.
the problem is I have a client that wants to create a websites based on a Common functionality, so let us call it Modules, so what I thought is to use MVC Contrib Portable Areas, which are great ideas to plug Modules, but I have a big problem, let us say I created a Blog module which will be implemented in a new site he want, now some users have unique requirements like one of them needs to add Gallery of pictures to each article, or List of references in each article.
this would be easy in normal situation where you have one site to work on, so all what you have to do is

  • add a new gallery table with Foreign key to the Blog table.
  • regenerate Linq2SQl code and update the Model.
  • add new form elements to the Create, Edit, Delete Views .
  • add the logic in the controller.

but in my situation it is complicated and time cumbersome because of 2 reasons

  • if the new functionality is cool
    and client decide to implement it in
    all sites, then I have to repeat the
    work for each site.
  • if the functionality is unique it will create inconsistency for me in future

that is why as first step to solve the problem I used Portable Areas to create Addons for each Module, now this will definitely ease my work by dragging 1 DLL for each new Module or Addon, but I have a little problem here, which

  • because the new Module or Addin is a
    Dll, how can I create such a
    functionality in My Admin panel to
    install the new Addon or find any new
    added Module/Addon dragged new DLLS
    to the Main Application
  • What is best
    practice to create an installation
    procedure inside the Portable Area,
    like Update the DB, New Routes, etc..

Now to the biggest Problem which is specific to Module Addon 🙂
let us take back the Article Gallery Addon, if I follow the logic I have mentioned above by creating it as a Portable area, it would be easier to create a functionality in the Module Code to loop through all Installed Addons and list them in the CRUD Views, but because I isolated the Addon and don’t want to manually update the Main Module Code for the Reasons Above there will be no way for doing CRUD operations for the new Addons in Sync with the main module because there is no Foreign Key Relation, again because as I said above it may be Optional, so I thought of the following solution which I hope there would be a better one

First in Installation Process I will create a Table for the Gallery Addon, but instead of creating a foreign Key relation I will create a manual Foreign Key which will get populated by Generating a Unique ID in the Main Module Controller when I create record by using the following code then store it in ViewData and just pass it to the Addon Controller when I create the new Record,

private  string GenerateId()
 {
  long i = 1;
  foreach (byte b in Guid.NewGuid().ToByteArray())
  {
   i *= ((int)b + 1);
  }
  return string.Format("{0:x}", i - DateTime.Now.Ticks);
 }
ViewData["FK"] = GenerateId();

but here are my Concerns

  • Is this way feasible or just plain
    Stupid.
  • is this technique will
    generate a truly unique key.

I am extremely sorry if my question is lame, but this is the best place to ask and I think many people would want to have such a functionality and hope someone will answer me

  • 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-15T20:02:20+00:00Added an answer on May 15, 2026 at 8:02 pm

    I think it’s a great question. awhile ago I started working on a CMS project using MVC1, where I wanted to support plugins. I had it working so that the admin could drop a new plugin assembly into the bin folder, and next app start, it would scan all assemblies for IPlugin (or whatever) and load them. I embedded the partial views into the plugin assembly so it was all self contained. each plugin was given a unique identifier when it was placed on a page, and the plugin’s controller knew how to use that ID to query it’s own table (repository) for it’s data. the main application didn’t know anything about the plugin’s schema.

    the only difference here is that it sounds like you would have multiple websites running on the same database, and you need to differentiate which instances of the plugin you need for each website. I assume somewhere you’ve got a key that indicates which website it is, that could be used via foreign key to select only the plugins for that website for the page the user is on.

    I’m not sure if this is an answer, I’m sort of just thinking out loud. hopefully it’ll help the discussion a little.

    EDIT: To automatically load plugins, I used NInject’s ability to scan assemblies for IModules. My IPlugin inherits from Ninject.Modules.INinjectModule, and all plugins implement the IPlugin interface. Then on app startup, I have the following line:

    kernel.Load( "*.Plugin.dll" );
    

    where kernel is a Ninject.IKernel and that line will scan any assembly matching that file pattern, so I could drop in an assembly like Weather.Plugin.dll.

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

Sidebar

Related Questions

i have very serious problem if any tech expert can help...thank you in advance..
I have very strange problem while I am submitting a practice problem on codechef.
I have very simple window where I have 2 buttons - one for cancel,
I am dealing with a very peculiar problem at the moment: I have an
I have downloaded and added this very simple, one file, php web file explorer
EDIT: I have managed to solve the problem by using: +lorem ipsum +type:photo +lorem
Im very new to all coding including jquery. I though this would have been
I have very simple piece of code. The goal is when i input four-digit
I have very very big html page/data. I need to fetch data under h1
I have very simple OpenGL ES example similar to Hehe's example : http://nehe.gamedev.net/tutorial/ios_lesson_02__first_triangle/50001/ As

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.