I tried both in team and solo dev. it was obviously beneficial for the team but it also didn't burden me as a solo dev. I just wanna note that I'm bothered by the splitting of migrations per module. Ig it is better to have them in the main app structure.
Cuando hablamos de un módulo o "bounded context" según algunos diseños entendemos que todo debe estar junto a no ser que se trate especificamente de un módulo o contexto compartido. Para resolver su dilema, le traigo un ejemplo: Si un dia quiere desacerse de su módulo, ¿Borrar la carpeta del módulo es suficiente? Si la respuesta es si, enhorabuena! ha construido correctamente su módulo. Si la respuesta es no, ha generado dependencia de su módulo fuera de su ambito, lo que sería una mala practica. Para el ejemplo anterior omitimos el registro del módulo en archivos como composer, aunque claro, las importaciones en la estructura general deberian ser dinamicas y adaptables como se muestra en este video. En resumen si, cada módulo debe tener sus propias migraciones.
The packages in app-modules are 'require'd by composer. Does that mean that composer pulls a copy of them into the root/vendor/ folder? So after code updates one would have to run composer install to see the changes?
@@LaravelDaily Ok, I looked it up. The app-modules/ dir is specified as a path repository, with the symlink option set to true (which seems to be the default). Composer then installs the packages by creating symlinks in vendor instead of copying. So updates in the code immediately reflect in the output.
I'm working on converting my app to module system based on the laracast course. I'm wondering if you have tips for mass refactoring. Php storm keeps freezing just moving a file or two at a time and sometimes refactors names spaces, and sometimes doesnt. But if i need to add a similar set of files or code to each module set but often only changing a word or two to account for the module or model name, is there a quick way to create a template to make this happen that you know of?
@LaravelDaily I'm thinking something similar to how you generate the code for your quick admin panel? Was that straight laravel, or did you use JS or something to make it happen. I mean it would kind of stink if there was some easy way to make a command that generates the boiler plate or whatever its called, stubs... and simply have a variable that inserts the model or module name. It's alright though.. I'll do it manually, just gonna take a while
Do you have a video on how to include a npm package as dependency while creating a composer package. So when the user installs that composer package that npm package also installs with it
Not really. submodule will help you manage the project mororepo VCS-wise. but this approach is the modular monolith approach and composer settings are just used for managing the module namespace.
@@medilies So the dependencies of a module will go in the main Laravel composer.json or in the composer.json of each module? I think it doesn't make sense to only use it for the namespace
The structure makes sense when working with a large team.
makes sense when working on a large project;
I did this in one of my projects two years back. Still works great.
Thanks for sharing the concept
I don't understand, how do they create Filament files in a different namespace?
I tried both in team and solo dev. it was obviously beneficial for the team but it also didn't burden me as a solo dev.
I just wanna note that I'm bothered by the splitting of migrations per module. Ig it is better to have them in the main app structure.
Yes, I want to split a large project into modules and I am feeling it's going to be a mess 🙃 still thinking from where to start 😵
@@tasneemwahdan3618 then start with paper and pencil. Write down what modules would come out, what will go to them
Cuando hablamos de un módulo o "bounded context" según algunos diseños entendemos que todo debe estar junto a no ser que se trate especificamente de un módulo o contexto compartido.
Para resolver su dilema, le traigo un ejemplo: Si un dia quiere desacerse de su módulo, ¿Borrar la carpeta del módulo es suficiente? Si la respuesta es si, enhorabuena! ha construido correctamente su módulo. Si la respuesta es no, ha generado dependencia de su módulo fuera de su ambito, lo que sería una mala practica.
Para el ejemplo anterior omitimos el registro del módulo en archivos como composer, aunque claro, las importaciones en la estructura general deberian ser dinamicas y adaptables como se muestra en este video.
En resumen si, cada módulo debe tener sus propias migraciones.
The packages in app-modules are 'require'd by composer. Does that mean that composer pulls a copy of them into the root/vendor/ folder? So after code updates one would have to run composer install to see the changes?
Good question, I don't think you need to run composer commands after changes. But you should try it out yourself.
@@LaravelDaily Ok, I looked it up. The app-modules/ dir is specified as a path repository, with the symlink option set to true (which seems to be the default). Composer then installs the packages by creating symlinks in vendor instead of copying. So updates in the code immediately reflect in the output.
this project use package 'internachi/modular' to modular system
Came to say this 🙂
I'm working on converting my app to module system based on the laracast course. I'm wondering if you have tips for mass refactoring. Php storm keeps freezing just moving a file or two at a time and sometimes refactors names spaces, and sometimes doesnt.
But if i need to add a similar set of files or code to each module set but often only changing a word or two to account for the module or model name, is there a quick way to create a template to make this happen that you know of?
No, I don't think there's a template for this
@LaravelDaily I'm thinking something similar to how you generate the code for your quick admin panel? Was that straight laravel, or did you use JS or something to make it happen.
I mean it would kind of stink if there was some easy way to make a command that generates the boiler plate or whatever its called, stubs... and simply have a variable that inserts the model or module name.
It's alright though.. I'll do it manually, just gonna take a while
Do you have a video on how to include a npm package as dependency while creating a composer package. So when the user installs that composer package that npm package also installs with it
You can take a look at Jetstream installation command, it's open source and does something similar to what you need.
I like it tbh
Nova components tried to do the same thing, where your teeny tiny overrides to their rigid structure are needed, new package
So basically a git submodules.
Not really. submodule will help you manage the project mororepo VCS-wise. but this approach is the modular monolith approach and composer settings are just used for managing the module namespace.
@@medilies So the dependencies of a module will go in the main Laravel composer.json or in the composer.json of each module? I think it doesn't make sense to only use it for the namespace
i would prefer to do mono repo instead of packages