Re: [Zope3-Users] Visionaire! (All your problems, solved)

2006-03-03 Thread Max M

Jeff Shell wrote:


Yes it does. And I hate it. At Bottlerocket, we're a very small
company. We look at Plone and go alright, how do we make it do less?
how do we turn this thing off, and this thing off, and this thing off,
and this thing off? why is it so slow? and it still doesn't do the
page we need to do. Let's just write our own CMS.


*
Apparently many people disagree with you.

Google hits:
**27,700,000* for **Plone
***23,600,000* for **Zope**
*14,800,000* for **Zope -Plone**


For small companies that needs a small subset of what Plone can do, 
Plone might be a bit big. But for consultants/developers like me it is 
*far* easier to use Plone, remove some features and add those that are 
missing.


A fully finished system, that end users can install and try out, is the 
biggest succes story of Zope. There *must* be a lesson in that somewhere.


That Plone is difficult does not reflect that a big integrated system is 
the wrong way to go! It only indicates that the Zope/CMF/Plone stack is 
too big. Which is exactly why Zope 3 was developed, and I can hardly 
wait until something like Plone is running directly on Zope 3.


Then we will both have a big hunking end user system and a clean 
development model.


I know that something like Plone isn't the best solution for everything. 
Eg creating a task based intranet is impractical. But its still the most 
succesfull approach so far.


Plone has become a very precise communication tool between programmers. 
If your product works in a straight Plone installation, it can be 
modified with known patterns by other developers.


If everything is fragmented we will loose this unification by example 
and setting up big systems will be a lot more difficult.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

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


Re: [Zope3-Users] PyWebOff

2006-03-03 Thread Tom Dossis

Shane Hathaway wrote:

Hello,

I've been assigned to present Zope in a local upcoming Python user group 
meeting.  As part of the assignment, I'm supposed to solve the PyWebOff 
challenge using Zope:


http://pyre.third-bit.com/pyweb/challenge.html

I'd like to do this using Zope 3.  However, I'm really struggling.  I 
feel like I must be using Zope 3 in a really dumb way, because the code 
so far is highly repetitive, completely dependent on Zope, and more XML 
than Python.  This is not going to go over well in the presentation.


Can anyone tell me how to do this better with Zope 3?  Maybe my Zope 2 
experience is preventing me from seeing something obvious.  I've 
attached the __init__.py and configure.zcml that I created in a package 
called challenge.



I agree, the __init__.py and configure.zcml are pretty dry reading.

I reckon you could start your PUG presentation from the end (so to 
speak) by presenting one (or more) doctests.


One you have your captive audience, then go the the start.

Take a Test-Driven-Development approach.
It's easy to disgest an application (and zope) in test case sizes.
And as each need arise, bring in the appropriate ZCML to showcase it value.

This may help distill the python, zope and zcml.

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


[Zope3-Users] ZODB - ways of storages?

2006-03-03 Thread Reinhold Strobl
Hi,

in the book Web component development with ZopeX3 by Philipp von Weitershausen
on page 72 I find the following statement:

The ZODB can store persistency data in many ways. The most common storage is
FileStorage which stores data in a file usally called Data.fs By using a
different storage backend, you can choose where and how you would like to store
persistent objects. ZODB even supports a network storage system calles ZEO

So I expect, ZODB is only a front-end for different ways of storage like file,
oracle db, isn't it? 
If yes, I would like not to change the code (of persistent class) to change to
another storage way, is that correct?

Thanks a lot!

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


[Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread Joseph Method
Hi, I get this error

ForbiddenAttribute: ('add', zope.app.publisher.browser.viewmeta.+
object at 0x754d09ac)

when I try to add a Claim to a DebtManager (both are subclasses of
Folder) at http://localhost:8031/DebtManager/+/@@AddClaim.html

The addform looks like this:

browser:addform
  schema=debtman.interfaces.IClaim
  content_factory=debtman.debt.Claim
  label=Add Claim
  name=AddClaim.html
  fields=title description debtor creditor amount
  permission=zope.ManageContent
  /

and the content type declaration looks like:

  content class=.debt.DebtManager
require
permission=zope.ManageContent
interface=.interfaces.IDebtManager /
require
permission=zope.ManageContent
interface=.interfaces.IDebtManagerSchema /

require
permission=zope.ManageContent
set_schema=.interfaces.IDebtManagerSchema
/
require
permission=zope.ManageContent
attributes=add
/
require like_class=zope.app.folder.Folder /
  /content

The permission require for add is just an attempt to get rid of the
error. I've asked around on #zope3-dev, but no one knew.

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


[Zope3-Users] How do I start Zope?

2006-03-03 Thread mwebster



At this point I 
have:

  Upgraded to Python 
  2.4.2 and confirmed that it works by launching IDLE and seeing the correct 
  version number
  Run the installer 
  Zope-3.2.0.win32-py2.4.exe
The old 
documentantion shows various bits about setting a username and password for the 
administrator, etc, which I do not get. No surprises, this looks to be a 
major update to Zope from 2.x, which seems to be what all the manuals 
document.

I looked at the 
various README.txt files because the page where you download the installer says 
it is supposed to tell me how to do the installation. There are lots of 
README.txt files. I assumed this meant C:\Python24\zopeskel\README.txt, 
but that tells me nothing about running Zope.

The version I 
installed just to look at ages ago, 2.5 or something?, was easy to start and I 
did just that before looking for updates.


How do I start Zope 
so I can get to the Management screen or whatever and start doing some real 
work?




Michael WebsterCombiMatrix 
CorporationSoftware Department(425) 493-2266

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


Re: [Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread baiju m
On 3/4/06, Joseph Method [EMAIL PROTECTED] wrote:
 Hi, I get this error

 ForbiddenAttribute: ('add', zope.app.publisher.browser.viewmeta.+
 object at 0x754d09ac)

 when I try to add a Claim to a DebtManager (both are subclasses of
 Folder) at http://localhost:8031/DebtManager/+/@@AddClaim.html

 The addform looks like this:

 browser:addform
   schema=debtman.interfaces.IClaim
   content_factory=debtman.debt.Claim
   label=Add Claim
   name=AddClaim.html
   fields=title description debtor creditor amount
   permission=zope.ManageContent
   /

You will required to give permission for 'IClaim' inteface.

Something like::

  content class=debtman.debt.Claim
implements
interface=zope.app.annotation.interfaces.IAttributeAnnotatable
/
factory
id=debtman.debt.Claim
description=A Claim.
/
require
permission=zope.ManageContent
interface=debtman.interfaces.IClaim/
require
permission=zope.ManageContent
set_schema=debtman.interfaces.IClaim
/
  /content

If you implemented a container interface (say, IClaimContainer)
along with IClaim in debtman.debt.Claim, then you have add::

require
permission=zope.ManageContent
interface=debtman.interfaces.IClaimContainer/

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


Re: [Zope3-Users] How do I start Zope?

2006-03-03 Thread baiju m
On 3/4/06, mwebster [EMAIL PROTECTED] wrote:

 At this point I have:

 Upgraded to Python 2.4.2 and confirmed that it works by launching IDLE and
 seeing the correct version number
 Run the installer Zope-3.2.0.win32-py2.4.exe
snip
 How do I start Zope so I can get to the Management screen or whatever and
 start doing some real work?

First go to installed directory, then::

   python mkzopeinstance.py

it will ask for a folder to install an instance of Zope 3 (instance is
your workplace).
then user name password.

Now go to install directory, the::

   pyton bin/runzope

Now visit: http://localhost:8080

Then please have a look at::

 http://zissue.berlios.de/z3/Zope3In30Minutes.html
 (Warning: This is bit outdated)

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


Re: [Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread baiju m
On 3/4/06, Joseph Method [EMAIL PROTECTED] wrote:
 What kind of thing would go into an IContainerInterface?

is  .interfaces.IDebtManager a IContainer interface, i.e.,
you are extending IContainer, like ::

  class IDebtManager(IContainer):
   pass

And you will be implementing IDebtManager using BTreeContainer
(An implementation of IContainer). i.e,

  class DebtManager(BTreeContainer):
   pass

 Just to be sure, I added the factory directives, although they
 seemed to be implied by the content directives, or I guess handled by
 addMenuItem. No dice.

Yes, factory sub-directive is not madatory.

 Fyi, here's the configure.zcml.


 content class=.debt.DebtManager
 factory

 id=debtman.debt.DebtManager
 description=A debt manager
 /

 require
 permission=zope.ManageContent
 interface=.interfaces.IDebtManager /
 require
 permission=zope.ManageContent
 interface=.interfaces.IDebtManagerSchema /

 require
 permission=zope.ManageContent
 set_schema=.interfaces.IDebtManagerSchema
 /
 require
 permission=zope.ManageContent
 attributes=add
 /
 require like_class=zope.app.folder.Folder /
   /content

 content class=.debt.Claim
 factory
 id=debtman.debt.Claim
 description=A Claim
 /
 require
 permission=zope.ManageContent
 interface=.interfaces.IClaim /
 require
 permission=zope.ManageContent
 set_schema=.interfaces.IClaim/
 require like_class=zope.app.folder.Folder /

 /content


And this looks ok.

Always reply to zope3-users list so that others can also help/learn.

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


Re: [Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread Joseph Method
 is  .interfaces.IDebtManager a IContainer interface, i.e.,
 you are extending IContainer, like ::

   class IDebtManager(IContainer):
pass

The class is

class DebtManager(Folder):

which implements IDebtManager which is:

class IDebtManager(IContainer):
IDebtManager Marker Interface

Would BTreeContainer make the difference?


 Always reply to zope3-users list so that others can also help/learn.

 Regards,
 Baiju M


A mistake I make in Gmail because the buttons are next to each other.

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


Re: [Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread baiju m
On 3/4/06, Joseph Method [EMAIL PROTECTED] wrote:
  is  .interfaces.IDebtManager a IContainer interface, i.e.,
  you are extending IContainer, like ::

class IDebtManager(IContainer):
 pass

 The class is

 class DebtManager(Folder):

 which implements IDebtManager which is:

 class IDebtManager(IContainer):
 IDebtManager Marker Interface

 Would BTreeContainer make the difference?

Actually BTreeContainer (zope.app.container.btree.BTreeContainer) is a
base class of Folder (zope.app.folder.Folder)

And in most of the cases BTreeContainer is enough for implemetating
your IContainer classes.

Can anyone point to the use cases of Folder in the context of IContainer?

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


Re: [Zope3-Users] ForbiddenAttribute add error

2006-03-03 Thread Joseph Method
Interestingly enough, switching the implementation to BTreeFolder
causes this error:

AttributeError: 'DebtManager' object has no attribute 'getSiteManager'

On 3/4/06, baiju m [EMAIL PROTECTED] wrote:
 On 3/4/06, Joseph Method [EMAIL PROTECTED] wrote:
   is  .interfaces.IDebtManager a IContainer interface, i.e.,
   you are extending IContainer, like ::
 
 class IDebtManager(IContainer):
  pass
 
  The class is
 
  class DebtManager(Folder):
 
  which implements IDebtManager which is:
 
  class IDebtManager(IContainer):
  IDebtManager Marker Interface
 
  Would BTreeContainer make the difference?

 Actually BTreeContainer (zope.app.container.btree.BTreeContainer) is a
 base class of Folder (zope.app.folder.Folder)

 And in most of the cases BTreeContainer is enough for implemetating
 your IContainer classes.

 Can anyone point to the use cases of Folder in the context of IContainer?

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



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