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

I do beg your pardon, I misread what you wrote. I originally did have the registration page configured to use https, but my hosting company switched me to a different server without telling me and somehow this disabled my access to the shared certificate that I was using. When I have the time I will look into it again.

Why? I don’t have to follow the rules that YOU like, I follow the rules that I like. Of those rules which I choose to follow I prefer to use MY interpretation of those rules, not YOURS.

You’re the one saying:

“I don’t need to follow SRP so don’t tell me I should”
“I AM FOLLOWING SRP”

The first statement is redundant in this argument.

If you don’t like the default security you could always enable one of the RADIUS or LDAP options which would also give you access to Two Token Authentication.

I am following MY interpretation of SRP, not YOURS.

Your argument is still moot. You’re claiming to follow SRP and you’re not. Claiming “I don’t follow the rules” adds nothing to the discussion at all.

Please show me how this evaluates to true:

$SoC = 1;
$coupling = 2;
$cohesion = 4;

$SRP = $SoC + $coupling + $cohesion;

var_dump($SRP === $SoC);

Unless you can make that evaluate to true without making any of the values zero or negative (ie, meaningless or not actually included) or changing the definition of SRP so it doesn’t include all 3 concepts, or changing the operator to something other than equality (You are saying they are EXACTLY THE SAME), then your point is null and void.

if your definition of SRP is correct then you’ll be able to do the above. Otherwise your definition of SRP is wrong and your argument is lost.

Thank you. I do very much appreciate the effort.

While I don’t think I’ll be able to adopt the practices as you’ve explained them (I am required, and very much prefer, to have unit tests), I think there is valuable insight to be gained by looking at different software systems.

Let’s bring that answer here and look at what he says more closely.

Hey, Tony. A responsibility is another way of referring to a concern. The Single Responsibility Principle is a class-level design principle that pertains to restricting the number of responsibilities a given class has, so some of the same ideas are expressed here, but when I wrote this article (nearly 10 years ago now), I was seeking to cultivate a more general appreciation for the concept of separation of concerns across a broader architectural spectrum.

From what I can read, he agrees exactly with what we are trying to tell you the whole time.

A responsibility is another way of referring to a concern.

Absolutely. A single class can be a concern.

The Single Responsibility Principle is a class-level design principle that pertains to restricting the number of responsibilities a given class has

"class-level design principle. CLASS LEVEL!!! CLASS <-Tony! …to RESTRICT the NUMBER of RESPONSIBILITIES a given CLASS HAS! Restrict being the key word here. Restrict down to ONE responsibility or one reason to change.

In that sentence alone, he just blew your 7000 line monster class out of the water AND your premise that SoC and SRP are the same thing.

so some of the same ideas are expressed here

Absolutely. We’ve been saying the whole time the concepts are similar.

but when I wrote this article (nearly 10 years ago now), I was seeking to cultivate a more general appreciation for the concept of separation of concerns across a broader architectural spectrum.

Separation of Concerns across a broader architectural spectrum. SoC has to do with the architecture of the software!!! Totally agree and he is right.

How can you even read that and say he agrees with you? He doesn’t. He counters you in a very friendly way, and it blows totally by you.

You also lied to him, by saying we are arguing that SoC and SRP are totally different principles. That is NOT what we are saying or at least not what I am saying.

SoC and SRP are both about modularity, reusability and maintainability. They both work towards the same goals. They, however, do not necessarily apply to the same parts of a code base. That is the big difference you don’t want to understand and the huge difference that means your 7000 line class breaks SRP.

Scott

Say what? Absolutely time to change hosting companies there Tony!

Or, it is just a lame excuse on your part… hmmm…

I’ll give you the benefit of the doubt, as I can’t claim that no hosting company in the world would ever move customer data around without the customer knowing it and even change the security level of their site, by doing so.

Or can I? :confused:

Scott

“If you don’t like my bad security, you could always enable more of my bad security!”

1 Like

You obviously have never heard of using either a RADIUS server or an LDAP server where the usernames and passwords are maintained in an external server with its own software, its own rules and its own hashing algorithms. Such servers may also offer the ability to include Two Token Authentication (TTA), Two Factor Authentication (2FA) or One Time Passwords (OTP). I assume you know what these terms mean, or were you asleep when that class was taught?

