Welcome Guest, Not a member yet? Register   Sign In
Path organization

Hello everyone!
I know and understand that the organization of folders is by convention, but I would like a technical explanation of which scenario to use according to the organization that I show below:

About CI4..., does it make sense to create a folder for each system, even if it is a distributed system for different areas of the company, but which can request common calls?

For example:
Scenario 1:
          | -- system1/app/[controllers, Model, Views]
          | -- system2/app/[controllers, Model, Views]
          | -- system3/app/[controllers, Model, Views]

Scenario 2:
        | -- general_system/app/
               | -- controllers/
                       | -- system1.php
                       | -- system2.php
                       | -- system3.php
               | -- Views/
                       | -- system1.php
                       | -- system2.php
                       | -- system3.php

What would be the best practice, scenario 1 or scenario 2?

Thank you all, see you later.

What do you mean by "can request common calls"?

Scenario 2 seems unrealistic.
One system has only one controller?

(This post was last modified: 01-25-2022, 11:17 AM by fagnerdin. Edit Reason: different method to show my example and word correction )

I wanna mean what's is the best way, scenario 1 or 2?

Make different systems in a same controller/view/model path OR I need to use different path of Codeigniter Framework for each system?

Let's say that system will have salles users and financial account users... a both of users will use a function to know "how much money client expend in that mounth"...

I have to make a path of complete condeigniter to put both system or one condeigniter path for each system?

Scenario 1
   | -- my_system/App/[both systems]

Scenario 2
   | -- my_system_financial/App/[System 1]
   | -- my_system_salles/App/[System 2]

[quote pid="393232" dateline="1642922824"]
"One system has only one controller?"

No, they will not use the same controller, but, in a most of time, they will use same functions and requests (model database).
And they will also use the same page template.

I not wanna make the same function to a both of systems.

It is a best practice to make the same function to each system?
Is there a possibility to avoid a redundancy in this case?

Theme © iAndrew 2016 - Forum software by © MyBB