Re: [Zope-dev] Splitter problem #3

2002-04-03 Thread Petter Enholm


That is correct, but in the CVS tree the file is empty.
I checked out from the CVS tree yesterday.

Here:
http://cvs.zope.org/~checkout~/Zope/lib/python/Products/PluginIndexes/TextIn
dex/Splitter/ZopeSplitter/

I also downloaded a tar ball for the HEAD tag, which also gives a
__init__.py which zero bytes.

Best regards

Petter Enholm

- Original Message -
From: "Andreas Jung" <[EMAIL PROTECTED]>
To: "Petter Enholm" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 6:37 PM
Subject: Re: [Zope-dev] Splitter problem #3


>
> - Original Message -
> From: "Petter Enholm" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 03, 2002 11:27
> Subject: [Zope-dev] Splitter problem #3
>
>
> >
> > I checked the directory containing ZopeSplitter and I saw that the
> > __init__.py file was empy. I copied on the one from Zope-2.5.1-b1 - and
> Zope
> > starts without problems.  I am curious now, what is the problem here ?
Can
> I
> > continue running with the __init__.py from older Zope version or is
there
> > other things that must be done to my installation.
>
> Neither the  ZopeSplitter/__init__.py file for 2.4.3 nor 2.5.1b1 are empty
> for me.
>
> -aj
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )




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



Re: [Zope-dev] Re: [Zope] isecure XML-RPC handling.

2002-04-03 Thread Rossen Raykov

Hi all,

My point was that Zope is revealing internal information that is believed to
be private and invisible for the Internet users.
It happens in its default (debug) installation and even after -D option is
removed from the startup script.
I try some XML-RPC requests against www.zope.org (2.3.2) and against the
default 2.5.0 installation for Windows (with and without -D option).
In both cases Zope was reviling the physical location of the distribution.
In the case of www.zope.org it was reviling even information about it's
internal network (this may be also possible in 2.5.0 but I do not have the
time to create complicated enough configuration).

In general Zope have not to reveal any physical information neither about
it's  installation nor about the internal network behind it.
If you need to print traces - use relative paths to the server root.
If the debug option is omitted - just print the error and do not print any
stack dumps at all!

People have to be aware that the default installation is in debug mode and
the results of that.
I believe many people will be surprised to learn that they are exposing
information about their private networks and server setups.

Finally two clarifications:
1. Zope 2.3.2 do support XML-RPC. Try example one against www.zope.org it
will work just fine!
2. Zope Zope 2.5.0 in it's default installation (debug mode) still is
revealing information about the physical location of the installed server.
See the dump in example two. It is produced as  a result of the XML-RPC
example from my first e-mail.

Regards,
Rossen

 Example one ---
POST /Foo/Bar/MyFolder HTTP/1.0
Content-Type: text/xml
Content-length: 110



title_or_id




 Example two ---
...
Bobo-Exception-File: C:\PROGRA~1\WebSite\bin\lib\xmllib.py
...
Traceback (innermost last):
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 114, in
publish
  File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 158, in
zpublisher_exception_hook
(Object: Zope)
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 63, in
publish
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\HTTPRequest.py, line 357,
in processInputs
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\xmlrpc.py, line 47, in
parse_input
  File C:\PROGRA~1\WebSite\lib\python\xmlrpclib.py, line 531, in loads
  File C:\PROGRA~1\WebSite\bin\lib\xmllib.py, line 172, in close
  File C:\PROGRA~1\WebSite\bin\lib\xmllib.py, line 405, in goahead
  File C:\PROGRA~1\WebSite\bin\lib\xmllib.py, line 794, in syntax_error
Error: (see above)

- Original Message -
From: "Brian Lloyd" <[EMAIL PROTECTED]>
To: "R. David Murray" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "Rossen Raykov" <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 12:20 PM
Subject: RE: [Zope-dev] Re: [Zope] isecure XML-RPC handling.


