[Zope3-Users] Re: IContainer as IReadFile in WebDav

2007-02-19 Thread Alek Kowalczyk



 adapter for=.interfaces.plot.IPlot
  provides=zope.filerepresentation.interfaces.IReadFile
  factory=.csv.PlotAsCsvFile permission=zope.Public /
 
One small mistake (just here, in my real code it was OK).
Of course the adapter provides IReadFile, no IReadDirectory).
I still can't make this to get CSV files instead of folder on WebDAV.

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


[Zope3-Users] Menus

2007-02-19 Thread David Johnson
I am curious what methods people use to implements simple web site  
menus?  It seems to be this must be a common task.


So far I've done this as follows:
1. Create a skin
2. Create a content type Menu as Ordered Container
3. Create a content type MenuItem as contained by Menu
4. Add a Menu and fill it with MenuItems
4. Register Menu
5. Create a macro which returns the Menu using zapi.getUtility()
6. Use the macro in the skin, and display all the MenuItems.

--
David


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


Re: [Zope3-Users] Book?

2007-02-19 Thread David Johnson

Both books are good in their own.

On Feb 19, 2007, at 12:56 AM, Robert Hicks wrote:

Is Web Component Development with Zope 3 the best resource to  
get up to speed on using Zope3? I will be spending a little time  
getting up to speed on Python itself (with Chun's book) as well.


Robert

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



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


Re: [Zope3-Users] Menus

2007-02-19 Thread Jim Washington

David Johnson wrote:
I am curious what methods people use to implements simple web site 
menus?  It seems to be this must be a common task.


So far I've done this as follows:
1. Create a skin
2. Create a content type Menu as Ordered Container
3. Create a content type MenuItem as contained by Menu
4. Add a Menu and fill it with MenuItems
4. Register Menu
5. Create a macro which returns the Menu using zapi.getUtility()
6. Use the macro in the skin, and display all the MenuItems.


Hi, David

You can do it that way.

I've been successful with the browser:menu... directives in zcml.  The 
following, as part of my browser/configure.zcml file, actually creates 
an IBrowserMenu utility with a name of myMenu.  I have another set of 
menuItems for the same menu for different interfaces, so the same named 
menu has different items at different parts of the site.


I find it handy to have this configuration in the same file where I 
configure the names of the pages.


!-- name the menu --
  browser:menu
   id=myMenu
   title=Main menu
/
   
!-- MAIN MENU --

browser:menuItems
   menu=myMenu
   for=..interfaces.IMainInterface
   
   browser:menuItem
   title=Main Page
   action=/index.html
   permission=zope.Public
   /

   browser:menuItem
   title=About Us
   action=aboutus.html
   permission=zope.Public
  /
/browser:menuItems

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


Re: [Zope3-Users] Infrastructure Requirements?

2007-02-19 Thread Dan Buch
  Let's say that we take HA out of the equation 
 Well, okay, but I thought that was the point of this discussion? ;-)

Perhaps it will be in a few years ... I have to get the thing working
first and, as I'm sure it's obvious by now, I am an absolute noob.

  and that our supposed
  infrastructure already has storage and web covered.  
 How so? Are you storing all your data in a relational database? Is 
 someone else running a caching web proxy in front of you?

What we're trying to build is a Zope3 app that will help us track and
document various workflows throughout the company.  The plan is to have
most of the data stored in *other* systems (MSSQL, MySQL, PostgreSQL...
with significantly less (administrative stuff mostly) kept in the ZODB.

There will already be an Apache server in place on another machine
through which all Zope3 traffic will flow... (is that the right answer?)
H.A. and such wasn't really the road I was expecting to go down ... not
until later on, at least.  I'm sorry if my original inquiry seemed to
indicate this. 

  The app will be
  used by *maybe* 50 concurrent users.  
 What kind of usage are they each up to? Just reading? Lots of modifying 
 objects? Are they authenticated? If so, how? Again, where you store your 
 data makes a difference here...

I'll try to address this, but it's just speculation at this stage.  If
the app works and we decide to keep moving ahead with Zope3, the answer
could be radically different in as little as 6 months.  Here's my guess,
for 50 concurrent users:

security:
100% authenticated, all the time (TLS/SSL?)

activities:
90% reading
10% modifying objects

  I'm already pretty confident in
  the answer, but would I do okay with something like Config 1 shown
  here:  (please forgive the HUGE URL)
 Why the obsession with Sun? What's their brand getting you?

It took me long enough to convince my bosses that Ubuntu, Zope, Python,
everything FOSS, were safe alternatives to going 100% MS.  If my
company can purchase a Sun server, then we can purchase support from
Canonical: http://www.ubuntu.com/sun

Please let me know if I'm totally off-base with my logic here ;-)  The
IT infrastructure consultant (the company pres.'s son) would prefer to
buy everything through Dell, so if I'd be better off abandoning my
obsession with Sun, well... that's what I'll have to do :)


Thanks again for all the great feedback! :D
-- 
Dan Buch
SmartEd Services
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] Infrastructure Requirements?

