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

Also, since you love wikipedia so much, please answer the question I asked earlier and you ignored (As you do with uncomfortable questions unless I ask you 10 times):

If SoC and SRP are the same thing, why are there two different wikipedia pages for them?

And this question please:

What are you trying to achieve/prove by coming here and showing that you have a decided to redefine common programming concepts when everyone else in the world already agrees what they mean?

The MVC design pattern specifically mentions three components or objects, so it is reasonable to assume that each of those objects can be supplied from its own class. To say otherwise is to read something which isn’t there.

I disagree. A Controller is responsible for (or concerned with) all control logic. A View is responsible for (or concerned with) all view logic. A Model is responsible for (or concerned with) all domain or business logic.

It is therefore reasonable to assume that I can have a single class for each.

“concerned with” and “responsible for” mean exactly the same thing.

In a purely english sense perhaps, however they have been used to describe particular concepts in OOP. It’s like saying “Car and Automobile mean exactly the same thing” ignoring the fact that “car” can also be used in the context of trains. In which case, they are not the same thing at all. Nuance really isn’t your strong point.

As does every programmer in the universe.

Question: What is the difference between Theory and Practice.
Answer: In Theory there is no difference but in Practice there is.

In practice a theory is sometimes toned down so that it can be applied in a practical way. Theory may define “purity” but sometimes in the real world a working solution can be quicker and cheaper to build than a 100% pure solution. It is a question of balance, of trade-offs.

So you are the only person who can decide which articles have “authority” and which are worthless? Pull the other one, it’s got bells on!!

I have learned not to trust every opinion by every so-called “expert”, especially government experts. How many “expert opinions” have been completely reversed by a different opinion a few years later?

That is EXACTLY what I have implemented. Each of my Model classes is responsible for the business rules associated with a single database table. I have separate classes which deal with control logic, view logic and data access logic. You may have a different opinion, but that doesn’t mean that your opinion is the only one worth having.

Confirmation bias much?

[citation needed] I think!

Unlike you, most people build their code to fit the underlying concepts.

But again, that doesn’t mean you get to redefine the theoretical terms to fit your application. So far you’ve redefined encapsulation, SRP, SoC, coupling and “software component” in order to fit your needs and make the claim “My code follows the concepts!!”. Instead, you should build your code based on the concepts, not redefine the concepts to fit your code.

I am not deciding anything at all. Peer Reviewed Journals are authoratitive because they are published after having extensive scrutinization by experts in the field. Nothing gets into a journal before being heavily critiqued by people at the top of the field. Again, I suggest you go and look up what peer review is because you clearly don’t understand it.

Exactly. And this is a good thing: New data comes along to show that the old theory was wrong and we change treatments based upon the new evidence. At any time the evidence can change, of course but your approach is ignoring the evidence and sticking to what you already have even if a new, measurably better treatment has come out and then claiming “The old treatment is better!!!” or saying “I’m already using the new treatment!!” by redefining what others mean.

That is why I have a separate Controller for each transaction pattern, not a single all-in-one Controller that deals with every pattern

That is why I have a separate View for each output format, not a single all-in-one View that deals with every format.

That is why I have a separate Model for each database table, not a single all-in-one Model that deals with every table.

So you see, I DO have many small classes and not a few big ones.

Again with redefining terms. Redefining “small” is a big step even for you. In what world is 120 methods and 50 variables “small”? Keep in mind Robert C. Martin himself inferred that 70 methods is a “god class”.

Wikipedia on MVC makes no mentions of objects.

No, it actually isn’t. Only you reason that it is reasonable.


Then what do you call your Default_Table class? It looks like a really big one to me.


[quote=“TomB, post:176, topic:191138”]
What are you trying to achieve/prove by coming here and showing that you have a decided to redefine common programming concepts …[/quote]
I am not redefining these concepts, just giving a different interpretation. If they were not so badly written in the first place there would be no room for mis-interpretation.

That is a ridiculous claim to make! No-one agrees on anything, which is why the internet is full of conflicting opinions.

You still didn’t answer the question: What are you trying to achieve by coming here and arguing that everyone else in the world is wrong?

And again, you ignored my other question:

If SoC and SRP are the same thing why are there separate wikipedia pages for them?

It is literally only you who is arguing about the meaning. There is plenty of discussion about how the concepts can be best applied but you reshape the concept to claim your application fits it. Don’t you see why that’s backwards?

So these words have different meanings in a different context??? And you can change the meaning to whatever you like??? You remind me of a certain fictional character:

Many words have different meanings in different contexts. Murder can mean different things if it’s in relation to people or crows. Boot can mean different things depending if you’re talking about a car or a piece of footwear. Foil has a different meaning if you’re talking about the material or what you’re going to do to someone’s plan, etc, etc…

It’s nice to see it’s not just programming languages you struggle with.

Ironically “It means what I choose it to mean” sums up your stance incredibly well.

