I have never claimed to be the king of PHP and I have never claimed that Radicore is the crown jewel of frameworks. All I have ever claimed is that my methods, which are different from yours, are still capable of producing functioning and marketable software, which means that YOUR methods are not the only methods with those capabilities. You do not like the idea that I can be different yet just as good.
No you havenât. You have claimed that:
- Inheritance does not produce coupling
- DI is EVIL
- Singletons donât produce tight coupling
- SRP is the same as SoC
- A 9000 line class follows SRP
This is the problem tony. You spread erroneous information and you pretend to be an authority.
âJust as goodâ is subjective. Unless youâre going to provide a metric youâre using to measure âgoodâ, itâs a pointless statement to make. The problem is, where you claim it is âjust as goodâ based on known metrics, like SRP, where your code is measurably worse⌠so you have to start trying to redefine SRP so that you can call your code âgoodâ.
No, we do NOT agree. SRP and SoC are NOT different concepts, they are the same concept being described using different words.
Only an unreasonable person would want me to explain what âreasonableâ meant.
The fire is applying Radiant heat and Induction, well, is Induction. The way it heats the vessel containing the water to bring it to a boil greatly differs. The outcome is boiling water, sure, but the two are entirely different in their approach. Which is exactly what everyone is trying to inform you with SRP versus SoC.
Tony you already said theyâre different here:
SRP == SoC + Coupling + Cohesion
Your words. Unless Coupling and Cohesion are meaningless (theyâre not), then SRP != SoC by your own definition.
To say that now SRP == SoC is like saying
Cake == Butter + Flour + Eggs
Therefore Cake == Butter
Itâs a weasel word ( https://en.wikipedia.org/wiki/Weasel_word ) so yes, it is important for you to explain what you mean. Such sweeping statements are meaningless: âOnly an insane person would claim not to be insaneâ⌠itâs tripe.
They are the same concept. Soc has been superseded by SRP as it now includes âcohesionâ and âcouplingâ. It is simply a better definition of the same concept.
Thatâs a ridiculous argument. It is simply not enough to create classes at random without considering cohesion and coupling. Good design requires the creation of classes which exhibit high cohesion and low coupling. SoC did not mention cohesion and coupling because those two terms did not exist when SoC was devised. SRP took care of that by combining those three terms into a single principle. Thus SRP is used INSTEAD OF SoC, not AS WELL AS.
Which means they are different by your own definition.
SRP == SoC + Coupling + Cohesion
Your words. Unless Coupling and Cohesion are meaningless (theyâre not), then SRP != SoC by your own definition.
To say that now SRP == SoC is like saying
Cake == Butter + Flour + Eggs
Therefore Cake == Butter because the cake has replaced the butter
If you bothered reading the other posts in this discussion you will se plenty of places where inferences are made all over the place such as âthe article switches between using concern and responsibility, but as it does not expressly say that they are the same I can only conclude that they are differentâ.
Which further proves my point. If SRP is used instead of SoC then they are different concepts otherwise nothing would have needed to be replaced and weâd still be using SoC.
By your own definition they are different, have different meanings and are applied in different ways.
SRP took care of that by combining those three terms into a single principle.
And if SoC and SRP were the same, this would not have been necessary in the first place because weâd already be using SRP, just calling it SoC.
Tony Marston: âI combined a banana an apple and a pear. Some people call it a fruit salad but I call it a bananaâ
Honestly tony the logic here is ridiculous: Combine 3 things together and itâs identical to one of the original things. This is some sort of homeopathic programming (and we all know how well that works)
It is not wrong, it is different. I am not stretching the definition, I am sticking within the bounds of what it actually says and not going beyond that. I am applying a reasonable and moderate interpretation. It is YOU who are trying to take it to extremes.
I disagree. Those are merely pieces of data which are passed to the View object at runtime in order to alter what the View object actually does. It is a rule which is set within the Model class but passed to the View object in order to be executed.
And if you need different information about the CSV e.g. maybe you want to pivot the table 90 degrees, you need another variable in the model. +1 reason to change.
These are display variables and belong in the view. Broken SRP, broken SoC. Well done.
I disagree. If you construct more classes to achieve a result then you have to instantiate and pass control to more objects to achieve that result. Coupling is directly related to number of method calls, so the more calls you have the more coupling you have.
I disagree. Methods in the same class are not coupled as there is no call from one object to another. Methods in the same class contribute to cohesion, not coupling.
According to your logic if I use the âAdd Customerâ transaction 100 times to add 100 different customers to my database then I have violated the DRY principle simply because I have used the same transaction 100 times. Do you now how ridiculous that sounds?
If itâs generating similar code 100 times then yes, it is violating DRY. Just because you automated the repetition and didnât have to type it out repeatedly doesnât mean there isnât repeated code, itâs just automatically generated repeated code.
You are seriously missing the point. This is a PHP group, so all the code samples should be for PHP as those who donât use the other language will not have the faintest idea what you are talking about⌠Itâs called common sense, dude.
If you donât have the faintest idea what a TextField and Button are you donât belong in any discussion about programming. I didnât supply any code⌠just class names. Pretend itâs PHP if you like.
I disagree with âis required to be written by handâ as although it is required, with the Radicore framework it is generated and not written by hand.
Incorrect. I simply refuse to waste time by disproving your analogy. Please stick to the ACTUAL topic and donât switch the discussion to something else entirely.