One of the chief goals of the Aura project is the concept that the packages are independent of one another. I can use the CLI package without being required to use the DI package or the SQL package. This is a huge advantage of Aura over its competitors (like Zend). However, it leads to some code duplication that is best avoided.
For example, we have Aura.Session, but we also have Aura.Auth which handles sessions on its own. Aura.Session is incompatible with Aura.Auth.
We have Aura.Filter, and we also have Aura.Input. Both will filter/validate content, and both do some of the same things, but they are incompatible with one another.
It seems to me that there are ways we can improve upon this. One of the ways would be to create a library containing nothing but interfaces for common behaviors (like sessions, database handling, filters, etc.)
This would not violate the principle of decoupled packages, because a library of interfaces doesn't actually do anything. It simply defines the rules by which certain operations are performed. Then, a person using the Aura.Filter package can swap the filters in Aura.Input, or someone using the Aura.Auth package can use their existing session configuration.
Thoughts?
For example, we have Aura.Session, but we also have Aura.Auth which handles sessions on its own. Aura.Session is incompatible with Aura.Auth.We have Aura.Filter, and we also have Aura.Input. Both will filter/validate content, and both do some of the same things, but they are incompatible with one another.
It seems to me that there are ways we can improve upon this. One of the ways would be to create a library containing nothing but interfaces for common behaviors (like sessions, database handling, filters, etc.)
This would not violate the principle of decoupled packages, because a library of interfaces doesn't actually do anything. It simply defines the rules by which certain operations are performed. Then, a person using the Aura.Filter package can swap the filters in Aura.Input, or someone using the Aura.Auth package can use their existing session configuration.
Thoughts?
--
You received this message because you are subscribed to the Google Groups "The Aura Project for PHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to auraphp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
*If* (a big "If") we were to do this, I would opt for one interface package per set of functionality. Aura.Session_Interfaces, Aura.Filter_Interfaces, etc. (Obviously, changes in one would require mirrored changes in the other.)
*If* (a big "If") we were to do this, I would opt for one interface package per set of functionality. Aura.Session_Interfaces, Aura.Filter_Interfaces, etc. (Obviously, changes in one would require mirrored changes in the other.)
*If* (a big "If") we were to do this, I would opt for one interface package per set of functionality. Aura.Session_Interfaces, Aura.Filter_Interfaces, etc. (Obviously, changes in one would require mirrored changes in the other.)