Re: [Zope] Zope 2 and Zope 3

2007-02-14 Thread Andreas Jung



--On 14. Februar 2007 13:18:10 -0800 Geoff Gerrietts <[EMAIL PROTECTED]> 
wrote:



1. Last time I talked to anyone from Zope Corp, the plan was to quiesce
Zope


Zope is a community project, not a Zope Corp. project. The influence of ZC
on the Zope development process is limited.


2 in favor of Zope 3. At that time, I think I remember people saying
2.9would be the last in the Zope 2 series.


There has never been such an official statement.


Now there's a
2.10, so clearly it wasn't. How long does a business like mine have before
there is no clear upgrade path in the Zope 2 series? Is 2.10 now the final
Zope 2 release, or will there be a 2.11 and 2.12?


Zope 2 will stay there as long as it is needed and used for large-scale 
enterprise installations (this will be the case for a long time).


-aj




pgpGLmCc8UWOP.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope 2 and Zope 3

2007-02-14 Thread Geoff Gerrietts

On 2/14/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:


There will definitely be a Zope 2.11 and at this point I see no reason
why there shouldn't be a Zope 2.12. We (the Zope Community, not
necessarily Zope Corporation) will maintain Zope 2 as long as it's
necessary. "Maintaining" in this case also means integrating more Zope 3
technologies with each release. Nowadays (Zope 2.10) you can already
write applications, or at least base libraries, that work on both Zope 3
and Zope 2.


This is very helpful for setting a planning horizon, thank you.


I'm surprised you're experiencing poor scaling. I think Zope can scale
pretty well, or at least it can be *made* to scale pretty well. It all
depends on your setup and, of course, on your application.


I can't swear to the accuracy of what I'm about to say but it is an
operating hypothesis that describes accurately behavior that we are
seeing.

Our application is highly dynamic, by which I mean that satisfying any
given request may require a great deal of database activity. The
database in question is almost always Oracle; I'm not counting the
ZODB accesses, here.

Oracle will handle a great many concurrent requests fairly gracefully,
but its average transaction time is not always excellent, especially
for moderately complicated queries. While most queries are sub-second,
populating a page that requires multiple queries to fill in all its
data fields, or even populating a page with only one or two
complicated queries, can require greater than a single second of
database I/O. This cost is offset by the ability to have other threads
processing while your first thread waits for the database to come
back.

Zope likes to have 4 threads processing requests. This preference is
documented in several places, and experiments have historically borne
out the "4 thread hypothesis". We have been unable to realize
significant performance improvements by increasing the number of
available worker threads, but we are able to realize performance
improvements by pointing two Zope servers against the same database.

Zope isn't using much CPU, and it's not using much memory, but it
peaks out at 4 concurrent requests; everything else goes in a queue
behind them. If those 4 concurrent requests happen to take 4 or 5
seconds each, the queue builds deep behind them, possibly with very
simple one-offs.

Historically, we've addressed this by sticking another Zope out there.
We have plans to run multiple Zope instances on a single machine, like
they do (did?) at plone.org; this still requires configuration
management work and testing. But the feeling is that we have a lot
more hardware than we really should need, to handle the volumes we're
dealing with, and we have that hardware because we need more
"channels" to handle our concurrent traffic load.


As for source control, I figure all of your code (DTML, yuck) is in the
ZODB. This went out of fashion a long time ago, most serious development
happens on the filesystem (in Python packages) which can obviously be
source-controlled very well.


A good deal of the code is in the ZODB, because it's (yuck) DTML
documents, yes. We have another sizable chunk that lives on the
filesystem. The challenge in managing the build/deploy process has
been trying to find a way to keep those two conjoined. I suspect that
any dependency on the ZODB at all is likely to be considered an
impediment, and my quick eyeballing says it's not gone or even really
optional under Zope 3 (but I'm sure we could work something out.)



Regarding "oh you'll hafta start over", it's pretty much true, if you
want to switch to Zope 3. But nobody says you have to. You can do it
incrementally by porting some of your app's functionality to Zope 3
components step by step (as mentioned already, most work in Zope 2). Big
projects like Plone aren't rewriting their whole codebase either, but
new development is completely Zope3-based. Their target platform still
is Zope 2, though.


"You'll hafta start over" is only ever true in degrees, though, and
I'm still trying to figure out what the degrees are. The business
logic will still be the same. Can we hack together a DTML processor
that allows us to export the DTML documents to the filesystem and
publish them from there? Maybe, I don't know. Did someone else already
do that? Don't know that either. How dramatically will our products
need to change? Probably 75% of our Python code is written in a
bastardized form of ExternalMethod; we might be able to leverage that
unfortunate architectural choice to significant advantage during our
porting phase. These are the kinds of questions I have, and I think
the answers probably aren't easy or someone would have offered them
up.

Someone's going to need to learn enough Zope 3 to answer the
questions. I'm not sure it will be me, but maybe. :)

Thanks for all the insight, I'm making plans and pleas and I have a
direction for my research now. :)

