Base solution for your next web application
Open Closed

Questions regarding the Module System #1402


User avatar
0
andry3ag created

Hi I have a few questions that would like to be answered.

1 I am trying to create multiple modules and have a core application that is compose of these multiple modules. However, it seems that a module will only expose it's controllers to the core application. When a web controller tries to deliver a view template, it tries to find the template file in the core application filesystem rather than the module's. I figured we can have a build process that copies all the frontend files to the core application, but I would like to know if there's any better approach you would recommend.

If this is the only approach, do you have a build script we can have access to?

2 Do individual module need to include module zero and all the multi tenancy, permissions, authentication logic? Can all this be simply handled from the core application so that there is only a single source of truth?

If not, how do we handle it? The examples available online do not seem to address this issue.

3 How do we handle relationships that stranded over 2 or more plugins or between plugins and the core application? For example, user having 1 to many blog entity where blog is part of the Blog plugin.

  • From which end do we address the relationship? From the core application or from the module end? Or both?

2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    1 - Current module system is server side focused. For the client side, you can create a script/task to copy related view/script files. We have no such a code yet.

    2 - No, it's not needed. Your module can define additional permissions for example, but it's not required.

    3 - It's completely about your architectural decision and requirement. For example, you can think main application depends on Module1 and Module2, and you can add reference to Module1 and Module2 entities from your main app entities (including User). But, another approach can be extending User to add Blogs for only blog module (a BlogUser entity inherits from User entity). Since every module will have their own dbcontext, you can have different entities and different dbsets for each module.

  • User Avatar
    0
    mightyit created

    Hi

    Current module system is server side focused. For the client side, you can create a script/task to copy related view/script files. We have no such a code yet.

    Is this still the case with version 4.1?