Page 1 of 1

Registry and Service Locators

Posted: Wed Aug 09, 2006 12:52 am
by daedalus__
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. >.<

Posted: Wed Aug 09, 2006 1:02 am
by Luke
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

Posted: Wed Aug 09, 2006 1:03 am
by daedalus__
My boss was susposed to buy me books last week but never did. Hopefully next week they will be in my lap. :)

P.S. Thanks for the link to the registry thing that is making sense even through my lack of sleep. :D

Posted: Wed Aug 09, 2006 1:08 am
by Luke
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.