Discussion  - 
Hi all, 

I am boning up on design patterns. And I was wondering to myself what design patterns does CakePHP adopt?

Turns out somebody asked the same question already.


I was hoping to get a more complete answer from the core team about this.

Hence I am posting it here.

Hopefully, any complete answer would benefit me and others who want to master CakePHP in all its glory.

Thank you.
James Watts's profile photoKimSia Sim's profile photo
Great question! Here are a few, maybe others could provide any that may be missing (or suggest better examples):

- Front Controller
- Singleton/Multiton (ClassRegistry)
- Utility (Set/Hash)
- Factory (config)
- Strategy (routing, ACL)
- Delegate (dispatch)
- Observer (events)
- Decorator (component, behavior)
- Adaptor (datasource)
- Template method (callbacks)
- ActiveRecord (model)
+James Watts Great! I bought the book, "HEAD First Design Patterns" 

I am going to match the pattern you mentioned here with the ones in the book and see if your examples make sense to me.
+KimSia Sim I would highly recommend the book "Design Patterns: Elements of Reusable Object-Oriented Software", written by a group of authors known as the gang of four.
+James Watts Added to my list of readings. The HEAD FIRST is easier on the eye for beginners like me.
Add a comment...