> > I think most people missed the point here.  I don't think Rossen
> > is asking for help on running zope or getting xml-rpc to work with
> > it.  He's observed a "security" problem: he believes the fact that
> > a traceback including path names is included in the error response
> > is a security exposure.  This has been discussed on zope-dev before,
> > but the fact remains that the security community *does* treat
> > exposure of filesystem path information as a security issue.
>
> Right. There is already code for Zope 2.6 and Zope 3 that
> addresses this. Shane's new traceback formatting makes the
> trace information far more readable in addition to removing
> filesystem path information.
>
>
> Brian Lloyd[EMAIL PROTECTED]
> V.P. Engineering   540.361.1716
> Zope Corporation   http://www.zope.com
>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



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



Re: [Zope-dev] Simplification via custom protocol handlers: cvs://server/project,zope://foo ?

2002-04-03 Thread Craeg K Strong



Dieter Maurer wrote:

>Craeg K Strong writes:
> > ...
> > The Zope protocol handler idea is interesting, and I haven't thought 
> > this all the way through yet.
> > Couldbe thought of as referring to "zope://blat" 
> > where the Zope protocol is the default
> > and therefore omitted?
>I do not think, this would be a good correspondence:
>
>  "zope://blat" is kind of an absolute URL while "blat" is by no means
>  absolute.
>
>
>Dieter
>
You're right, it is a different thing.I was originally thinking that 
you could
imagine a URN with a "zope" namespace ID (meaning the entire contents of 
the ZODB)
and the python expression as the namespace specific string.

However, I believe URNs are supposed to name a specific resource.  By 
contrast,
acquisition means that a dtml-var can name very different resources 
depending on
what is in the ZODB.  It is a variable, not a name.

I am now thinking that the way to avoid my multiple mixin problem in 
Zope-2 is
to break things apart into small pieces that each do a specific thing. 
 For example,
you could have:

- a CVSFile product that makes an object in ZODB retrieve its content 
from a CVS sandbox
- an XPath filter product that applies an xpath to an object in ZODB and 
returns the result
- an XSLT transformer product that applies an xslt to an object in ZODB 
and returns the result
- a STX to Docbook filter product that takes an ASCII file in structured 
text format and returns
an XML file using the docbook dialect (I think STXDocument does this)

So you could have a structured text document foo.stx in your CVS sandbox.  
A contrived example follows.  Lets say you wanted an HTML page that 
displayed
only a portion of the contents of a structured text file.  The file 
("foo.stx") is in your
CVS sandbox, and you just want the first paragraph as an HTML page.

You would create an instance of CVSFile called foo.stx in ZODB.  foo.stx 
gets its
content from the file "foo.stx" in your CVS sandbox.

You would then create an instance of STXDocument that gets its content
from foo.stx but transforms it into docbook XML.  You might call it foo.xml

You could then create an instance of XPathFilter that gets its content 
from foo.xml
but just picks out some subset of that content based on the specified 
xpath.  You might
call that object "bar.xml"

Finally, You could create an instance of XSLTFile that gets its content 
from bar.xml
and applies an xslt transformer to it to output HTML.  You might call 
this file "index_html"

So inside a single folder in ZODB you could have your four different 
objects:

folder/foo.stx  (instanceof CVSFile)
folder/foo.xml  (instanceof STXDocument)
folder/bar.xml   (instanceof XPathFilter)
folder/index_html  (instanceof XSLTFile)

So by navigating to "folder" you automatically get the HTML webpage with 
the desired content.

How to make this work?   Each Zope Product must be able to either hold 
its content directly
or get its content by referring to another object in ZODB.   Also, if 
the Product maintains a cache
(obviously you don't want to run a transformation more than once on the 
same content) it must
ask the referrred to object if its contents have changed.

Thoughts?

--Craeg



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



[Zope-dev] Better tracebacks proposal

2002-04-03 Thread Shane Hathaway

I've created a proposal that details what I'm working on to improve 
tracebacks for Zope 2.6.  (A lot of the work is also going into Zope 3X.)

http://dev.zope.org/Wikis/DevSite/Proposals/BetterTracebacks

Everyone who is interested in improving Zope's tracebacks, please review 
the proposal and comment.

Shane



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



[Zope-dev] Satýlýk Daire (Sahibinden)

