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

But in that case the amount of code that the developer has to write in order to activate the framework should be very small. In article http://www.sitepoint.com/crud-create-read-update-delete-laravel-app/ you should see from the volume of code that the developer is expected to write is anything other than small.

Who are you to say which source on the internet can be classed as primary secondary, tertiary or hearsay? Who are you to say which sources should be followed and which should be ignored?

Like most intelligent people I will only follow those opinions which make the most sense, and nothing you say makes sense to me. You have a habit of employing extreme interpretations on almost everything, and once you have started you simply don’t know when to stop. You do not like any opinion except your own and you are incapable of discussing anything in a reasonable and intelligent manner. Everyone knows that it is impossible to have a sensible discussion with an extremist.

I don’t see that in the definition.

Again, I’m presenting the known definition and you’re inferring it’s a definition I made up. if you knew the difference between a primary and secondary source you’d know that encyclopedias are a tertiary source.

How about wikipedia itself?

Once again we find Mr. Marston arguing with the definitions of things when the original definition doesn’t fit his agenda or puts his argument on a very weak footing. It’s pitiful, tony, this tactic is worn out by now surely?

Resulting to personal attacks is the biggest indicator you’ve lost the debate. If you actually had an argument (you don’t and never did) you would be able to use primary sources to prove me wrong rather than having a hissy fit and calling me names.

Show me where I have given a word in a sentence a meaning that is other than that which is found in the dictionary? To any reasonable and intelligent person the terms “responsible for” and “concerned with” mean the same thing. This in turn means that SRP and SoC mean exactly the same thing.

I have already pointed you to several articles which use the terms “responsibility” and “concern” interchangeably, so it is obvious that they mean the same thing. Anyone who tries to say otherwise is merely being pedantic and is nit-picking over trivialities. Both of those principles talk about taking a monolithic piece of code and breaking it down into smaller units each of which has a single concern or responsibility. Robert C. Martin has said in more than one article that separating GUI logic from business logic from data access logic is “good” design, and that is precisely what I have done.

I disagree. Saying that a class breaks SRP simply by counting the number of methods is completely unscientific. Each of my Model classes is responsible for the business rules associated with a single database table. It does not contain any control logic any view logic, or any database logic, so it fits Robert C. Martin’s description to a tee.

Just because some people share this opinion does not make it a valid opinion that should automatically be accepted by everyone.

In the two articles https://en.wikipedia.org/wiki/Single_responsibility_principle and https://en.wikipedia.org/wiki/Separation_of_concerns there is no place where it says “this principle is different from the other”. They both talk about breaking monolithic software into a collection of modules or classes.

If SoC is different from SRP, then why does it not have its own place in SOLID (https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))?

How about this one https://r.je/mvc-tutorial-real-application-example.html

The fact that MVC could be implemented with more than one class does not mean that it should. Most developers use only three, and there is nothing wrong with that. Personally I use four as I prefer to have all database access in its own class, which means splitting the Model into two separate parts.

How about this one - http://tenera-it.be/blog/2012/02/code-readability-vs-socsrp/
Or this one by Robert C. Martin - http://blog.8thlight.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html
Or this one - http://aspiringcraftsman.com/2008/01/03/art-of-separation-of-concerns/

I think Tony had a bad day today. LOL! :grin:


It is implied. If you have to write vast amounts of code in order to pass control to the framework, then it is YOU who are in control and not the framework.

Oh tony, come on! Stop this nonsense, please. Context! “Car” and “Automobile” can be used interchangeably. Yet “Train Car” and “Automobile” are not the same. Shocking!

I point you again to:


Oh look, they both use the word “Thermodynamics” but they mean different things. The principles SRP and SoC could be called First Law of Concerns and Second Law of Concerns, the name they have been given is 100% irrelevant, it’s just a short hand way of describing the concept they use the same words but describe different concepts. I’m not sure why you struggle with this so much.

Bolded for emphasis:

The terms SRP and SoC are just labels for the concepts they describe. The fact they happen to use synonyms has no bearing on the concepts themselves.

