Is CakePHP v4.x support 3-Tier architecture?

Dear Team,

We are using CakePHP v4.x on a LAMP environment and would like to implement as 3-tier architecture such as
a) Presentation Tier
b) Application Tier
c) Data Tier

So would you able to guide any reference or advice that, how to implement it.
For your information:
a) Data tier will be the CakePHP database
b) Application tier will be the CakePHP application
c) Not sure, what will be in the presentation tier?

Looking forward any lights on me, please

Thank you,
Ela

Don’t get stuck up on fancy naming paradigms. Your 3-tiers sounds very much like MVC:

  • Model (all the stuff under src/Model folder of your CakePHP app)
  • View (src/View. View layer uses the templates folder too)
  • Controller (src/Controller)

Bingo! Your CakePHP app is 3-tiered.

3 Likes

Model = Data
View = Presentation
Controller = Application

1 Like

Question?
In a three tier architecture, the presentation tier never communicates directly with the data tier; in a three-tier model all communication must pass through the application tier. Conceptually the three-tier architecture is linear. However, the MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model.

Thanks,
Ela

MVC isn’t always triangular.
In my app, it’s more similar to a 3-tier.

On my website, views never interact with my models directly (always passing through a controller or something similar to a controller).

Can you elaborate on what you mean by “the view gets updated directly from the model”?