Registry or a Service Locator?
What are they for, what makes them useful, and how do I use them?
I've searched all over but haven't been able any good answers.
Don't tear me apart. >.<
Registry and Service Locators
Moderator: General Moderators
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Registry: http://www.phppatterns.com/docs/design/ ... s=registry
Service Locator: viewtopic.php?t=51794&highlight=service+locator
just some references for you... I'm sure somebody else can explain these better than I could
You should pick up a book on php patterns. I just read this one and it's pretty well writtin imo: http://www.amazon.com/gp/product/159059 ... 3?n=283155
Service Locator: viewtopic.php?t=51794&highlight=service+locator
just some references for you... I'm sure somebody else can explain these better than I could
You should pick up a book on php patterns. I just read this one and it's pretty well writtin imo: http://www.amazon.com/gp/product/159059 ... 3?n=283155
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
I was going to ask my boss to buy me the books, but I didn't want to have to wait. I just bought them from sellers on amazon for dirt cheap. The corners are worn... definately not a problem worth paying $20 more to fix. 
EDIT: And actually... that is not THE BEST book I've ever written by any means. It could have been better in a number of ways, but it definately improved my knowledge of design patterns. It did not, however mention one thing about service locators or dependancy injection, but I believe at the time of writing, few people had even conceived these concepts for php. I'm not sure though.
EDIT: And actually... that is not THE BEST book I've ever written by any means. It could have been better in a number of ways, but it definately improved my knowledge of design patterns. It did not, however mention one thing about service locators or dependancy injection, but I believe at the time of writing, few people had even conceived these concepts for php. I'm not sure though.