Thanks,
--G.

Re: [Zope] TAL expression

2007-02-14 Thread Garito

Yeah!
Thanks

2007/2/14, Andrew Milton <[EMAIL PROTECTED]>:


+---[ Garito ]--
| Hi all!
|
| if
|
| here/Object
|
| executes the Object
|
| how can I retrive only the object with a TAL expression?


nocall:here/Object
or
python:here.Object


--
Andrew Milton
[EMAIL PROTECTED]





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope 2 and Zope 3

2007-02-14 Thread Philipp von Weitershausen

Geoff Gerrietts wrote:
I have a couple questions about the current game plan for Zope 
development that I was unable to answer for myself by searching through 
mailing list archives and the zope.org  website. I hope 
my inability to answer them is not merely a symptom of poor search term 
choices, and I hope someone can answer them for me.


You're right, it is a bit tricky to google for this.

Zope 3 release notes usually contain the following notice (from 
http://mail.zope.org/pipermail/zope-announce/2006-September/002016.html):


  Zope 3 is the next major Zope release and has been written from
  scratch based on the latest software design patterns and the
  experiences of Zope 2.

  Cleanup of the Zope 3 packages has continued to ensure a flexible and
  scalable platform. We continued the work on making the transition from
  Zope 2 to Zope 3 by making Zope 2.10 use even more of the Zope 3
  packages. But the transition is far from complete yet. **You can't run
  Zope 2 applications in Zope 3.**

I've posted a couple times before (a long time ago) about the large web 
application I work on; it's many hundreds of KLOC and an unfortunately 
large percentage of it is DTML. It's still more or less in that state; 
the realities of being a for-profit business in a rapidly evolving 
marketplace permit very little time for maintenance or aggressive 
refactoring of the application. That's the background for my questions; 
I'm trying to figure out how loudly I can shout "Impending doom!" to 
upper management without endangering my credibility.


1. Last time I talked to anyone from Zope Corp, the plan was to quiesce 
Zope 2 in favor of Zope 3. At that time, I think I remember people 
saying 2.9 would be the last in the Zope 2 series. Now there's a 2.10, 
so clearly it wasn't. How long does a business like mine have before 
there is no clear upgrade path in the Zope 2 series? Is 2.10 now the 
final Zope 2 release, or will there be a 2.11 and 2.12?


There will definitely be a Zope 2.11 and at this point I see no reason 
why there shouldn't be a Zope 2.12. We (the Zope Community, not 
necessarily Zope Corporation) will maintain Zope 2 as long as it's 
necessary. "Maintaining" in this case also means integrating more Zope 3 
technologies with each release. Nowadays (Zope 2.10) you can already 
write applications, or at least base libraries, that work on both Zope 3 
and Zope 2.


2. Whenever someone asks about moving an existing application from Zope 
2 to Zope 3, there's a round of flip "oh you'll hafta start over" 
responses. I understand that the two architectures are fundamentally 
different, and that I'll need to rebuild my object database, etcetera. 
Am I also correct in believing that all products must be completely 
rewritten, and that DTML is no longer a supported templating language? 
Has the users/roles/permissions security structure disappeared or been 
supplanted? I am trying to ascertain at a glance how much we will need 
to rebuild for ourselves; if it's enough then the problems we have had 
with Zope (poor scaling, poor integration with source control) may 
outweigh the advantages of remaining on the platform.


I'm surprised you're experiencing poor scaling. I think Zope can scale 
pretty well, or at least it can be *made* to scale pretty well. It all 
depends on your setup and, of course, on your application.