2002-04-03 Thread Doðan
Merhabalar,
Ankara Sincan Fatih'te satmak istediðim 2 adet dairem var. 
1.cisi G.O.P Mahallesinde :
Kombili, PVC li, Çelik Kapýlý, Duvarlar alçýlý, Fayans kaplama, Mutfak Dolaplarý Laminant ve yeni, Metro projesine yakýn, Doðalgaz döþemesi tamam, güney cephe ve 3. kat, 3 oda bir salon..
-- Fiyatý : 24 milyar TL --
2.cisi Yaþar Doðu Caddesinde :
Sobalý, 3 oda 1 salon, 1. kat çift balkonlu, merkezde, muhtarlýk ve otobüs duraðý yaný, ekmek büfesi yaný, 
-- Fiyatý : 18 Milyar TL --
Ayrýntýlý Bilgi için Tel: 05425171162
Recep Doðan 





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


RE: [Zope-dev] Re: [Zope] isecure XML-RPC handling.

2002-04-03 Thread Brian Lloyd

> I think most people missed the point here.  I don't think Rossen
> is asking for help on running zope or getting xml-rpc to work with
> it.  He's observed a "security" problem: he believes the fact that
> a traceback including path names is included in the error response
> is a security exposure.  This has been discussed on zope-dev before,
> but the fact remains that the security community *does* treat
> exposure of filesystem path information as a security issue.

Right. There is already code for Zope 2.6 and Zope 3 that 
addresses this. Shane's new traceback formatting makes the 
trace information far more readable in addition to removing 
filesystem path information.


Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716   
Zope Corporation   http://www.zope.com




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



Re: [Zope-dev] Splitter problem #3

2002-04-03 Thread Andreas Jung


- Original Message -
From: "Petter Enholm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 11:27
Subject: [Zope-dev] Splitter problem #3


>
> I checked the directory containing ZopeSplitter and I saw that the
> __init__.py file was empy. I copied on the one from Zope-2.5.1-b1 - and
Zope
> starts without problems.  I am curious now, what is the problem here ? Can
I
> continue running with the __init__.py from older Zope version or is there
> other things that must be done to my installation.

Neither the  ZopeSplitter/__init__.py file for 2.4.3 nor 2.5.1b1 are empty
for me.

-aj



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



[Zope-dev] Splitter problem #3

2002-04-03 Thread Petter Enholm


Hi,

Like other people on the list I get problems with the splitter. I checked
out latest version of Zope from cvs today, compiled wo_pcgi.py and started
Zope. Running nicely. Then I shut down Zope and copied in a Data.fs file
from Zope 2.4.3 - which by the way runs nicely on Zope 2.5.1-b1.

When I now attempt to restart Zope I get several errors, among others this
one:

2002-04-03T18:01:41 ERROR(200) Zope Couldn't install PageTemplates
Traceback (innermost last):
  File /usr/local/Zope/lib/python/OFS/Application.py, line 639, in
install_product
(Object: Zope)
(Info: PageTemplates)
  File /usr/local/Zope/lib/python/Products/PageTemplates/__init__.py, line
28, in initialize
  File
/usr/local/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py, line
342, in initialize
  File /usr/local/Zope/lib/python/App/ProductContext.py, line 318, in
registerHelp
  File /usr/local/Zope/lib/python/App/ProductContext.py, line 244, in
registerHelpTopic
  File /usr/local/Zope/lib/python/OFS/ObjectManager.py, line 290, in
_setObject
(Object: Help)
  File /usr/local/Zope/lib/python/HelpSys/HelpTopic.py, line 79, in
manage_afterAdd
(Object: PageTemplate_Edit.stx)
  File /usr/local/Zope/lib/python/HelpSys/HelpTopic.py, line 92, in
index_object
(Object: PageTemplate_Edit.stx)
  File /usr/local/Zope/lib/python/Products/ZCatalog/ZCatalog.py, line 476,
in catalog_object
(Object: catalog)
  File /usr/local/Zope/lib/python/Products/ZCatalog/Catalog.py, line 366, in
catalogObject
  File
/usr/local/Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py,
line 306, in index_object
(Object: SearchableText)
  File /usr/local/Zope/lib/python/ZODB/Connection.py, line 505, in setstate
SystemError: Failed to import class Splitter from module
Products.PluginIndexes.TextIndex.Splitter.ZopeSplitter