2007-02-19 Thread Doyon, Jean-Francois
We use Dell servers exclusively and a combination of CentOS (free) and
Red Hat Enterprise (commerically supported).

I suppose it depends on whether you're really attached to Ubuntu.  We've
had a good experience with Red Hat's commercial offerings and support
ourselves.

I believe Dell  Red Hat play nice with each other on a certification
level also.  We haven't had any problems anyways.

You should be able to find many options to support your Linux
installations, regardless of the chosen hardware.

This page suggests the Canonical support isn't bound to Sun platforms:

http://www.ubuntu.com/support/paid

It just so happens Ubuntu is certified for Sun hardware, that's all.

All in all, it's understandable, if using Sun hardware with Ubuntu
appeases the powers that be, go ahead.  Another option is Dell + Red
Hat.  There are other combinations I'm sure that could give you the same
kind of formal confidence.

And they should all run Zope just fine too, of course! (Just to stay on
topic ...)

J.F. 

-Original Message-
From: Dan Buch [mailto:[EMAIL PROTECTED] 
Sent: February 19, 2007 2:10 PM
To: Chris Withers
Cc: zope3-users@zope.org; Doyon, Jean-Francois
Subject: Re: [Zope3-Users] Infrastructure Requirements?

  Let's say that we take HA out of the equation
 Well, okay, but I thought that was the point of this discussion? ;-)

Perhaps it will be in a few years ... I have to get the thing working
first and, as I'm sure it's obvious by now, I am an absolute noob.

  and that our supposed
  infrastructure already has storage and web covered.  
 How so? Are you storing all your data in a relational database? Is 
 someone else running a caching web proxy in front of you?

What we're trying to build is a Zope3 app that will help us track and
document various workflows throughout the company.  The plan is to have
most of the data stored in *other* systems (MSSQL, MySQL, PostgreSQL...
with significantly less (administrative stuff mostly) kept in the ZODB.

There will already be an Apache server in place on another machine
through which all Zope3 traffic will flow... (is that the right answer?)
H.A. and such wasn't really the road I was expecting to go down ... not
until later on, at least.  I'm sorry if my original inquiry seemed to
indicate this. 

  The app will be
  used by *maybe* 50 concurrent users.  
 What kind of usage are they each up to? Just reading? Lots of
modifying 
 objects? Are they authenticated? If so, how? Again, where you store
your 
 data makes a difference here...

I'll try to address this, but it's just speculation at this stage.  If
the app works and we decide to keep moving ahead with Zope3, the answer
could be radically different in as little as 6 months.  Here's my guess,
for 50 concurrent users:

security:
100% authenticated, all the time (TLS/SSL?)

activities:
90% reading
10% modifying objects

  I'm already pretty confident in
  the answer, but would I do okay with something like Config 1 shown
  here:  (please forgive the HUGE URL)
 Why the obsession with Sun? What's their brand getting you?

It took me long enough to convince my bosses that Ubuntu, Zope, Python,
everything FOSS, were safe alternatives to going 100% MS.  If my
company can purchase a Sun server, then we can purchase support from
Canonical: http://www.ubuntu.com/sun

Please let me know if I'm totally off-base with my logic here ;-)  The
IT infrastructure consultant (the company pres.'s son) would prefer to
buy everything through Dell, so if I'd be better off abandoning my
obsession with Sun, well... that's what I'll have to do :)


Thanks again for all the great feedback! :D
-- 
Dan Buch
SmartEd Services
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: IContainer as IReadFile in WebDav

2007-02-19 Thread Michael Kerrin
Hi Alek,

Which webdav component are you using. zope.app.dav or zope.webdav?

On Monday 19 February 2007 12:12, Alek Kowalczyk wrote:
  adapter for=.interfaces.plot.IPlot
   provides=zope.filerepresentation.interfaces.IReadFile
   factory=.csv.PlotAsCsvFile permission=zope.Public /

 One small mistake (just here, in my real code it was OK).
 Of course the adapter provides IReadFile, no IReadDirectory).
 I still can't make this to get CSV files instead of folder on WebDAV.
WebDAV doesn't use a IReadFile adapter to access files. WebDAV is just an 
extension to HTTP so you must define the default view for your IPlot object 
to return your CSV file.

In order to tell Excel (I am going to assume this works with Excel but I know 
it works with OpenOffice and other WebDAV clients but I haven't tried it with 
Excel) that your IPlot objects are files - you need to override the 
DAV:resourcetype property and specify a None value for this property. The 
only other WebDAV properties that I think you may also need to change are the 
DAV:getcontenttype and DAV:getcontentlength to their respective values for 
the CSV file.

With zope.webdav it is as easy as writing a multi adapter from (IPlot, 
IHTTPRequest) - zope.webdav.coreproperties.IDAVResourceType to override the 
DAV:resourcetype propertry and for DAV:getcontenttype you write an adapter 
from (IPlot, IHTTPrequest) - zope.webdav.coreproperties.IDAVGetcontenttype.

Hope this helps
Michael

-- 
Michael Kerrin

55 Fitzwilliam Sq.,
Dublin 2.

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