How can I avoid tight coupling when practically every decision-logic has to check lots of distributed state?
As the senior developer in our company, I am currently starting to move our commercial php-mysql e-commerce solution (which takes data from a specific ERP-system) from procedural spaghetti-code which uses globals for pretty much everything and has very little separation of concerns to OOP.
How can I avoid tight coupling when practically every decision-logic has to check lots of distributed state?
As the senior developer in our company, I am currently starting to move our commercial php-mysql e-commerce solution (which takes data from a specific ERP-system) from procedural spaghetti-code which uses globals for pretty much everything and has very little separation of concerns to OOP.
Sets of pair parameters
I have the following class, this class like many rely one parameters coming in as a pair.
Originally for convenience, I set them as params Object[] values
and check if there is an even number of them if (values % 2 == 0)
.
Are there any strong reasons to use DI for sub-classes that are known to be tightly coupled to their parent containers?
I have Product classes for Products A through Z. And each Product class has its own set of product-specific subclasses, which I’d say are tightly coupled to them, like so:
Low coupling when using sealed classes?
Typically, when trying to decouple classes I use Inversion of Control. Lately I’ve been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? They have multiple component classes that’re sealed and I quite often need to use them. I was about to inherit from it and give it an interface to operate through until I noticed it was sealed and impossible to do so.
Low coupling when using sealed classes?
Typically, when trying to decouple classes I use Inversion of Control. Lately I’ve been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? They have multiple component classes that’re sealed and I quite often need to use them. I was about to inherit from it and give it an interface to operate through until I noticed it was sealed and impossible to do so.
Low coupling when using sealed classes?
Typically, when trying to decouple classes I use Inversion of Control. Lately I’ve been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? They have multiple component classes that’re sealed and I quite often need to use them. I was about to inherit from it and give it an interface to operate through until I noticed it was sealed and impossible to do so.
Low coupling when using sealed classes?
Typically, when trying to decouple classes I use Inversion of Control. Lately I’ve been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? They have multiple component classes that’re sealed and I quite often need to use them. I was about to inherit from it and give it an interface to operate through until I noticed it was sealed and impossible to do so.
Low coupling when using sealed classes?
Typically, when trying to decouple classes I use Inversion of Control. Lately I’ve been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? They have multiple component classes that’re sealed and I quite often need to use them. I was about to inherit from it and give it an interface to operate through until I noticed it was sealed and impossible to do so.
Package Interfaces – Coupling & Re-Usability
Intent Packages should be designed to perform a single function well. Ideally this means that they should be highly modular and different packages should be able to be ‘plugged-in’ simply by ensuring that they share a common interface. However, I’m unsure how to do this without creating some kind of dependency between the packages or […]