As for source control, I figure all of your code (DTML, yuck) is in the 
ZODB. This went out of fashion a long time ago, most serious development 
happens on the filesystem (in Python packages) which can obviously be 
source-controlled very well.


Regarding "oh you'll hafta start over", it's pretty much true, if you 
want to switch to Zope 3. But nobody says you have to. You can do it 
incrementally by porting some of your app's functionality to Zope 3 
components step by step (as mentioned already, most work in Zope 2). Big 
projects like Plone aren't rewriting their whole codebase either, but 
new development is completely Zope3-based. Their target platform still 
is Zope 2, though.



--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python script syntax

2007-02-14 Thread Peter Bengtsson

On 2/14/07, garry saddington <[EMAIL PROTECTED]> wrote:

I want to do something like this in a script:

forms='7L'


getattr(context, forms).manage_addFolder('filey')

PS. This getattr() is actually not the same as the Python getattr()
belive it or not. It just has the same name and pretty much similar
functionality.


context.forms.manage_addFolder('filey')

ie. substitute the variable 'forms' for the correct value but I can not
get the syntax correct, can anyone help?
regards
garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python script syntax

2007-02-14 Thread Paul Winkler
On Wed, Feb 14, 2007 at 11:42:59PM +, garry saddington wrote:
> I want to do something like this in a script:
> 
> forms='7L'
> 
> context.forms.manage_addFolder('filey')
> 
> ie. substitute the variable 'forms' for the correct value but I can not
> get the syntax correct, can anyone help?

Look up getattr() in Python's documentation.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] python script syntax

2007-02-14 Thread garry saddington
I want to do something like this in a script:

forms='7L'

context.forms.manage_addFolder('filey')

ie. substitute the variable 'forms' for the correct value but I can not
get the syntax correct, can anyone help?
regards
garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2 and Zope 3

2007-02-14 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 14 Feb 2007, at 22:18, Geoff Gerrietts wrote:
1. Last time I talked to anyone from Zope Corp, the plan was to  
quiesce Zope 2 in favor of Zope 3. At that time, I think I remember  
people saying 2.9 would be the last in the Zope 2 series. Now  
there's a 2.10, so clearly it wasn't. How long does a business like  
mine have before there is no clear upgrade path in the Zope 2  
series? Is 2.10 now the final Zope 2 release, or will there be a  
2.11 and 2.12?


Zope Corp ceased to be a determining factor in Zope's future a long  
time ago. You should ask developers and Jim Fulton in his capacity as  
the Zope czar, not some company.



2. Whenever someone asks about moving an existing application from  
Zope 2 to Zope 3, there's a round of flip "oh you'll hafta start  
over" responses. I understand that the two architectures are  
fundamentally different, and that I'll need to rebuild my object  
database, etcetera. Am I also correct in believing that all  
products must be completely rewritten, and that DTML is no longer a  
supported templating language? Has the users/roles/permissions  
security structure disappeared or been supplanted? I am trying to  
ascertain at a glance how much we will need to rebuild for  
ourselves; if it's enough then the problems we have had with Zope  
(poor scaling, poor integration with source control) may outweigh  
the advantages of remaining on the platform.


You must rewrite your application. DTML still exists, but ZPT is  
encouraged. The upgrade path is made less "catastrophic" by the fact  
that you can already integrate more and more Zope 3 technologies into  
your Zope 2 product now. Zope 2 does not have any defined "end of  
life", but you can make your application more future-proof by getting  
acquanted with those Zope 3 bits that are usable from within Zope 2  
today.


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFF05WqRAx5nvEhZLIRApISAJ9zgrqhgd4+VGl2/aHBiLcEgEKDxwCdHt79
2V4AXxVimnWxq/jMx23iLEo=
=eDrW
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Extract Files from ZODB

2007-02-14 Thread Carlosfocker
> "If Plone is no longe working" means that the "Plone" UI no longer
> works but the Zope Management Interface still operates, then you
> have hope that you can recover your files.
> 
This would be my current situation as far as "Plone is no longer working". I
cant get to any pages inside of the plone instance but the ZMI is accessiable. 
I cant however do anything to the Plone site thru the ZMI.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Extract Files from ZODB

