[Grok-dev] the beginnings of megrok.feeds
Christian Theune
ct at gocept.com
Sun Jul 20 17:15:04 EDT 2008
On Sat, 2008-07-19 at 17:36 -0400, Brandon Craig Rhodes wrote:
> <SIDE QUESTION>
> Why does the "ViewGrokker" in Grok's "meta.py" call "provideAdapter",
> which I think is a global registration command, when registering a
> View? Shouldn't it instead register the view as a local adapter inside
> of its particular Grok site? Imagine that I have a Python module that
> provides "Foo" objects, and I instantiate two different Grok apps in my
> database that both use "Foo" objects; to be concrete, imagine that
> "app1" defines a "/one" view on a "Foo" object and that "app2" defines
> a "/two" view. Since the grokker defines each view globally, then it
> seems that not only would these two desired URLs work:
>
> http://localhost:8080/app1/foo/one
> http://localhost:8080/app2/foo/two
>
> but also the two unwanted URLs:
>
> http://localhost:8080/app1/foo/two
> http://localhost:8080/app2/foo/one
>
> because the global registrations would make each application's views
> magically appear over in the other application?
> </SIDE QUESTION>
Only if your 'Foo' objects really refer to the same class objects.
Non-persistent configuration is a good thing if it works for you.
Maintaining component registration in the database can be a huge
drawback WRT to code restructuring/deprecation.
--
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080720/46ad8708/attachment-0001.bin
More information about the Grok-dev
mailing list