From the course: PHP: Design Patterns
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Exploring a use case for the Action-Domain-Response pattern - PHP Tutorial
From the course: PHP: Design Patterns
Exploring a use case for the Action-Domain-Response pattern
- This before example should look familiar if you've already watched the MVC videos. This is a basic, traditional MVC. We have views which handle the HTML. We have models which keep all the model data. And we have controllers which tie them all together. Check out the MVC video if you need a deeper understanding of this code or how it's structured. In the after is where things get quite a bit more interesting and complicated. So we're going to step through this piece by piece. First we have the views, which are unchanged, but have moved to a directory called templates to clearly identify what they are. Next, the models that we have before are also unchanged, but have moved to a directory called domains. None of our business logic has changed. The first big change are the actions. Previously, controllers had a different method for each operation. With actions, we have a separate class for each operation. I mean that quite literally. If you have a domain called project, you'll have a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introducing the Action-Domain-Response pattern1m 43s
-
(Locked)
Exploring a use case for the Action-Domain-Response pattern1m 34s
-
(Locked)
The Action-Domain-Response pattern in action1m 11s
-
(Locked)
Challenge: Apply the Action-Domain-Response pattern48s
-
(Locked)
Solution: Apply the Action-Domain-Response pattern2m
-
(Locked)
-
-
-
-
-