So I have to ask: do you have any qualifications at all or just 30 years experience? I’d expect someone who’d done so much as an undergraduate degree (even 30 years ago) to understand the difference between a primary, secondary and tertiary source, why primary sources are more authoritative than tertiary sources (like wikipedia) and a have a basic understanding of peer review.

And if you don’t have any qualifications what makes you think you know more than researchers at the top of the field or people doing PhD level research such as myself?

I never redefined any terms, I merely take one of the many existing opinions/interpretations of what a particular term means and apply that interpretation. The fact that some of these terms have so many interpretations - and in many cases contradictory interpretations - just proves that these terms, concepts or principles were so badly written in the first place.

I have NOT redefined what encapsulation means as I have closely followed many of the standard definitions which describe it as “The act of placing an entity’s data and the operations that perform on that data in the same class.”

I have NOT redefined what SRP and SoC mean as I have separated my code into the EXACT SAME three areas - GUI, business rules and database - that were described in TWO separate articles by Robert C. Martin.

I have NOT redefined “component” as the dictionary definition clearly states it as “constituent part”. In software these “constituent parts” could come under several different names - program, subprogram, subroutine, module, class, object.

I have NOT redefined “coupling” as my description at http://www.tonymarston.net/php-mysql/oop-for-heretics.html#coupling clearly uses https://en.wikipedia.org/wiki/Coupling_(computer_programming) as its source.

I repeat, I have implemented both the 3 Tier Architecture and the MVC design pattern, so far from being a monolithic piece of unmaintainable code I have created a proper modular system which is based on sound and proven architectural principles. I have been maintaining and enhancing this code for over 10 years, so it is far from being unmaintainable. Your only objection is that my implementation is different from yours, and you cannot understand how anything so different can be so successful. I have never said that my implementation is right and yours is wrong, I have merely said that my implementation is different. It is YOU who keeps saying “You’re not allowed to be different!!”

A “God” class is a class that tries to do everything. In other words it has GUI, business logic and database logic in a single class. That “monster” class of mine is an abstract class which contains all of the methods which may be used when a Controller calls a Model. It contains code which ONLY belongs in the Model as control logic, view logic and database logic is contained in totally separate modules.

If you look at http://www.tonymarston.net/php-mysql/your-code-is-crap.html#table1 you will see where I have documented the 42 methods which may be used in a single UPDATE operation, and you will not see any method which belongs in either a Controller, a View or a Data Access object.

Your theory that it must be a “God” class purely on the count of methods and lines of code is seriously flawed. You are jumping to a conclusion without examining the facts. The fact that many developers cannot envisage ever needing a class with that many methods simply shows a lack of vision and experience. I do not work on puny systems with limited flexibility, I work on enterprise applications which have to satisfy the varied needs of different large corporations. Have you ever worked on an enterprise application which has 300+ database tables, 450+ relationships and 2,500+ user transactions?

It does say “three interconnected parts”, and in OOP a “part” can be interpreted as a class or object.

There are millions of developers out there who assume that an implementation of the Model-View-Controller design pattern requires no more than 3 classes - one for the Model, one for the View, and one for the Controller - so it is not that unreasonable.

It is an abstract class which contains all the methods which may be used when a Controller calls a Model. The methods fall into one of the following categories

  1. Methods which allow it to be called by the layer above it (the Controller or the View)
  2. Methods which allow it to call the layer below it (the Data Access Object).
  3. Methods which sit between these two. Many of these are “customisable” methods which are empty, but could be filled with code in order to override the default behaviour.

Tae a look at http://www.tonymarston.net/php-mysql/your-code-is-crap.html#table1if you want a more detailed description.

Every one of those methods belongs in the Model and not in a Controller, View or Data Access Object, so to say that it is “too big” based on nothing more than a count just a joke. None of those methods belong anywhere else, so they are where they belong.

Where did I ever say that? I joined this discussion - which is about frameworks, by the way - by agreeing with the general definition to be found in https://en.wikipedia.org/wiki/Software_framework and explained how my own framework met the four characteristics, and it is YOU and others like you who repeatedly claim that my ideas are nonsense simply because you don’t like the way that I write code.

I have never said that I am right and everyone else is wrong, I have simply stated that my methods are different yet they still work. I am merely offering a different opinion but it is YOU who keeps saying that I am not allowed to be different.

It is NOT only me who has a different opinion. The internet is full of articles which express different opinions. Just because a few individuals group together and agree on a particular opinion or interpretation does not mean that the whole universe is then bound by that decision.

That’s a ridiculous argument. I am limiting myself to words in the English language which are now used in the world of software development. If the English dictionary states that “component” means “constituent part” then it is totally WRONG for you to say that in software development “component” does NOT mean “constituent part”.

People with academic qualifications who work in an academic environment can rarely compete with practical people with experience in a commercial environment. Theories are useless unless they have practical applications in the real world.