This is your thought process here: Concept X has a name with a synonym for concept Y, therefore Concept X and Concept Y are the same thing.

We say “Big Bang Theory”. Big is a synonym for “Large”, That doesn’t mean Big Bang Theory and Large Hadron Collider mean the same thing despite them both using the words “big” and “large”. This is basically the exact argument you are making!

I know why Tony struggles with it so much. Because, if he didn’t and would agree that SoC and SRP are two different concepts, then it would mean he would have to agree his 9000 line class is actually breaking SRP.


If you are ‘Separating your Concerns’ into modules it doesn’t necessarily mean you are implementing ‘Single Responsibility Principle’. I could have a 100 modules all doing the same thing just called different names. Technically I have followed SoC (poorly) but not SRP. They are two different things although if you are following them correctly there should be an overlap.

1 Like

Each Model class IS as small as possible as it is only responsible for the business rules associated with a single database table. It does not contain any Controller logic, or View logic or Database logic so it does not contain any code which should be in a different object. In that respect the size is perfect - nether too big nor too small. To break it up into artificially smaller units would decrease cohesion, increase coupling and decrease readability. That would not be a good idea.

In article http://people.ucalgary.ca/~far/Lectures/SENG421/PDF/oocross.pdf (which YOU quoted as a reference in an earlier post) it clearly says the following in section A.4

This clearly states that when measuring software quality that any coupling brought about by inheritance is totally irrelevant and can be ignored.

I can only repeat what I said earlier - the coupling which exists when one object calls another is totally different from the so-called coupling which exists when one class inherits from another. When measuring software quality all inheritance coupling is irrelevant and can be ignored. Just because the word “coupling” is used in two different contexts does not prove that they mean the same thing.

The word “thermodynamics” has nothing to do with a discussion on “responsibility” and “concern”, so stop going off at a tangent. SRP and SoC are NOT different, so stop wasting your time in trying to convince me otherwise.

[quote=“TomB, post:219, topic:191138”]

I qualified that statement with that is universally accepted by all programmers. Just because one group produces a piece of paper with “best practices” as its title does not mean that everyone else immediately falls into line. Different groups have their own idea of what’s best for them.

That’s simply not true though is it. Nobody apart from you is arguing about the definitions of these terms.[/quote]
If you bothered reading what has been published on the internet you would see that for every opinion there are numerous differing opinions. There is no single opinion which is universally accepted as the only opinion which is allowed to exist (except in the minds of extremists like you) so I am exercising my God-given right and choosing my OWN opinion.

Who are YOU to say who is qualified to express an opinion and who is not? The fact that my opinion is different from yours does not automatically make it wrong.

Saying that I have broken SRP simply by counting the number of methods is unscientific and therefore unacceptable. Each Model class is responsible for the business rules associated with a single database table, so it DOES follow SRP.

I totally disagree with everything he said in that article as it goes far beyond what he said in http://blog.8thlight.com/uncle-bob/2014/05/01/Design-Damage.html and http://blog.8thlight.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html in which he clearly states that separating the code which is responsible for GUI, business rules and database is all that is required to produce a “good” design. By applying SRP in an extreme way you will end up with a system which is comprised of classes with a single method and methods with a single line of code. Is that your idea of perfection??? I have seen this stupid idea put into practice, and it resulted in a library for sending emails which contained over 100 classes, most of which fitted the single-method-single-line-of-code pattern. Now THAT is what I would call an unmaintainable mess!

I prefer to go along with Tom DeMarco who, is his book Structured Analysis and System Specification said the following

It is a question of balance, of trade-offs. Not only do you have to know when to apply a principle, you also have to now when to stop. That is the difference between us - I am a moderate, so I know when to stop. You, on the other hand, are an extremist, which means that you will only stop when you can go no further, even if it means that you throw yourself off a cliff just like all the other lemmings.

Yes they do and yes I have.

The article which YOU quoted to reinforce this point clearly says that inheritance coupling should not be used as a measure of software quality.

