[Grok-dev] ApplicationInitializedEvent feedback

Martijn Faassen faassen at startifact.com
Fri Oct 9 08:54:24 EDT 2009


Souheil CHELFOUH wrote:
> Up to now, Grok doesn't handle anything in the life cycle of an application.
> It has handlers for the ObjectAddedEvent, nothing else.
> The whole creation process, currently, is left to grokui.admin, which
> triggers the ObjectCreatedEvent (the ObjectAddedEvent being fired by
> the container, while the application is persisted.)
> So yes, in my mind, the event was to be trigged by grokui.admin, as
> it's the only tool that handles the creation process. I'm not sure how
> we could implement the full process in zope itself. 

Yes, but I think part of application creation should be a responsibility 
moved from grokui.admin to Grok. Besides, Grok does do something about 
application creation already - that is, it can set things up for a site. 
That isn't *exactly* application creation related behavior, but it's 
very very close.

> From the top of my
> head, i could think of something doing :  def
> create_application(factory, container, name): ...
> For the documentation, yes, it will be done. i'm currently working on
> grokui.{admin,base} and I thought I'd wait to use it to be sure that
> there will be no other changes. I was also thinking of adding a
> IApplicationUpdatedEvent to deal with the update of utilities/indexes.

> The test I wrote for the init event could be used as doc, as it's
> quite explicit and detailed. I could copy that with minor changes to
> the dev doc.

What about going about it all the following way:

* you proceed with your work in grokui.base and grokui.admin and think 
about application creation

* then once you got something working in grokui.admin we give it a 
review and see whether we can move it into Grok itself (something along 
the lines of create_application indeed). This would then send the event, 
of course. :)

* once that's done, we can update the docs, saying what the official way 
is to create an app in Grok and what events are sent.

This way you're not slowed done with your work in grokui.admin, and we 
learn a bit about what application installation should look like.



More information about the Grok-dev mailing list