Rubbish. The interpretation of Soc/SRP which I use are the ones provided by Robert C. Martin. In his articles http://blog.8thlight.com/uncle-bob/2014/05/01/Design-Damage.html he said this:

In his article http://blog.8thlight.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html he said this:

He says quite clearly in those articles that it would be good design to separate out the GUI logic, the business logic, and the database logic. This description matches the 3-Tier Architecture ( http://www.tonymarston.net/php-mysql/3-tier-architecture.html ) which is precisely what I have implemented in my framework ( http://www.tonymarston.net/php-mysql/infrastructure.html ).

If you don’t like Robert C. Martin’s interpretation of SRP - and remember that he actually invented the term - then I suggest that you take it up with him and stop wasting my time.

Again tony, you, using his definiton agreed that he said:

In PHP this is represented as:

$SoC = 1;
$coupling = 2;
$cohesion = 4;

$SRP = $SoC + $coupling + $cohesion;

var_dump($SRP === $SoC);

Unless you can make that evaluate to true without making any of the values zero or negative (ie, meaningless or not actually included) or changing the definition of SRP so it doesn’t include all 3 concepts, or changing the operator to something other than equality (You are saying they are EXACTLY THE SAME), then your point is null and void.

if your definition of SRP is correct then you’ll be able to do the above. Otherwise your definition of SRP is wrong and your argument is lost.

Since you have failed to do this each time I’ve asked you may as well give up.

You aren’t reading what he wrote. He says quite clearly in black and white that A RESPONSIBILITY IS ANOTHER WAY OF REFERRING TO A CONCERN.

To any sane person the statement “A is another way of saying B” it means “A is the same as B” and not “A is different from B”.

And you keep trying to convince the world that I am an idiot???

But we are talking about “Separation of Concerns” and “Single Responsibility Principle” these are terms that describe specific concepts:

“Wild goose chase”

and

“golden goose”

and

“What’s good for the goose is good for the gander”

and

“goose bumps”

Are terms that also describe concepts. They happen to all use the word “goose”… they don’t mean the concept they’re describing is the same. This argument is so nonsensical, please stop.

I have already told you more than once that my definition of SRP is the one created by Robert C. Martin, and I have implemented the 3-Tier Architecture just as he described. He invented the term SRP, not you so stop telling me that both my interpretation and implementation are wrong.

If you do not like Robert C. Martin’s definition of SRP then take it up with him and stop posting the same ridiculous arguments over and over again.

Indeed, and that definition you and he have described as SRP = SoC + Coupling + Cohesion:

In PHP this is represented as:

$SoC = 1;
$coupling = 2;
$cohesion = 4;

$SRP = $SoC + $coupling + $cohesion;

var_dump($SRP === $SoC);

Unless you can make that evaluate to true without making any of the values zero or negative (ie, meaningless or not actually included) or changing the definition of SRP so it doesn’t include all 3 concepts, or changing the operator to something other than equality (You are saying they are EXACTLY THE SAME), then your point is null and void.

if your definition of SRP is correct then you’ll be able to do the above. Otherwise your definition of SRP is wrong and your argument is lost.

Since you have failed to do this each time I’ve asked you may as well give up.

I agree. ALL your arguments are nonsensical, so why don’t YOU stop.

very funny. Answer the actual point…

But we are talking about “Separation of Concerns” and “Single Responsibility Principle” these are terms that describe specific concepts:

“Wild goose chase”

and

“golden goose”

and

“What’s good for the goose is good for the gander”

and
“goose bumps”

Are terms that also describe concepts. They happen to all use the word “goose”… that doesn’t mean the concept they’re describing is the same. This argument is so nonsensical, please stop.

Your argument is: “Two terms happen to include the same word therefore the concepts they describe are the same”. It makes zero sense.

Edit: You’re focussing on the wrong word. “Separation” and “Single” have very different meanings. It’s like saying “Separate cats” and “single cat” means exactly the same thing

See my answer in Would you agree this is the definition of a PHP framework? - #458 by tony_marston404