Re: [Zope3-Users] Building an admin interface

2007-07-16 Thread Joachim Schmitz

hi Florian,

perhaps you should take a look at grok http://grok.zope.org. Look there 
for grokstar, which is a blog with nearly no user-interface. During the 
recent grog-sprint at EuroPython in Vilnius, I started working to 
improve it a little bit. It will soon be checked in.



Florian Lindner schrieb:

Hello,
I have a rather fundamental problem.

Until now the editor of my bloggin software has added, modified and removed 
blog entries by logging in to the ZMI and use the filesystem like view there.


This gives me (as the developer) only very limited control about how it is 
done. For example: A newly created entry should be stored in the subfolder 
year/month/day/entry_id. I can modify the entry_id by using a NamesChooser 
adapter but I can't (AFAIK) modify the actual location.


Because of this I want to develop an admin interface. The application 
generally shoud work stand alone (eg. not integrated in Plone) but should act 
as a well behaving citizen in the Zope3 world. (make integration easy).


How is this done the best way?

- What skins to use?

- How should authentication be done?
Just rely on the authentication source being around and use it  with 
getUtility(IAuthentication)?


- How to design my ZPTs to make them fit in the skin/interface?

- What else to pay attention to?

Thanks for all tips!

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


--

Gruß Joachim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Building an admin interface

2007-07-16 Thread Florian Lindner
Hello,
I have a rather fundamental problem.

Until now the editor of my bloggin software has added, modified and removed 
blog entries by logging in to the ZMI and use the filesystem like view there.

This gives me (as the developer) only very limited control about how it is 
done. For example: A newly created entry should be stored in the subfolder 
year/month/day/entry_id. I can modify the entry_id by using a NamesChooser 
adapter but I can't (AFAIK) modify the actual location.

Because of this I want to develop an admin interface. The application 
generally shoud work stand alone (eg. not integrated in Plone) but should act 
as a well behaving citizen in the Zope3 world. (make integration easy).

How is this done the best way?

- What skins to use?

- How should authentication be done?
Just rely on the authentication source being around and use it  with 
getUtility(IAuthentication)?

- How to design my ZPTs to make them fit in the skin/interface?

- What else to pay attention to?

Thanks for all tips!

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Building an admin interface

2007-07-16 Thread Stephan Richter
On Monday 16 July 2007 12:29, Florian Lindner wrote:
 - What skins to use?

Don't use any of the shipped skins at all. You may want to start with 
z3c.layer.minimal or z3c.layer.pagelet (if you are using pagelets) to get 
some initial registrations like error pages, widgets, etc.

 - How should authentication be done?
 Just rely on the authentication source being around and use it  with
 getUtility(IAuthentication)?

That's good, though for custom projects I always create a custom site object 
and use some mechanism, like z3c.configurator, to add a configured 
authentication utility.

 - How to design my ZPTs to make them fit in the skin/interface?

That depends on the UI pattern you decide to use. There are several choices:

- Use macros to define O-wrap, bits and pieces and so on. This is the way the 
default skins are done.

- Use viewlets to do the entire UI.

- Use pagelets to do the entire UI.

For a simple, non-portal application, I would choose the last option.

 - What else to pay attention to?

Don't anticipate! And don't over-engineer the UI! Get something working that 
works for your specific project.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Building an admin interface

2007-07-16 Thread Benji York

Stephan Richter wrote:

- Use viewlets to do the entire UI.

- Use pagelets to do the entire UI.


This reminds me of something I've been curious about but haven't had 
time to research lately.  What are the differences between pagelets and 
viewlets and their various strengths/weaknesses.  An acceptable answer 
is read the docs and decide for yourself. wink

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Building an admin interface

2007-07-16 Thread Stephan Richter
On Monday 16 July 2007 15:58, Benji York wrote:
 This reminds me of something I've been curious about but haven't had
 time to research lately.  What are the differences between pagelets and
 viewlets and their various strengths/weaknesses.  An acceptable answer
 is read the docs and decide for yourself. wink

Viewlets-pure UI design is a great approach, if you have portal, where there 
is really never a main content area, since you can reuse viewlets accross 
many pages. So in this UI pattern, you would create a Contents viewlet 
manager, and register viewlets for this manager. Depending on which page you 
are looking at, viewlets are picked up and displayed. Unfortunately, for 
simple pages, this requires two directives: One to define the page and one to 
define its Contents viewlet. This cost is very acceptable to a portal site 
where those simple pages are rare, but are impractical for more traditional 
Web applications.

Also, any piece of dynamic code is a viewlet manager with viewlets or a simple 
content provider: left menu, right menu, header, CSS files, JS files, title, 
etc.

Pagelet-based UI design is pretty much the same pattern, except that it allows 
you to define a main content area. Here you define a layout template that is 
used to define the O-wrap (pretty much like standard_macros/page). A page is 
then registered as a pagelet, which defines a second template that defines 
the content area of the page. As for macros, the advantage here is that you 
only need one generic UI layout directive plus one other directive per page. 
But something that is much nicer in pagelets is that you do not have to 
include the macro from within the pagelet, but that the layout is driving 
everything. Also, it is much simpler to register an alternative layout 
template for a particular view or context.


All this can be combined with a simpler implementation of macros, provided by 
z3c.macro, which only provides a flat namespace for all macros. Defining a 
macro is a matter of doing something like this:

z3c:macro
template=mytemplate.pt
name=macroname /

(Optionally, you can specify the context, view and layer for which the macro 
is available.)

It can be used like this:

div metal:use-macro=macro:macroname /

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Building an admin interface

2007-07-16 Thread Benji York
Thanks for the info.  I really need to dig into both viewlets and 
pagelets the next time I do a new UI from scratch.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Does Killing The Zope Server Kill Zope?

2007-07-16 Thread Stephan Richter
On Thursday 15 March 2007 17:21, Mark, Jonathan (Integic) wrote:
 Zope 3.3 was running on port 8080 on Linux. Instead of using webserver.py
 stop to kill the server I ran netstat -nlp. It showed one pid using port
 8080.

 Then I killed that pid. Zope 3.3 continued to serve up a corrupted page for
 many minutes afterwards. It eventually died.

 Did killing the PID that was using port 8080 kill Zope 3 entirely?

Yes, it should. I kill by PID all the time. Maybe you had something serving 
from the Apache cache?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users