I checked the directory containing ZopeSplitter and I saw that the
__init__.py file was empy. I copied on the one from Zope-2.5.1-b1 - and Zope
starts without problems.  I am curious now, what is the problem here ? Can I
continue running with the __init__.py from older Zope version or is there
other things that must be done to my installation.

Best regards
Petter Enholm
Snapper




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



Re: [Zope-dev] Re: [Zope] isecure XML-RPC handling.

2002-04-03 Thread R. David Murray

On Tue, 2 Apr 2002, Eron Lloyd wrote:
> The problem here seems to be that you are trying to do XML-RPC communication
> with a version of Zope that doesn't support XML-RPC out of the box. You

I think most people missed the point here.  I don't think Rossen
is asking for help on running zope or getting xml-rpc to work with
it.  He's observed a "security" problem: he believes the fact that
a traceback including path names is included in the error response
is a security exposure.  This has been discussed on zope-dev before,
but the fact remains that the security community *does* treat
exposure of filesystem path information as a security issue.

I believe the addition of the variable to control what happens with
tracebacks addresses this issue from a security standpoint, which
is probably all that Rossen cares about with regards to letting
bugtraq know that "the security bug has been fixed".

The fact that zope.org itself is still "insecure" in this
sense may also be an issue, but not one that is going to
get addressed before the new zope.org goes online.

--RDM


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



Re: [Zope-dev] ding, dong, the segfault is dead. Patch attached

2002-04-03 Thread Anthony Baxter


> Nice to hear. Is there any change that this patch will be included in
> the next Zope Binary release?

Well, there will be a python 2.1.3 release for this fix, so I'd imagine
that there will be a binary release from that...

> The beast is killed! Finally! :)

do I hear the sound of the next killer mongrel bug warming up, just offstage?

Anthony
-- 
Anthony Baxter <[EMAIL PROTECTED]>   
It's never too late to have a happy childhood.


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



RE: [Zope-dev] Why are ZClasses bad?

2002-04-03 Thread Bjorn Stabell

I would really like to see a hybrid between ZClasses and the CMF's
portal_types, so that you can define methods in the Python class that
you want portal_type instances of this class to be able to overload.
I'm currently abusing the CMF portal_types' actions to "overload"
methods of these types.  This makes it possible for CMF portal_types to
override some of the Python class' methods; that's usually all I need.

The methods that you want to be able to overload have to look for a
specific CMF action (for that portal_type) and call the skin method that
is defined for that action, similar to the way the CMF overloads
index_html/view.

Regards,
-- 
Bjorn

-Original Message-
From: Joachim Werner [mailto:[EMAIL PROTECTED]] 
Posted At: Wednesday, April 03, 2002 17:41
Posted To: Zope Developer
Conversation: [Zope-dev] Why are ZClasses bad?
Subject: Re: [Zope-dev] Why are ZClasses bad?


Hi!

I guess ZClasses are not "evil" or so. But as somebody who has worked
with ZClasses for a long time and then switched to Python Products
instead, I see a lot of problems/disadvantages ZClasses have:

- Most important: It is rather hard to change the base classes with
ZClasses. In Python, you can do that very easily.

- Copy&paste programming does not work with ZClasses. With Python
Products, I can start writing my own version of an existing Product by
just searching and replacing all the occurences of the original Product
name by my own one. With ZClasses, copying an existing ZClass and
changing it to fit will not work well.

- If you use a decent editor (I am currently using PythonWin on
Windows), it is much more convenient to have all the methods of your
class in just one file than having to drill down into the ZMI and search
for individual Scripts (Python) or DTML Methods

- Debugging Python code is easier than debugging ZClasses. E.g., you can
use a real debugger, or just add temporary print statements to the code.
With Python code, the tracebacks are much more helpful than they are
with ZClasses, especially if you use DTML ...

- Working from Python gives you MUCH more power, and the code usually is
more compact.

- You can use CVS for the code, and there is a rather strict separation
between instances of your Product/class and the code ...

- ZClasses behave "strange" with regard to nested acquisition. I
experienced cases where two instances of a ZClass acquired from each
other in a way they shouldn't ...

- ZClasses are relatively slow, especially if you use other ZClasses as
base classes of ZClasses.

One of the great disadvantages of Python-based Products was that you had
to permanently restart your Zope to see the changes in action. But now
we have "refresh", which works great.