I am not the one who is stretching an interpretation of these principles to their limits. If you bothered to read what I wrote you would clearly see that I am trying to follow moderate and reasonable interpretations of these principles which I take to a certain point and then stop. It is you (and others like you) who are attempting to apply these principles further and further with even more ridiculous and extreme interpretations.

My code follows the principles of OOP (the original principles, not the modern extremist ones). It is correctly layered according to what Robert C. Martin wrote on SRP/SoC. It has high levels of cohesion, low levels of coupling, high levels of code reuse and is readable and maintainable. It may not be “perfect” in your eyes, but to most people this would be “good enough”.

I do not redefine any of these programming principles, I simply use a moderate interpretation instead of an extremist one.

It follows my moderate interpretation of those programming principles. The fact that you choose to interpret those same principles in a more extreme fashion does not automatically mean that my interpretations are wrong and therefore invalid.

My abstract class, which is inherited by every Model class in my application, contains all the methods necessary to provide default behaviour for every Model class and allows it to communicate seamlessly with every Controller, View and Data Access Object. It also contains empty methods into which the developer can insert code to override the default behaviour. In that respect it is perfect. The fact that you cannot envisage ever having a class of that size simply means that you lack both vision and experience as you obviously have never worked on an enterprise application which had to deliver the same level of functionality and flexibility.

You are presenting it as THE definition and not one of the possible definitions. There is no single definition of OOP or any of the principles involved in OOP which has not been defined and redefined many times over by different people or different organisations. There is no single definition of anything in OOP which is universally accepted as the ONLY definition, so stop trying to tell me otherwise.

Post edited by cpradio

You are the one being nonsensical. I am discussing several articles which use the terms “responsibility” and “concern” to man the same thing, and you keep trying to derail the discussion by bring in irrelevant and unconnected words.

Rubbish! Both SRP and SoC talk about how to break a monolithic piece of code into more manageable modules, each with a single “concern” or “responsibility” so it that respect they mean EXACTLY the same thing as they produce EACTLY the same result.

I agree that “Big Bang Theory” and “Large Hadron Collider” do not mean the same thing. That is because “big” and “large” are adjectives whereas “concern” and “responsibility” DO mean the same thing because they are both nouns.

I am not struggling I am merely refusing to give in to a preposterous argument.

I will NEVER agree that these two principles are different for the simple reason that when applied to the same piece of monolithic code they will produce the same result.

I won’t agree to that because it doesn’t.

what the hell are you talking about? You said:

And I linked you to wikipedia’s page where it explains that it is a tertiary source.

Please stop taking me out of context.

Once again it’s Tony marson saying “The definitions are wrong!!!” without anything to back up his claims. Just stop.

More avoiding the question… the question you were asked was “is your Default_Table class perfect or ‘good enough’?” You didn’t answer it.

Tony stop throwing around the words moderate and exterimist, it doesn’t fit at all. You have stretched terms so far beyond their original definition they lose all meaning, this is in no way “moderate”.

So now it matters if it’s a noun or an adjective, ok by that logic “Play Ground” and “Dumping ground” are the same thing because they both use the same noun. Please stop this nonsense, it’s getting ridiculous.

Space craft/Hover craft, crash barrier/barrier reef, computer chip/fish & chips… the examples are endless.

Then you would be violating DRY you bad, bad programmer.

That’s true, that would be another rule though :smile:


So what? It is the primary source for most people as it comes at the top of the list in every search engine.

Then read what I wrote, especially the bit that says “in that respect it is perfect”.

Those two terms DO fit. My interpretation of those principles is moderate and reasonable as I go so far and then stop. I do not stretch those interpretations to mean something extra. It is YOU who are stretching the meanings in order to provide unreasonable, immoderate and extreme interpretations.

To a reasonable person SRP and SoC mean the same thing as they were designed to produce the same results. Only an extremist would say otherwise.

And so is your capacity for including irrelevant arguments. The two terms under discussion are “responsible for” and “concerned with” which every reasonable person would consider to mean the same thing.