laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

Module structure friendly for novice developers #1667

Open mauveine opened 5 years ago

mauveine commented 5 years ago

Hello community,

I think a suggestion for a Laravel upgrade could be a modular plug in and play situation.

The example I can provide is: modules in Magento 2. Any developer (novice or senior) can create and use it in multiple projects. I know that Laravel is a general framework, not forced in into any domain. But I think one of the great features of Laravel 5 is freedom so I think this could add value towards it.

The situation could include:

This is an example of what I'm thinking, but could be great if it is offered as a basic feature with Laravel installation.

Thank you.

svenluijten commented 5 years ago

What are you missing from the package you linked that could be resolved by baking this into core?

Eg.: Why not just keep using that package? 😄

Arkanius commented 5 years ago

I like this approach. I think that if Laravel was a bit more modular would be easier to plug "modules" in it. Something like this architecture.

Unfortunlly, it makes the development be a little harder for novice devs

imanghafoori1 commented 5 years ago

Currently a problem with modularity is tight coupling between eloquent models when defining relationships.

I have tried to describe the issue and present a remedy for that in : https://github.com/imanghafoori1/eloquent-relativity

And it seems to be working.

martinbean commented 5 years ago

@mauveine Laravel is modular. All those “service providers” in config/app.php? They’re bootstrapping “modules”.

If Laravel is to be made “easier” then moving towards a Magento-style structure is not the answer 😄