That said, I can still imagine using ZClasses together with a
custom-built Python-based base class. They are over-the-web, which is
their greatest advantage.

For Zope 3, I'd suggest a complete redesign of ZClasses to offer
something similar without the disadvantages ...



- Original Message -
From: "Dario Lopez-Kästen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 11:20 AM
Subject: [Zope-dev] Why are ZClasses bad?


Hello!

I keep hearing people argue that ZClasse are bad, and I am curious as to
why they are.

I recall something about ZClasses and the catalog, but are there any
other "badness" with ZClasses?

/dario - curious

- 
Dario Lopez-Kästen, [EMAIL PROTECTED]IT Systems & Services
System Developer/System Administrator Chalmers University of Tech.



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




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

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



re: [Zope-dev] ding, dong, the segfault is dead. Patch attached

2002-04-03 Thread Martijn Jacobs

Hello leo,

> I just put this patch up in production environment and it's been up
for
> more than 1h30m now, which for me is enough indication that it's in
fact
> the final solution to the problem.

Nice to hear. Is there any change that this patch will be included in
the next Zope Binary release? I would love to apply this patch on a
python source, compile it, and put it away, but you don't want to do
that on a 28K8 PC Anywhere connection, without any compilers installed.
So I'm hoping on a very soon Zope release with this version of python.
The patch from Matt is OK, but the peformance of heavy database access
is dramatic, so I need to upgrade real soon.

The beast is killed! Finally! :)



Martijn.














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



Re: [Zope-dev] Why are ZClasses bad?

2002-04-03 Thread Toby Dickenson

On Wed, 3 Apr 2002 11:40:36 +0200, "Joachim Werner"
<[EMAIL PROTECTED]> wrote:

>Hi!

I agree with most of what was said before, but have a few things to
add

>- Most important: It is rather hard to change the base classes with
>ZClasses. In Python, you can do that very easily.

Or you can adopt a design rule that you should write a simple Python
base class for every ZClass, and put your *real* base classes there.
This makes it easy to change base classes later, and makes it easy to
add a pure python method too.

The main disadvantage to this ZClass/Product hybrid comes from
distribution. It works great only if you are not planning to
distribute the Product (or, pair of Products ;-)



Toby Dickenson
[EMAIL PROTECTED]

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



Re: [Zope-dev] Why are ZClasses bad?

2002-04-03 Thread Joachim Werner

Hi!

I guess ZClasses are not "evil" or so. But as somebody who has worked with
ZClasses for a long time and then switched to Python Products instead, I see
a lot of problems/disadvantages ZClasses have:

- Most important: It is rather hard to change the base classes with
ZClasses. In Python, you can do that very easily.

- Copy&paste programming does not work with ZClasses. With Python Products,
I can start writing my own version of an existing Product by just searching
and replacing all the occurences of the original Product name by my own one.
With ZClasses, copying an existing ZClass and changing it to fit will not
work well.

- If you use a decent editor (I am currently using PythonWin on Windows), it
is much more convenient to have all the methods of your class in just one
file than having to drill down into the ZMI and search for individual
Scripts (Python) or DTML Methods

- Debugging Python code is easier than debugging ZClasses. E.g., you can use
a real debugger, or just add temporary print statements to the code. With
Python code, the tracebacks are much more helpful than they are with
ZClasses, especially if you use DTML ...

- Working from Python gives you MUCH more power, and the code usually is
more compact.

- You can use CVS for the code, and there is a rather strict separation
between instances of your Product/class and the code ...

- ZClasses behave "strange" with regard to nested acquisition. I experienced
cases where two instances of a ZClass acquired from each other in a way they
shouldn't ...

- ZClasses are relatively slow, especially if you use other ZClasses as base
classes of ZClasses.

One of the great disadvantages of Python-based Products was that you had to
permanently restart your Zope to see the changes in action. But now we have
"refresh", which works great.

That said, I can still imagine using ZClasses together with a custom-built
Python-based base class. They are over-the-web, which is their greatest
advantage.

For Zope 3, I'd suggest a complete redesign of ZClasses to offer something
similar without the disadvantages ...



- Original Message -
From: "Dario Lopez-Kästen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 11:20 AM
Subject: [Zope-dev] Why are ZClasses bad?


