[Grok-dev] Querying the CA for grok'ed Views

Uli Fouquet uli at gnufix.de
Mon Apr 20 07:53:18 EDT 2009


Hi there,

Martijn Faassen wrote:

> [as to the question in the subject]
> 
> Uli last summer was working towards something like this in the 
> introspector project, but this effort floundered.

'floundered' or 'resting' as Lennart says: yes, shame over me. I got
stuck with the project, when it came to integration with Plone, I think.
There is however basic API available. And it is not dead.

> I think it would be good to have APIs somewhere that allows you to get 
> all views for a particular object (categorized by skin, etc).
> 
> I know that we had prototype code for some of this, but I hope Uli 
> remembers better than I do where it might be. :)

This can basically be found in zope.introspector.

There is also a grokui.introspector in the repository that actually uses
data grabbed by zope.introspector. This includes things like: "get me
all views for a certain object", as Martijn already stated.

Hm, at least a bit work was done since then, which also included a
layout refactoring (leaning more towards grok.zope.org).

This cannot be found in the public repository yet, but I'll try to
update soon. As I was asked for that, a current screenshot can be found
here to proof that there is at least a bit progress:

  https://gf1.gnufix.de/~uli/grok/sneakpreview.png

The priority for this project for now is focused on functionality, not
design/layout. So if you think this layout is ugly and disgusting and
all that, then you can tell, but I will most probably not react for
now :)

Some more about the API:

grokui.introspector currently only displays data grabbed by
zope.introspector, which is packed in UI-suitable pieces by
zope.introspectorui. The latter is also used by plone.introspectorui,
which makes it difficult to do more than basal changes on both,
zope.introspector and zope.introspectorui. It's not impossible, but a
sensible task.

The data digged by zope.introspector includes: 

* registries (what utilities, adapters, handlers, interfaces, and 
  subscription adapters are available globally?), 

* objects (general infos on objects like: name, egg, file, type; also 
  specialized infos like contained text files, if the object is a 
  package, etc.), 

* code (infos about classes, modules, packages, functions and the like 
  including things like accompanied text files etc.),

* views (which views are available for a certain object).

* searching (currently limited to the registries)

I'm afraid, this is currently a pure developer thing: end users, please
don't make yourself unhappy by downloading and installing this stuff!

OTOH, if you like confusing hardcore stuff: I am pretty sure one can
improve the whole chain (zope.introspector...grokui.introspector) and if
someone would like to collaborate on that, this would of course be
highly appreciated! Maybe we should just get rid of the
zope.introspectorui 'middle-layer' to start with.

Another grok-specific task would be to get usable infos about grokked
things.


Best regards,

-- 
Uli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20090420/628b2082/attachment-0001.bin 


More information about the Grok-dev mailing list