Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about packages vs modules #658

Closed
kamov opened this issue Nov 5, 2018 · 10 comments
Closed

Question about packages vs modules #658

kamov opened this issue Nov 5, 2018 · 10 comments

Comments

@kamov
Copy link

@kamov kamov commented Nov 5, 2018

I would like to know which are benefit using this modules instead of a packages that laravel already offer?

Thanks

@nWidart

This comment has been minimized.

@nWidart nWidart closed this Nov 5, 2018
@kamov

This comment has been minimized.

Copy link
Author

@kamov kamov commented Nov 5, 2018

This article explain why is good to have a module based architecture.

But I know the benefits.

My question is why not just use "packages" ?

I am using laravel packages right now, and I am not sure why switch to modules that this package offer.

Seem the same thing in the end.

@kamov

This comment has been minimized.

Copy link
Author

@kamov kamov commented Nov 5, 2018

@kamov

This comment has been minimized.

Copy link
Author

@kamov kamov commented Dec 16, 2018

@nWidart I play now with your modules last weeks, but I really don't see difference with package. I mean that I could archive the same with package. No? Which more features I get with modules that is not available with packages?

@laharshah

This comment has been minimized.

Copy link

@laharshah laharshah commented Nov 15, 2019

I have the same question, what is the benefit of using modules over the standard packages - https://laravel.com/docs/6.x/packages ?

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Nov 16, 2019

If you don't see the benefit, packages are good for you.

@bernhardh

This comment has been minimized.

Copy link

@bernhardh bernhardh commented Jan 13, 2020

I am a big fan of a modular architecture and currently playing around with laravel-modules.

But till now, the only benefit I see is great the command line tool for creating a module, compared to package creation by hand, but this could be also done for packages (for example https://github.com/Jeroen-G/laravel-packager). On the other hand, packages can be easier namespaced and placed in subdirectories or grouped in categories and are the "standard" of laravel supported by the team and most of the packages.

So @nWidart why do you prefere modules over packages or in which situations? Your Blogpost is, as @kamov said, just a good explanation why you should use modular structure at all, not why your package.

Don't get me wrong, you don't have to "sell" your package to me (or us), but I just want to understand the benefit.

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Jan 13, 2020

Personally I like to develop outside the vendor folder. 😛
Having my code under a proper namespace, outside of app just makes sense to me.

@bernhardh

This comment has been minimized.

Copy link

@bernhardh bernhardh commented Jan 13, 2020

Yes, you are right, but thats exactly what packages do as well. If you create your package you will place it at packages/YOUR_COMPANY_NAME/PACKAGE_NAME, which isn't the vendor folder. Thats btw exactly what for example laravel-packager does:

composer.json

        "caravel/grid": {
            "type": "path",
            "url": "/path/to/project/packages/CompanyName/PackageName"
        }

You can even name the main folder "modules" if you prefer that.

composer.json

        "caravel/grid": {
            "type": "path",
            "url": "/path/to/project/modules/CompanyName/PackageName"
        }

So I still don't get it.

@nWidart

This comment has been minimized.

Copy link
Owner

@nWidart nWidart commented Jan 13, 2020

The initial commit of larave-modules was 8th of feb 2014

your package is 10th of june 2015.

Imo that configuration doesn't look very good.

So maybe you should ask these questions there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.