2007-02-14 Thread Dieter Maurer
Carlosfocker wrote at 2007-2-13 18:25 +:
>I have a ZODB that was being used by Plone to store files(Word documents,
>Images, etc.).  Plone is no longer working.
>I want to extract (retrieve) the
>files from the ZODB. Is this possible?

Whether this is possible (without deep tricks) depends on
what "Plone is no longer working" means.

Keep in mind that the ZODB stores object states only but no code
whatsoever. To understand the states, working external (application) code
is necessary.

"If Plone is no longer working" means that the "Plone" instance object
can no longer be loaded from the ZODB, then the code is missing
that provides understanding for the "Plone" instance object's state.
Somewhere deep inside this state are your files

"If Plone is no longe working" means that the "Plone" UI no longer
works but the Zope Management Interface still operates, then you
have hope that you can recover your files.


Even in the first case, there is some hope: you can go back to
the Plone version that created the state. This version
should be able to understand it.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope 2 and Zope 3

2007-02-14 Thread Geoff Gerrietts

I have a couple questions about the current game plan for Zope development
that I was unable to answer for myself by searching through mailing list
archives and the zope.org website. I hope my inability to answer them is not
merely a symptom of poor search term choices, and I hope someone can answer
them for me.

I've posted a couple times before (a long time ago) about the large web
application I work on; it's many hundreds of KLOC and an unfortunately large
percentage of it is DTML. It's still more or less in that state; the
realities of being a for-profit business in a rapidly evolving marketplace
permit very little time for maintenance or aggressive refactoring of the
application. That's the background for my questions; I'm trying to figure
out how loudly I can shout "Impending doom!" to upper management without
endangering my credibility.

1. Last time I talked to anyone from Zope Corp, the plan was to quiesce Zope
2 in favor of Zope 3. At that time, I think I remember people saying
2.9would be the last in the Zope 2 series. Now there's a
2.10, so clearly it wasn't. How long does a business like mine have before
there is no clear upgrade path in the Zope 2 series? Is 2.10 now the final
Zope 2 release, or will there be a 2.11 and 2.12?

2. Whenever someone asks about moving an existing application from Zope 2 to
Zope 3, there's a round of flip "oh you'll hafta start over" responses. I
understand that the two architectures are fundamentally different, and that
I'll need to rebuild my object database, etcetera. Am I also correct in
believing that all products must be completely rewritten, and that DTML is
no longer a supported templating language? Has the users/roles/permissions
security structure disappeared or been supplanted? I am trying to ascertain
at a glance how much we will need to rebuild for ourselves; if it's enough
then the problems we have had with Zope (poor scaling, poor integration with
source control) may outweigh the advantages of remaining on the platform.

Thanks,
--G.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL expression

2007-02-14 Thread Andrew Milton
+---[ Garito ]--
| Hi all!
| 
| if
| 
| here/Object
| 
| executes the Object
| 
| how can I retrive only the object with a TAL expression?


nocall:here/Object
or
python:here.Object


-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL expression

2007-02-14 Thread Andreas Jung



--On 14. Februar 2007 21:12:22 +0100 Garito <[EMAIL PROTECTED]> wrote:


Hi all!

if

here/Object

executes the Object

how can I retrive only the object with a TAL expression?




Look at the nocall: directive.

-aj

pgpnAtBF284cS.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] TAL expression

2007-02-14 Thread Garito

Hi all!

if

here/Object

executes the Object

how can I retrive only the object with a TAL expression?

Thanks!

--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Error trapping Duplicate entry in a database

2007-02-14 Thread Andreas Jung



--On 14. Februar 2007 18:40:25 + [EMAIL PROTECTED] wrote:


Hi,

I am trying to find a friendlier way of error traping when I am perform
some database activities.


try..except?


The one I am looking for first is checking for
a duplicate entry in a database.


What does that mean? You want to check for an existing object by id within 
a container?


if some_id in somefolder.objectIds():


-aj

pgpaWbDsNPmSK.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Error trapping Duplicate entry in a database

2007-02-14 Thread larrymcdonnell
Hi,

I am trying to find a friendlier way of error traping when I am perform some 
database activities. The one I am looking for first is checking for a duplicate 
entry in a database. I googled around but I could not find the answer I am 
looking for. I am using an older version of zope (Zope 2.6.1) and I am still 
using DTML. Any examples or pointers would be a big help.

Thanks in advance,

Larry___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )