C
C#•8mo ago
V0FBU1VM

Project structure

I previously had my project structured like this the problem is that, as the project grows, it getting a bit hard to maintain it. I'm trying to rethink my approach. I want to create a classlibrary project for each feature. For instance Quotifyr.Auth inside their, I want to have all my views, controllers etc related to authentication to live there. The only issue is that, since it's a classlibrary, objects such as Controller are not available? what should I do?
No description
11 Replies
V0FBU1VM
V0FBU1VMOP•8mo ago
No description
Omnissiah
Omnissiah•8mo ago
first you should probably learn about $vsa, then let's go on from there
V0FBU1VM
V0FBU1VMOP•8mo ago
@dont/index.php I'm already doing that, I'm combining mediator with features. My features live inside Modules. I don't think this approach is efficient when it comes to very large projects.
-- Quotifyr.Auth
-- Controller
-- Commands
-- CommandHandlers
-- Views
-- Quotifyr.Auth
-- Controller
-- Commands
-- CommandHandlers
-- Views
I want a new approach. I would like to separate the features into their own projects.
Pobiega
Pobiega•8mo ago
do exactly what you plan, but instead of a classlib per feature, just have it be a folder under Features tada, problem solved 🙂
V0FBU1VM
V0FBU1VMOP•8mo ago
Isn't there anyway I can seperate the features into seperate projects. I have already done some research. The problem is that, most of the packages that where used are no depricated.
Pobiega
Pobiega•8mo ago
you can, but it will cause issues like a really complicated dependecy graph once you start implementing cross-features things what if another feature needs to know about auth? and auth needs to know about that feature? oops, literally impossible
V0FBU1VM
V0FBU1VMOP•8mo ago
References?
Pobiega
Pobiega•8mo ago
so then you start making cross-functional libs, for your functional libs... :thisisfine: you cant have bidirectional references
V0FBU1VM
V0FBU1VMOP•8mo ago
Well well that sucks, It would have been really nice. If it was possible.
Pobiega
Pobiega•8mo ago
I dont really see the benefit over just having one large project with the same structure
Want results from more Discord servers?
Add your server