jeudi 29 septembre 2016

Really What is Module definition? [on hold]

I've worked with different php frameworks, and realized that most of them have something called module. but as you know implementation of module in each framework differs from others. currently I'm working on Yii2 and realized that it has one of best modules implementation I've ever seen.

but yet I don't know is there any obvious definition for module ?? now when you tell me module I think of

bunch of code which tries to be independent from other parts of software and it contains different types of codes . like views, controller actions , models , migrations , seeders , ...

but I faced multiple situations which one module has a small bit of dependency to other module. for example if you have user module it is highly possible that the other modules are dependent to this this module. this dependency could be any thing. maybe in your comment module your "comment model" users "user model"

or maybe in one of your modules you have a service or component (yii style) that you want call from other modules.

all of these are samples of dependency and I'm sure there are more of them.

but what I want to know from your experiences is what is the best way to create a modular software in a way which modules have the minimum amount of dependency to each other and modules are reusable and so software is really extendable?

I myself think in php traits really help to have more independent code in our modules.

Aucun commentaire:

Enregistrer un commentaire