Hello!

I keep hearing people argue that ZClasse are bad, and I am curious as to why
they are.

I recall something about ZClasses and the catalog, but are there any other
"badness" with ZClasses?

/dario - curious

- 
Dario Lopez-Kästen, [EMAIL PROTECTED]IT Systems & Services
System Developer/System Administrator Chalmers University of Tech.



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




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



[Zope-dev] Why are ZClasses bad?

2002-04-03 Thread Dario Lopez-Kästen

Hello!

I keep hearing people argue that ZClasse are bad, and I am curious as to why
they are.

I recall something about ZClasses and the catalog, but are there any other
"badness" with ZClasses?

/dario - curious

- 
Dario Lopez-Kästen, [EMAIL PROTECTED]IT Systems & Services
System Developer/System Administrator Chalmers University of Tech.



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



[Zope-dev] Re: [DB-SIG] SQLite as a Light DB component for Zope and Python

2002-04-03 Thread jose

Magnus Lyckå wrote:

> At 17:54 2002-04-01 -0800, William Trenker wrote:
>
>> but a greenhorn at extending Python yet I had a
>> crude but working Python extension module for
>> SQLite up and running in 2 days
>
>
> So, we expect to see the announcement of a DB-API 2
> complient SQLite driver any day then! :-)
>
>> Implements a large subset of SQL92.
>
>
> I'd say a small subset, or perhaps sideset: 

If you campare it with OCELOT you are right but you have to compare it 
with Gadflay.

>
>
> SQLite implements the follow syntax:
> ·   BEGIN TRANSACTION (END COMMIT ROLLBACK)
> ·   COPY
> ·   CREATE INDEX
> ·   CREATE TABLE
> ·   CREATE VIEW
> ·   DELETE
> ·   DROP INDEX
> ·   DROP TABLE
> ·   DROP VIEW
> ·   EXPLAIN
> ·   expression
> ·   INSERT
> ·   ON CONFLICT clause
> ·   PRAGMA
> ·   REPLACE
> ·   SELECT
> ·   UPDATE
> ·   VACUUM
> (Or at least that's what the language reference at
> http://www.hwaci.com/sw/sqlite/lang.html says.)
>
> No GRANT / REVOKE or any other kind of security.
> It seems to be a plain single user thingie.
>
> No ALTER TABLE, SET TRANSACTION etc. Ok, these aren't
> actually in Entry SQL 92, but everybody else has them...
>
> And COPY, PRAGMA, REPLACE, VACUUM, ON CONFLICT etc is
> not in any SQL standard I know of.
>
> It violates SQL92 in a number of ways it seems. For
> inststance, it's typeless (like GadFly) which means that
> for instance "00" == "0". There are a lot of error
> checking in SQL that this engine won't do.
>
> SQLite ignores checks in CREATE TABLE and has no foreign
> keys?
>
> But it seems a bit closer to SQL than GadFly...and apart
> from typelessness it seems to support rather extensive
> SELECT statements. It might be a very useful thing I guess.
> There are plenty of cases where installing an RDBMS is
> overkill.
>
>> Small memory footprint: less than 20K lines of C code.
>
>
> Erh? Measuring memory footprint in kLoC seems a bit like
> measuring mass in meters. Although according to the 2.4.0
> release notes at freshmeat it seems the binary image needs
> less than 200kB! Question is how much RAM that actual data
> requires. If it lifts entire tables into RAM it might be
> very memory hungry for large databases.
>
>> Four times faster than PostgreSQL. Twice as fast as SQLite 1.0.
>
>
> Yea yea, it just depends on what you measure. And how.
> PostgreSQL is infinitely faster on the features SQLite
> doesn't support... Benchmarking is a bit too complex to
> just describe like a scalar like that.
>
>> The author, D. Richard 
>> Hipp, is a computer science Ph.D. who knows his 
>> stuff.  This is not green software, it is well designed and tested.  
>> It was first released in May 2000 and is very actively updated and 
>> supported.
>
>
> So, how active is the mailing list? And how good? I saw
> a subscribe link, but no archive (maybe I just missed it.)
>
>
The SQLite mailing list is very active. I am a list member.

Jos



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