Would you agree this is the definition of a PHP framework?

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.