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

Are you saying you only have three classes in your framework to build your MVC architecture? :flushed:


I moved 7 posts to a new topic: Suppressing notifications from a topic

And now you’re redefining the term “component”. From wikipedia ( https://en.wikipedia.org/wiki/Component-based_software_engineering )

Software components often take the form of objects (not classes) or collections of objects

Alternatively, this definition from Berkeley University ( http://www.eecs.berkeley.edu/newton/Classes/EE290sp99/lectures/ee290aSp994_1/tsld009.htm )

“A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties”

A interfaceS, dependencieS. A component is not a single class. Again, we come back to your misunderstanding of the difference between Separation of Concerns and Single Responsibility Principle.

Try https://en.wikipedia.org/wiki/Model–view–controller

So wikipedia is authoritative?

You might want to read this: https://en.wikipedia.org/wiki/Reliability_of_Wikipedia

Because Wikipedia can not be considered a reliable source, the use of Wikipedia is not accepted in many schools and universities in writing a formal paper, and some educational institutions have banned it as a primary source while others have limited its use to only a pointer to external sources.[59][62][63] The criticism of not being a reliable source, however, may not only apply to Wikipedia but to encyclopedias in general – some university lecturers are not impressed when students cite print-based encyclopedias in assigned work.[64]

In a 2004 interview with The Guardian, self-described information specialist and Internet consultant[52] Philip Bradley said that he would not use Wikipedia and was “not aware of a single librarian who would. The main problem is the lack of authority. With printed publications, the publishers have to ensure that their data are reliable, as their livelihood depends on it. But with something like this, all that goes out the window.”[53]

Let’s put it this way, if you submitted an academic piece even at undergraduate level with wikipedia as a reference your work would be marked down compared with using a real source (Academic Journal, book, conference proceedings, etc)



If different articles give different and sometimes contradictory definitions on the same subject, it is simply not possible to follow them all. I generally follow what is written in Wikipedia as it is supposed to be unbiased.

There’s no yes or no here. I repeat:

Please answer with a yes or no. Is a line on a wikipedia page with [citation needed] worth more than academic journals and examples from google, apple and microsoft?

Wikipeida is by no means “reliable”: https://en.wikipedia.org/wiki/Reliability_of_Wikipedia (And yes I see the irony in using wikipedia as a source to demonstrate that wikipedia is unreliable)

Please check its own disclaimer:

Which states:

Wikipedia cannot guarantee the validity of the information found here.


None of the contributors, sponsors, administrators or anyone else connected with Wikipedia in any way whatsoever can be responsible for the appearance of any inaccurate or libelous information or for your use of the information contained in or linked from these web pages.



This will be an interesting read for you @tony_marston404

Some highlights:

  1. You must never fully rely on any one source for important information.
  2. You especially can’t rely on something when you don’t even know who wrote it.
  3. The contributor with an agenda often prevails.
  4. It says so on Wikipedia.
    Wikipedia says, “We do not expect you to trust us.” It adds that it is “not a primary source” and that “because some articles may contain errors,” you should “not use Wikipedia to make critical decisions.”

I’m afraid that this description is far too vague to be of any use. It leaves too much to the imagination and is open to vast amounts of interpretation and thus mis-interpretation.

In your article http://blog.8thlight.com/uncle-bob/2014/05/01/Design-Damage.html you said the following:

In your article http://blog.8thlight.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html you said the following:

These both mention that keeping the code for GUI, business rules, and the database in separate modules would be good design, which is far more meaningful. This happens to match the description of the 3 Tier Architecture with its Presentation layer, Business layer and Data Access layer which is precisely what I have implemented. By combining it with the MVC design pattern I have split the Presentation layer into separate Controllers and Views.

If I have done the level of separation which is described in those articles and if I have implemented both the 3 Tier Architecture and MVC design patterns, why am I still accused of NOT following SRP?

Either it is because SRP has been inadequately defined, or because different people have their own different interpretations, and it is simply impossible to implement every different interpretation.

Really? If you read http://www.sitepoint.com/crud-create-read-update-delete-laravel-app/ you will see the HUGE amounts of code that a developer needs to write in order to create CRUD components with Laravel. You can do the same with Radicore without writing ANY code.

Excuse me but SRP and SoC most certainly ARE the same. In Uncle Bob’s article http://blog.8thlight.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html he says the following:

Here he is definitely saying that “separation of responsibilities” is EXACTLY the same as “separation of concerns”

Again, you’re drawing an erroneous conclusion from something which doesn’t back up your point at all. More out of context searching between the lines trying to retain the last little grip of a point.

Why should I need more than three? The MVC pattern only mentions three, so why should I need more than that?

Actually I do have more than three. I have split the Model into two so that business rules and database access are handled in separate classes. In this way my framework implements both the 3 Tier Architecture and the MVC design pattern.


Serious question: What is it you’re trying to achieve here?

So far you’ve demonstrated that you disagree with everyone else in the world about every single topic (Coupling, Encapsulation, SRP) and you use wikipeida as a source, which is a bad idea by itself. You don’t understand what peer review is, you don’t know how to find a primary source, you continually take people out of context and spin what they say… my question is: Why? Why are you trying to prove here? All you’ve proven so far is that you have very little understanding of fundamental programming concepts and the academic sphere where the terms you so casually abuse come from. You rarely name a primary source and when you do you take one line and spin it. Please clarify: What is it you’re trying to achieve by coming here and claiming you know more than Academics and programmers from Google, Microsoft and Apple?

edit: you might like this:

The answer sums up your thought process quite well.

So what? That doesn’t change the definition of a framework. You’re free to argue your approach is better, but it doesn’t change the meaning of words.

1 Like

Don’t be silly. The word “component” means “constituent part” and can also be referred to as “module”. A module can also be made of sub-modules. In software a high-level component can be a user transaction, and each user transactions may be comprised of other modules or components which in OOP would be objects or functions. These are simply different words for the same thing.

So yes, a component or “module” can be broken up into smaller parts. You’re contradicting what you said here:

If all logic is in the same component, it doesn’t necessarily mean the same class! (In fact it most certainly does not in most cases!). So yes, all GUI code should be in its own COMPONENT but that component can (And should if we follow SRP) be split into sub-components, or submodules as you just referred to them.

Again this goes back to your misuse of SRP/SoC. In this scenario a component fulfils a concern, that component may be made up of many classes. SRP is applied at a class level, not a component level. This has been explained to you by Scott and others on at least a dozen occasions.

Let’s put it this way: If SRP and SoC are the same thing, why do they have different wikipedia pages?

First of all, the MVC patterns/ architecture says nothing about classes in particular at all. This is obviously another one of your misunderstandings or twisting of facts to fit your prerogatives.

Secondly, you need more than three classes, because a view, or a controller or a model aren’t singular responsibilities, but rather main concerns within the application’s architecture. To me, overall, the MVC pattern is the main behavior an MVC framework offers. Each one of the 3 MVC concerns also have a good number of objects and tasks needed to achieve the goals of the framework and the application. These objects and tasks are the responsibilities.

It looks like you are mixing up the concerns of MVC and understanding them as single responsibilities. This is why your framework is missing out on class fidelity ( a term I just coined myself).

class fidelity - when an experienced programmer new to an application can relatively easily determine the single responsibilities of classes.


Nice. This echoes what Misko Hevery said here in relation to SRP: http://misko.hevery.com/code-reviewers-guide/flaw-class-does-too-much/

Class would be challenging for new team members to read and quickly “get it”

1 Like

No more or no less than any source that you can quote. The fact that there are thousands of different articles on the internet on any given subject, and these articles are filled with different and sometimes contradictory opinions is a constant source of confusion for everyone. The only option is to choose the articles that make the most sense to you. The fact that you and I have different opinions on so many subjects is a fact of life, so get used to it. Just because my opinion is different does not automatically make it wrong, just different.