[Zope3-dev] Service (was: How to get Principals Roles? Owner-Role?)
Marcus J. Ertl
marcus.ertl@larp-welt.de
Fri, 20 Jun 2003 10:22:01 +0200
On Fri, 20 Jun 2003 07:21:56 +0300, Steve Alexander wrote:
Hi!
>> PS: I'm proud to have written my first local service! :o)
>Great! What does it do?
Nothing great! I was in need of some *good looking* unique ids for all
messages postet in my forum. My first thought was to use the object
hub, but it generates long and not that userfriendly ids. I want a as
short as possible, good looking id, because it#s exposed to user in
urls.
So I wrote a service, where a object may register for ids, and can ask
for them. At the time I just compose them from a prefix and a contiuos
incrementet number. To keep it shor, I decided to use hex-numbers! ;o)
For messages, the ids look like: msg1f or msgff or msg234.
That's all!
But on that, some questions:
Is it right, that I have to register the service type by::
<serviceType
id="LNGlobalNameService"
interface=".interfaces.ILNGlobalNameService.ILNGlobalNameService"
/>
(Strange name, 'LNGlobalNameService' for a *local* service!)
I didn't found that in the README.TXT in the services directory. (Looks
a little bit outdated!)
Bye
Marcus