Registry and Service Locators

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Registry and Service Locators

Post 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. >.<
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post 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
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
Post Reply