Alt-TAL (Re: [Zope-dev] i18n for CMF And Plone, backporting i18n to Zope 2.x)

2002-07-01 Thread Lalo Martins

On Mon, Jul 01, 2002 at 03:49:07PM -0300, Sidnei da Silva wrote:
 On Seg 01 Jul 2002 15:26, Jim Fulton wrote:
 | I'll add that the current ZPT implementation is too slow
 | (thanks to recent DTML speedups ;).
 |
 | ZPT needs to be as fast as or faster than DTML.  It would be
 | great if it was cleaner and more pluggable.
 
 I remember that i had the same concern when discussing this with lalo, and he 
 told me that this should be faster, as TAL-Current stores a binary 
 representation of the XML Parsed source, and his version is based on PAX, and 
 this would not need to be pre-compiled and stored. Unfortunately I cannot 
 give more information as this explanation seemed fine to me at that time.


Our original prototypes of ZPT stored a DOM tree in the ZODB, so they only
really parsed the source when it was updated.

When the stuff was rewritten for optimization, DOM was done away with in
favour of TAL bytecode which, for some reason, isn't stored persistently.
I asked once, and I seem to remember the answer was it doesn't pickle well.


Well, Alt-TAL is an experiment to see how fast a pluggable and readable
version of TAL could be.

My first step was to construct a bytecode that is pickleable and is not
TAL-specific. This is PAX. I didn't yet announce PAX anywhere as it is
evolving fast to meet the needs of Alt-TAL, but I plan to make it a package
in its own right in the near future.

In Alt-TAL, rendering TAL is a PAX Transform. This dawned on me as a
result of a comment by Leo Almeida that TAL could probably be implemented as
a XSLT sheet.

Alt-TAL currently only implements the tal: namespace, and tal:on-error is
missing because it implies an exception-handling infrastructure which I
didn't yet even design. So, the reason I didn't announce Alt-TAL was that it
was so incomplete.

But in my tests (and I run tests on a very old ppc machine, so that I may
get a visual feel for the speed differences), the few input templates that
already pass, pass faster than with the original TAL.

Of course this experience has a long way to go. I need tal:on-error, then
all metal: stuff, then make a version of PageTemplate that uses Alt-TAL
(originally I planned Alt-TAL to be a drop-in replacement, but that would
impact performance very badly so I gave up), then benchmark and optimize and
benchmark and rinse and repeat.

In a very extreme case, PAX (or perhaps PAX transform) can be optimized into
C or Pyrex. As it has a lot of for loops, I assume this would be a gain.

Of course, as my design skills are stronger than my coding skills, and as my
optimizing skills are very very weak [;-)], I invite anyone interested in
this experience to join in.


[]s,
   |alo
   +
--
  It doesn't bother me that people say things like
   you'll never get anywhere with this attitude.
   In a few decades, it will make a good paragraph
  in my biography. You know, for a laugh.
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Eu jogo RPG! (I play RPG) http://www.eujogorpg.com.br/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/


___
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: [Zope3-dev] Are there Graphic Designers?

2002-04-07 Thread Lalo Martins

On Sat, Apr 06, 2002 at 10:52:27AM +0100, Adrian Hungate wrote:
 
 My question is this: Everyone is saying The ZMI is bad, it's confusing,
 users don't like it.

Which everyone? Not me.

 Could anyone show me evidence of this? Personally I
 love the ZMI in the current versions. I have also found there is a
 negligable learning curve for users who already know how to use Windows
 Explorer and similar products. I just don't see the need to throw out the
 ZMI - Are we in a baby/bathwater situation here?

We're not throwing out the ZMI. We're writing something similar for Zope3.
The name is ZopeTop.

[]s,
   |alo
   +
--
  It doesn't bother me that people say things like
   you'll never get anywhere with this attitude.
   In a few decades, it will make a good paragraph
  in my biography. You know, for a laugh.
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/


___
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: [Zope3-dev] Are there Graphic Designers?

2002-04-04 Thread Lalo Martins

On Thu, Apr 04, 2002 at 03:05:39PM -0600, Stephan Richter wrote:
 Hello everyone,
 
 as we are moving forward developing Zope 3 with large steps, it becomes 
 more and more desirable to think about a nice frontend (ZMI) for Zope 3.
 
 However the skill set of the developers currently working on Zope 3 does 
 not include good graphics design skills. For this reason the development 
 team is looking for one to two good graphic artists who would like to work 
 on the look and feel of the new Zope version. Since it is fully developed 
 from scratch, there are almost no restrictions, other than: It has to be 
 functional.
 
 Are there any takers?

I propose to base the Zope3 ZMI on the Plone CMF skin (designed primarily by
the talented Alexander Limi and Vidar Andersen with important coding by Alan
Runyan), which can be seen at http://plone.org.

I don't know if Limi  group are available to do the work themselves, unless
ZC hires them for the job, but I don't think they would object either. I
know at least Alan has a lot of interest in Z3.

As I'm skinning Plone/CMF for my primary job, I'd be willing to do (or
coordinate if other people want to help) the work of adapting the skin to
Zope3 needs.

[]s,
   |alo
   +
--
  It doesn't bother me that people say things like
   you'll never get anywhere with this attitude.
   In a few decades, it will make a good paragraph
  in my biography. You know, for a laugh.
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/


___
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] masquerading python products as functions

2001-07-11 Thread Lalo Martins

On Wed, Jul 11, 2001 at 11:38:20PM +1200, Mick wrote:
 Hi,
 
 I am trying to make a product act like an external method, or dtmlmethod.
 Basically I have taken the minimal product and added a __call__ function.
 It works fine, and can be called as a function of the object that contains
 it.  The problem is that the minimal objects namespace is also pushed onto
 the stack, and to get out of it I need to go through self.aq_parent.

You may want to try out Shared.DC.Scripts.Script.

I have a (preliminary) HOWTO at
http://www.zope.org/Members/lalo/scriptclass-dev

[]s,
   |alo
   +
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] RFC: How-To on subclassing Shared.DC.Scripts.Script.Script

2001-06-25 Thread Lalo Martins

I'm thinking here that subclassing Script is the way to go for
any object that needs finer control on how it is called - and
I'll say that of any class that doesn't just do

  index_html = HTMLFile(foo, globals())

So, I wrote a How-To. It's definitely not ready for prime-time,
as I haven't actually used it to implement a class, but I think
it's correct. I'd appreciate if people took a look at it and
commented both on correctness and clarity/usefulness.

It is at http://www.zope.org/Members/lalo/scriptclass-dev now;
this is a ZWikiPage, so you can comment right there. The real
address will be http://www.zope.org/Members/lalo/scriptclass
when it's ready.

[]s,
   |alo
   +
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] RFC: How-To on subclassing Shared.DC.Scripts.Script.Script

2001-06-25 Thread Lalo Martins

On Mon, Jun 25, 2001 at 06:36:30PM -0500, Stephan Richter wrote:
 
 But when I started reading it, I wanted to learn more of how I could 
 implement a new scripting language into Zope, such as a ZOQL (as mentioned 
 on the SmartObjects mailing list: 
 http://imail.iuveno-net.de/pipermail/smartobjects/), Tcl, XQuery or XPath. 
 Even though your usage of the Script-class is unique and obviously useful, 
 I think you should make a note, that will not describe how to implement 
 another scripting language. But other than that, I learned something new.

Thank you :-)

I don't think I could teach something as generic as this; the
process would be completely different for each language, and
depend on your interpreter. For starters, PythonScript and
ZopePageTemplates are completely different.

The classes to add new scripting languages would be similar up
to the point I described in my How-To, I'm afraid. Up from
there, it's you and your interpreter.

[]s,
   |alo
   +
--
Esvazie sua mente, pequeno gafanhoto.
   Nós temos muito o que aprender... mas primeiro...
   Primeiro você terá que desaprender o que acha que já sabe.
--
http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] ANNOUNCE: Zope 2.4.0 alpha 1 released

2001-06-01 Thread Lalo Martins

On Fri, Jun 01, 2001 at 07:33:43AM +1000, Albert Langer wrote:
 
 A note to component developers - as of Zope 2.4 ExtensionClass has not been
 updated to support all of the new magic protocols that Python classes
 support (we're hoping that EC will go away soon).
 
 What does hoping that EC will go away soon mean? I thought that
 ExtensionClass was pretty
 fundamental to Zope?? Does this just mean that the limitation on magic
 protocols will go away soon, or is there some URL I should look at re
 replacement for EC?

EC are a fix for a problem that shouldn't exist in Python
(inability to inherit from classes defined in C/C++).

By hoping that EC will go away soon, I assume they mean the
PythonLabs folks are working on fixing this for once in Python
itself. Right?

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] What would *you* like to have in PropertyManager and friends?

2001-05-27 Thread Lalo Martins

raise ZopeProject('http://dev.zope.org/Wikis/DevSite/Proposals/PropertyRevamp')

We at Hiperlogica realize a lot of you people prefer to write
your code in Python in the filesystem. However, we also believe
the power of Zope's trough-the-web RAD framework is one of the
reasons for its success; more importantly, it's a good part of
the reason it works for *us*.

In this spirit, we fired up HiperDom a few months ago, and
we're now working on ZUnitTTW to allow developers to unit test
their ZClasses and even their very sites.

Now, we've been taking note of a lot of peeves we have with
Properties, in the past one year or so. After all this time,
and dealing with some Zope internals, we feel confident enough
to propose to fix them.

So we're raising a Project in the fishbowl to implement these
changes. But before we dive in the mud, we'd like to hear from
people that really use Properties (and/or ZClasses), or that
would use them if they were more powerful. Please go to the
Proposal page, linked above, and tell us what you think.

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] zunit 0.2 comments

2001-05-01 Thread Lalo Martins

On Mon, Apr 30, 2001 at 09:34:53PM -0700, Simon Michael wrote:
 
 Zope or the codeit setup didn't seem to see things in
 INSTANCE_HOME/Shared and I don't have access to SOFTWARE_HOME/Shared.

Hmm. Rolled newspaper for them. :-)


 What's the reason for this new level of indirection, the
 ExternalTestCase object ? And do you think this name is appropriate ?
 (I am confused about tests vs test cases vs test suites)

It's a refactoring to prepare for 0.3, where we'll have the
actual TestCase object. This object will allow you to write
tests TTW.

Yes, we know a lot of you don't want to do that. Don't worry,
ExternalTestCase will always be there ;-) But you have to
realize that there are also a lot of people who just won't
touch Python code in the filesystem whenever possible. If
you're testing a ZClass-based Product, it would be completely
cumbersome to use PyUnit.

 Also, any ideas about the following which I get when running either my
 own tests or the samples:
(...)
 AttributeError: id

Mumble mumble. Probably API incompatibility between Zope
versions? We'll look further into it.

(Recent versions are deprecating direct access to the 'id'
attribute, specially because you don't know when it's a string
and when it's a method... we should have used getId())

We now have a SourceForge project, feel free to report bugs and
browse our open tasks to see where we're going :-)

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] zunit 0.2 comments

2001-04-26 Thread Lalo Martins

On Thu, Apr 26, 2001 at 01:21:01AM -0700, Simon Michael wrote:
  Hi Lalo,
 
  thanks for your work on ZUnit. I have just been playing with 0.2.

Thank you for your feedback.

  To get it working in my zope account at Codeit, I moved Hiper from
  Shared/ to Products/ and changed the import statements.

Why?

  I also needed to make some changes of this kind:
 
   #manage_RunTestsForm = 
Globals.HTMLFile('Products/ZUnit/dtml/TestRunner/RunTests')
   manage_RunTestsForm = 
Globals.HTMLFile('dtml/TestRunner/RunTests',globals())

Ooops :-) this proves that Pair Programming doesn't catch them *all*.

  I'm having trouble figuring out the syntax of the test_ids
  property. Can you help ?

Each line is the Id of an ExternalTestCase object. You can use
RestrictedTraversal, as in MyFolder/tests/MyTestCase.

[]s,
|alo
+
--
I say a prayer now our love's departed
 That you'll come back to stay
   Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
  pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/


___
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] WebDAV etc permissions (Re: zope nautilus cabal)

2001-04-18 Thread Lalo Martins

On Fri, Apr 13, 2001 at 11:48:39PM +0100, Chris Withers wrote:
  The WebDAV (and XMLRPC) stuff either needs to be decomposed to run on its
  own port (and only that port) or more explicit permissions need to be
  associated with WebDAV/XMLRPC operations if we take for granted that being
  able to browse the root folder structure is a bad thing.
(...)
 Basically, 'access contents information' isn't a great permission. If you
 turn if off, life gets horrible, if you leave it on, bits hang out. I'd
 prefer to see something like:
 - Access Contents Information via HTTP
 - Access Contents Information via FTP
 ..etc...

When I crawled out of bed today it ocurred to me that there is
a very reasonable sollution already.

We've had a "FTP access" permission for ages. So, either:

- make WebDAV, XMLRPC etc protected by "View Management Screens"

- make WebDAV, XMLRPC etc protected by "FTP access"

- make WebDAV, XMLRPC etc protected by "DAV/RPC access"
  (a new permission)

yes? 

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] Confused by accuisition, need help

2001-04-08 Thread Lalo Martins

On Sun, Apr 08, 2001 at 11:14:51PM +0200, Robert Rottermann wrote:
 Hi there,
 
 I need the help with the following situation:

The easiest way is to make more use of DTML and not try to bend
it so much:


   dtml-in expr="PARENTS[0].data()"
 OPTION selected value="dtml-var sequence-index"
   dtml-var sequence-item
 /OPTION
   /dtml-in

Instead, try just dtml-in data.


 Now my problem:
 in index_html I only would like to splice the various parts togezher. 
 
 Like so:
 some glue
 dtml-var expr="PARENTS[0].data.projects.show()"
 dtml-var expr="PARENTS[0].data.documents.show()"
 /some glue

Try this:

 some glue
 dtml-with data
 dtml-with projects
 dtml-var show
 /dtml-with
 dtml-with documents
 dtml-var show
 /dtml-with
 /dtml-with
 /some glue

Or something like that.

When you call stuff with "name=" instead of "expr=", you let
DocumentTemplate do the calling for you, and then your methods
will be called with the correct parameters.

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] Confused by accuisition, need help

2001-04-08 Thread Lalo Martins

BTW - you're not confused by Acquisition, you're confused by
DocumentTemplate's calling conventions (you can't call it with
zero parameters, not if you want it to work anyway)

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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] Can't _setObject???

2001-04-02 Thread Lalo Martins

Hi there

I just found out (while coding ZUnit 0.2) that ZUnit 0.1
doesn't work on Zope 2.3.x for some reason.

The method manage_startTests of the TestRunner class creates an
instance of TestResults, runs the tests with it (using
RESPONSE.write(), if this makes a difference), then adds it to
itself using self._setObject().

On Zope 2.2.x this works like a charm. On 2.3.x it doesn't
bomb, doesn't raise an exception and doesn't set my house on
fire, but the TestResults object simply isn't persisted.

We tried all kinds of desperate things, like setting _p_changed
on both TestRunner and TestResults, and doing a
get_transaction().commit() - nothing changes.

Out of curiosity, we enabled the addlist in TestRunner and sure
enough, you can add objects via the addlist and they persist
normally.

Anyone has a clue? Of all things that changed between 2.2 and
2.3, which one can be killing us like that?

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
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: [Zope] ANNOUNCE: Zope 2.3.0 alpha 1 released...

2000-12-13 Thread Lalo Martins

Found a bug, I think... when I try to add a property to a
PropertyManager (but not a PropertySheet?) I get:

Error Type: ImportError
Error Value: cannot import name checkValidId

Traceback (innermost last):
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /opt/Zope-2.3.0a1-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Traversable)
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_addProperty)
  File /opt/Zope-2.3.0a1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_addProperty)
  File /opt/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py,
line 318, in manage_addProperty
(Object: Traversable)
  File /opt/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py,
line 247, in _setProperty
(Object: Traversable)
ImportError: (see above)


[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar


___
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] ZUnit - feedback convocation

2000-12-06 Thread Lalo Martins

On Mon, Dec 04, 2000 at 02:56:26PM -0800, Michel Pelletier wrote:
 On Mon, 4 Dec 2000, Lalo Martins wrote:
 
  The first section is the advocacy section; it will begin with
  "if you already do unit tests, you may want to skip this
  section". I'm not sure if the history lesson is out of scope,
  but "Why do you want to use it" is probably better.
 
 Hmm... actually in that case you may want to axe both "why" and the history.

I agree. At most, one paragraph about each could go in "What
is Unit Testing".

   What does "refactor mercilessly!" mean?
  
  I'll explain that one of the benefits of unit testing
  extensively is that you can modify your code without fear
  (you'll know when it breaks). This section is more advocacy
  than technical.
 
 Ah, ok I like it.  I wonder if "refactor" is the right word; it's very
 specific and it sounds like any kind of changing can be done.

"Refactor Mercilessly!" is one of the "practices" of XP, and an
expression (XPression?) they like to throw around.

Also, yes, any kind of changing can be done, if the tests cover
it :-) (except that if you develop new functionality, you must
write new tests too)


  I allocated a subsection for this because just explaining the
  problem is already somewhat convoluted, as you see above ;-) in
  a printed book, I'd make it a sidebar or something, but...
 
 Hmm.  I guess my concern was because it was the only subsection of
 'Fixtures'.  Do fixtures need a more topical breakdown or are they
 simple enough to sum up in one section?  Maybe we can think of some
 'fixture use cases'.

I don't think so. I think I just broke the rules. When I added
this subsection I was thinking more about some kind of sidebar,
not a real subsection - fixtures definitely don't need their
own topical breakdown.

As there is no provision for "sidebars" or "boxes" in the
informal standard format we've been using for these docs,
I'll move the note about this issue one level up.

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] OracleStorage, and possibly others

2000-11-30 Thread Lalo Martins

On Thu, Nov 30, 2000 at 08:10:15AM -0500, Jim Fulton wrote:
 Lalo Martins wrote:
  
  Please help stamp out Data.fs! :-)
 
 I don't think Data.fs will go away.  I do expect it to be relagated to
 initial evaluation and development projects. Use of Berkely DB in
 transactional mode requires a significant andminstration commitment.
 Log files need to be purged. Backup and recovery processes need to be in 
 place. A similar cost is associated with using Oracle and many other databases,
 I expect. People aren't going to want to deal with these issues when 
 initially trying and learning Zope (or ZODB).

Sometime it will, I hope. Or at least, be relegated to non-Zope
ZODBs where the data volume is very small. But FileStorage will
not be replaced by any of the current alternatives, I agree.

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] ZUnit - feedback convocation

2000-11-30 Thread Lalo Martins

Hi all

I'trying to write a document on ZUnit and Unit Testing in
general, following Michel's and Amos' documentation process. I
wrote an outline, and now I'm stuck :-) anyone with a few free
moments is welcome to take a look and send me some words. Also,
anyone very interested in the subject is welcome to volunteer
for editorial help (read the Process to know what this means).

Thank you.

(BTW, if you can't understand what an "outline" is, read the
process too. Oh what the heck. If you haven't read it, then
read it, it's very cool reading anyway.)

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar


Unit testing Zope Products with ZUnit

  by Lalo Martins

  Unit Testing

What is Unit Testing

Where does it come from

How should it be done

Refactor mercilessly!

  Writing Tests
  
Importing ZUnit

The TestCase class

Interfacing with the Zope environment

Fixtures

  The persistence problem - leaving traces behind

Grouping tests in TestSuites

Wrapping it all up in a creator function
  
  Running the tests
  
The TestRunner object

TestResults objects

Leaving objects behind for debugging



Re: [Zope-dev] OracleStorage, and possibly others

2000-11-29 Thread Lalo Martins

On Wed, Nov 29, 2000 at 07:02:50AM -0500, Chris McDonough wrote:
  Of course it would, for the same reasons as OracleStorage (eg
  FileStorage/Data.fs is inefficient)
 
 Actually, it's the other way around.  OracleStorage is 30-to-50 times slower
 than FileStorage on writes.  Reads are slow too but the slowness is somewhat
 negated by caching.

Chris, that's only true for small databases. At about 100M of
Data.fs, OracleStorage starts being faster. It depends on
hardware too. We made some benchmarks on a major Brazilian
portal, and well, it's currently running OracleStorage.

Anyway, I said "inefficient", not "slow".

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] OracleStorage, and possibly others

2000-11-29 Thread Lalo Martins

On Wed, Nov 29, 2000 at 10:13:15AM -0500, Chris McDonough wrote:
 It sounds like you've done more comprehensive speed testing than we have.
 Can you share some numbers?

Unfortunately no, I can't. We made measurements during a
consulting job I did for another company, and it was made by
them, not me, *plus* I wasn't smart enough to save a copy of
the numbers :-/

Anyway, the biggest problem they had was stability, their ZODB
grows and shrinks insickening speeds, and Data.fs would break
for some reasons I don't remember anymore, and OracleFS solved
that. I'll try to convince them to write a report to the list.

 - Original Message -
 From: "Lalo Martins" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 29, 2000 8:42 AM
 Subject: Re: [Zope-dev] OracleStorage, and possibly others
 
 
  On Wed, Nov 29, 2000 at 07:02:50AM -0500, Chris McDonough wrote:
Of course it would, for the same reasons as OracleStorage (eg
FileStorage/Data.fs is inefficient)
  
   Actually, it's the other way around.  OracleStorage is 30-to-50 times
 slower
   than FileStorage on writes.  Reads are slow too but the slowness is
 somewhat
   negated by caching.
 
  Chris, that's only true for small databases. At about 100M of
  Data.fs, OracleStorage starts being faster. It depends on
  hardware too. We made some benchmarks on a major Brazilian
  portal, and well, it's currently running OracleStorage.
 
  Anyway, I said "inefficient", not "slow".


[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] BerkeleyStorage (Re: [Zope-dev] OracleStorage, and possibly others)

2000-11-29 Thread Lalo Martins

On Wed, Nov 29, 2000 at 04:28:26PM +, Ty Sarna wrote:
 Lalo Martins wrote:
  
  What about the other Storage projects? BerkeleyStorage has been
  dead for an year.
 
 It's not dead, it's just pining for the fjords!
 
 Seriously, AFAIK it still works, and it's mainly just stalled waiting
 for some interest.  It could stand to be updated to BerkeleyDB 3, but
 that was blocked on having an updated Python BerkeleyDB module for a
 while.  Now there is an updated version, so it should be easy to update
 the storage. 
 
 The main thing BerkeleyStorage is lacking is interest -- I don't need it
 currently for the purpose for which it was developed, and nobody else seems
 to need it much either.  It looked for a while like it might get a boost
 from the Sessions project, but that's stalled for the moment as well. 

I think a BerkeleyDB3-based Storage would be a very cool option
if versioning was optional instead of missing. (Then again,
this is almost getting to my dreamed XDeltaStorage...)

[]s,
   |alo
   +
--
  Hack and Roll ( http://www.hackandroll.org )
The biggest site for whatever-it-is-that-we-are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] License issues

2000-11-13 Thread Lalo Martins

On Mon, Nov 13, 2000 at 06:40:31PM +0100, Juan David Ibáñez Palomar wrote:
 
 has come to my ears that there's people who doesn't use Zope because
 its license is GPL-incompatible, more info here:
 
  http://www.fsf.org/philosophy/license-list.html#GPLIncompatibleLicenses

They say it's an instance of "the obnoxious advertising
clause". I tend to agree, this clause should be removed. All my
non-Zope software is GPLed, all my Zope software has a very
permissive X11-like license without the obnoxious adv. clause.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] OracleStorage, and possibly others

2000-11-13 Thread Lalo Martins

Well, two betas of OracleStorage in one day, then a month and a
half of silence. What's the status?

What about the other Storage projects? BerkeleyStorage has been
dead for an year, and I heard pretty nasty words about
InterbaseStorage. What about someone who wanted to try to port
OracleStorage to Postgres or some other RDBMS?

Please help stamp out Data.fs! :-)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] [Ann] ZUnit released

2000-11-01 Thread Lalo Martins

Okay, the cat is out of the bag (in fact, going to Rio for the
weekend) and the worms are out of the can (better worms than
bugs, anyway). ZUnit, the Product all lazy programmers were so
afraid of, is available for review and download from your usual
shop at http://www.zope.org/Members/lalo/ZUnit completely FREE,
from the hands of your friends Lalo and Hiperlógica!

In comemoration of the release, we're holding the "meta-testing
contest": Whoever contributes some unit tests for ZUnit itself,
will win her name in the credits, plus a better and more stable
Product in the future, and an exclusive Warm Fuzzy Feeling (TM)!

Don't miss this oportunity! Check it out right now!

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Streaming?

2000-10-29 Thread Lalo Martins

Is it possible to "stream" (send data to the client via HTTP
incrementally) from Python code, or does ZPublisher only send
the data as a single wad when the method returns?

Assuming it is possible, obviously it requires using some other
API rather than just 'return'ing a string... where can I find
documentation and/or examples on that? If there is no existing
documentation or examples, source code would do.

(Context: when the tests are running on ZUnit, I'd like to give
some visual feedback, if possible by sending the dots returning
by PyUnit in real-time)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Streaming?

2000-10-29 Thread Lalo Martins

On Mon, Oct 30, 2000 at 12:23:36PM +1100, Terry Kerr wrote:
 Isn't that dependant on the protocol u are using to transfer the data?
 HTTP can't do streaming.  You can sort of do streaming using the
 experimental multipart content type, but IE browers don't recognise it,
 so it is pretty useless.

What are you talking about? Try to load any standard html page
with a very slow connection. If you just send the data slowly,
the browser will show it as it is received. That's streaming.

You can point an mp3 or realaudio player at an URL and it will
download the file and play it as it arrives.

That's the kind of streaming I want to do.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Streaming?

2000-10-29 Thread Lalo Martins

On Mon, Oct 30, 2000 at 12:48:53PM +1100, Terry Kerr wrote:
 That is not streaming.  That is just as you said..lack of bandwidth delaying
 the entire page arriving at once at you browser.  That is not contolled.  The
 server doesn't send it 'bit by bit' in a controlled manner.

But if it did, the results would be exactly the same. Actually,
that's exactly what most people refer to when they say
"streaming".

This is getting way off-topic. I want to know if there is an
API for that, not to discuss the meaning of the word.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Unit testing, ZUnit - It is in the fishbowl, please comment

2000-10-26 Thread Lalo Martins

The proposal below is in the fishbowl, at
http://dev.zope.org/Wikis/DevSite/Proposals/UnitTestingProducts

The approach will be, developing the standalone ZUnit Product
while the proposal is in the fishbowl, then push for the
proposal (integrating it with App/Product*.py). Expect a first
release of ZUnit next week or in the other.

In the meanwhile, please comment in the proposal's discussion
page :-) (or here)


On Mon, Oct 23, 2000 at 10:56:31PM -0200, Lalo Martins wrote:
 We (I and Hiperlógica) started to develop a Product we called
 ZUnit, intended for XP-style unit-testing Python-based
 Products in a full Zope environment (with a real ZODB, REQUEST,
 RESPONSE, etc).
 
 We first conceived it as a kind of Zope-based version of
 unittestgui.py - you create a "TestRunner" object giving it the
 package, module and name of a TestSuite object generator (see
 the PyUnit documentation) and inside it you may click on some
 widget to run the tests and produce a "TestResult" object which
 you can inspect later. Does this sound like a good design?
 
 Then I figured in the long run a Product isn't the best
 sollution; instead, fiddling with App/Product* sounds more like
 it, to allow developers to register tests just like they
 register classes, ZClass superclasses, _misc and help. Of
 course, just like the current registerHelp and others, it
 wouldn't be mandatory and not using it wouldn't break anything.
 
 Then, in the Product's page in the Control Panel, there would
 be a tab "Test", where you'd be allowed to run the unit tests.
 
 What do people think of this? What does DC think of this? Can I
 go ahead and develop it in this direction?



[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Unit testing, ZUnit

2000-10-23 Thread Lalo Martins

We (I and Hiperlógica) started to develop a Product we called
ZUnit, intended for XP-style unit-testing Python-based
Products in a full Zope environment (with a real ZODB, REQUEST,
RESPONSE, etc).

We first conceived it as a kind of Zope-based version of
unittestgui.py - you create a "TestRunner" object giving it the
package, module and name of a TestSuite object generator (see
the PyUnit documentation) and inside it you may click on some
widget to run the tests and produce a "TestResult" object which
you can inspect later. Does this sound like a good design?

Then I figured in the long run a Product isn't the best
sollution; instead, fiddling with App/Product* sounds more like
it, to allow developers to register tests just like they
register classes, ZClass superclasses, _misc and help. Of
course, just like the current registerHelp and others, it
wouldn't be mandatory and not using it wouldn't break anything.

Then, in the Product's page in the Control Panel, there would
be a tab "Test", where you'd be allowed to run the unit tests.

What do people think of this? What does DC think of this? Can I
go ahead and develop it in this direction?

(I will create a proposal in dev.zope.org, but I want to get
some feedback here first to flesh out the proposal a little
more.)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Strange Error - in collector yet?

2000-10-07 Thread Lalo Martins

On Thu, Oct 05, 2000 at 10:01:15AM +0100, Chris Withers wrote:
 Lalo Martins wrote:
  
  This is on Zope 2.2.1. I'd really appreciate some clues on how
  to bust these ghosts.
 
 Have you put a full description in the bug collector yet?

Now it is. It was assigned number 1676.

I also busted my ghosts - by manually manipulating the ZODB via
Python. Felt kind like a brain surgery - on myself, using a
paperclip, a pencil and a pocket mirror. But it worked.

(To the tune of the Ghostbusters Theme by Ray Parker Jr.)

"An invisible ZClass sleeping in your bed? Who you're gonna
call? Py-thon!"

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDom 0.1 is out

2000-10-02 Thread Lalo Martins

We released HiperDom 0.1 Saturday (this message is dated Monday
because it's when the objects got cataloged).

This version is Python-based, fully functional to the last
letter of the spec (except for hdom:method where we cleaned up
the interface a bit), fully HelpSys'ed, heck, it even has an
icon.

Oh, it has an undocumented feature too. Actually lots of 'em;
I have to write about manage_getTemplate somewhere for the next
version... but what I'm talking about right now is the hdom:id
directive used for creating "assets" like we discussed
previously in the "HiperDOM and xmlc" thread.

When you expand a section marked with hdom:text, before
discarding the contents, the engine hunts for elements marked
with hdom:id in it. Those found are added to the namespace.

...
p hdom:text="greeting"This paragraph will be replaced by a
greeting to span hdom:id="person"Lalo/span and span
hdom:id="company"Hiperlógica/span./p
...

The method "greeting" will be executed with a namespace as **kw
(I don't know how flexible is this, but it's how DTML does it).
In this namespace there will be at least
{'person': 'spanLalo/span', 'company': 'spanHiperlógica/span'}.

This feature isn't documented on purpose, since this subject is
far from settled and it is very possible that this isn't the
best sollution. But it's _a_ sollution and it's there to be
tested - "running code" :-)


We'll be away from this code for about two weeks, as we have an
urgent job to deliver to a big customer whose identity is so
ironic that I'll have to tell you folks as soon as I'm sure I'm
allowed to.

Anyway, I'd like everyone interested to try it out in this
meantime, send us your feedback, and discuss it here and/or on
the HiperDomWiki. I'll have an eye (and a few fingers) on this
discussion.

Thank you for your time, have a nice day. :-)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] ZPL HowTo?

2000-09-29 Thread Lalo Martins

We wished to release the new development version of HiperDom
under the ZPL, but we figured it wouldn't be that simple, as
the license text is all littered with "Digital Creations".

Is it just a matter of s/Digital Creations/Hiperlógica/g? Is
this even legal?

(This message is mostly rethorical, because we already decided
to just release it under the MIT-X11 license anyway, but I feel
this question should be discussed if people want to release
stuff under the ZPL in the future.)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-18 Thread Lalo Martins

On Mon, Sep 18, 2000 at 03:12:14PM -0400, Shane Hathaway wrote:
 [EMAIL PROTECTED] wrote:
   So the standard_page_template default wrapping is an attempt at a
   compromise.
  
  It's wrong.
 
 Please elaborate your position. :-)
 
 Why is it wrong?

Because, as we said, the HiperDOM/xHTMLTemplate template is
already a "view", already part of the presentation layer. The
standard_page_template default wrapping is an attempt to
conjure a new "meta-presentation" layer out of nothing.

It solves a problem but creates more, because most people will
_not_ want the wrappers at all. Wrappers re-create the infamous
"source vs. rendered issue" and there's no easy way out of
that; they may be an useful functionality, but they're an UI
nightmare.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] User objects on 2.2

2000-09-18 Thread Lalo Martins

On Sun, Sep 17, 2000 at 11:22:49PM -0300, Lalo Martins wrote:
 Why doesn't Anonymous have permission to call has_permission on
 itself? This is counter-intuitive to say the least...

Ooops... they have, kind of. The Anonymous user object inherits
the permissions from the top-level User Folder (/acl_users).
This is kind of weird and should be documented, but is usable.

(So, to allow Anonymous to call has_permission on itself you
have to enable "Access content information" for Anonymous on
/acl_users)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-17 Thread Lalo Martins

On Sun, Sep 17, 2000 at 12:42:00PM -0400, Paul Everitt wrote:
 [EMAIL PROTECTED] wrote:
  BTW, please don't call the solution "xHTML Template"; it's not
  xHTML, it's generic XML - it can easily be used for RSS or WML
  or MathML or NewsML for example.
 
 While it *can* be used that way (just as DTML can be used to send mail
 messages), that's not the real intent of this proposal nor is that the
 real audience.  Our proposal it focused on letting HTML-oriented people
 with HTML-oriented tools create compliant stuff for the presentation
 job.

Why? WML-oriented people with WML-oriented tools would benefit
from it just as much, for example. (Are there WML-oriented
tools already?)

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-17 Thread Lalo Martins

On Sun, Sep 17, 2000 at 03:51:35PM -0400, Shane Hathaway wrote:
 [EMAIL PROTECTED] wrote:
  
  Why? WML-oriented people with WML-oriented tools would benefit
  from it just as much, for example. (Are there WML-oriented
  tools already?)
 
 What Paul is saying is that we need to make it work for XHTML first.  It
 makes it easier to talk about with those less familiar with XML
 (especially XML namespaces.)  Then with a very small amount of work we
 can expand it to all XML schemas.

I can see how this makes sense as a strategy, but technically
it just doesn't... we're not using any features specific to
xHTML, and by all means we shouldn't. So, the way it is today
it already works with any XML schema.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] User objects on 2.2

2000-09-17 Thread Lalo Martins

Why doesn't Anonymous have permission to call has_permission on
itself? This is counter-intuitive to say the least...

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-15 Thread Lalo Martins

On Fri, Sep 15, 2000 at 08:21:21AM -0400, Paul Everitt wrote:
 
 I'm surprised that no one responded to this.  (Or maybe people did and
 our continual email server problems have lost it.)

Me too.

 I'd like to congratulate Hiperlogica, because they have (ding ding ding)
 the _right answer_! :^)

Thank you :-) We feel good about this answer too.

 Seriously, we at Digital Creations have been quietly formulating a
 proposal on this since Amos put up the template proposal in
 dev.zope.org.  I floated some trial balloons at EuroZope and it's clear
 there's some consensus.

Glad to know that.

 Our "XHTML Templates Proposal" is at:
 
   http://dev.zope.org/Wikis/DevSite/Proposals/XHTMLTemplatesProposal

It is not linked on the Proposals FrontPage...

--

Anyway, at least for HiperDOM I feel comfortable with the word
"template" because that's what it is about. The two primary
motivations for the design are:

* You can create the layout with any XML-compliant editor; if
the template is xHTML, you can use a XHTML-compliant WYSIWYG
tool. Or, thanks to the modern XML technology, you can use a
WYSIWYG HTML tool and pass it trough a SGML-XML filter to get
xHTML.

  Using specialized webdesigners with Zope project has been one
of the biggest pains in Zope development; we have to take the
sometimes ugly code generated by the tools they use, usually
clean it up, then insert the DTML tags in it. Making changes to
the design is a nightmare.

* The template looks like the rendered page; if you don't want
to fire up Zope, or if the application logic is not yet
finished, you can preview the layout by simply loading the
template in a browser.

These goals are similar, but not identical to the ones in the
proposal. Still, some parts of the proposal felt like extracted
rigth out of my mind :-)

I don't feel good about calling the layers "document" and
"view" or "presentation" and "data" because the "view" is not
strictly presentation code; invariant (static) parts shared by
all pages rendered with that template can be in the template.
As much as we all like to talk about "Web Applications", this
is not exactly like "normal" application design, where you can
draw a clear line between presentation and data (or model/view).

--

The only thing I _don't_ feel good about this kind of template
is that, in practice, we will probably lose the benefits of
things like dtml-var standard_html_header - meaning, when you
want to change the header of your site, you'll have to edit all
your templates.

Of course a site where this is a problem still _can_ use
"includes" like standard_html_header, but I believe most won't.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-15 Thread Lalo Martins

On Fri, Sep 15, 2000 at 03:17:00PM -0400, Shane Hathaway wrote:
 [EMAIL PROTECTED] wrote:
  The only thing I _don't_ feel good about this kind of template
  is that, in practice, we will probably lose the benefits of
  things like dtml-var standard_html_header - meaning, when you
  want to change the header of your site, you'll have to edit all
  your templates.
 
 I agree this is a problem, and speaking from experience, changing all
 templates is not an acceptable compromise.  For www.zope.org that would
 mean including the standard template in nearly every page, everywhere,
 because the pages on www.zope.org are nearly all "templates"
 themselves.  We would lose one of the primary benefits of Zope.

But using external fragments ("includes") is not a natural idea
for web designers. One of the main points of this fuss is to
allow them to create the templates in something like Dreamweaver.

 Another unacceptable compromise is including a variant of
 standard_html_header and _footer on every page (as is done now).  One
 reason is because it is not possible to write
 standard_html_header/_footer using well-formed XML.  The header begins
 the "html" tag, while the footer ends it.  In fact, most sites these
 days put the beginning of a table in _header and the end of the table in
 _footer.  Objects containing non-well-formed XML aren't compatible with
 a DOM-based solution.

I hadn't thought of this.

Of course you can already use "includes" which are valid XML,
such as a single row or cell of a table (for example, the
navbar of a complex site).

 This has been one of the points of discussion here at DC.  The only
 reasonable solution we've come up with is automatically wrapping the
 results of the rendering in an acquired object with a fixed name such as
 standard_page_template.

I don't like fixed names :-) what if I don't want to wrap a
particular template?

One sollution that could possibly work:

HiperDOMDocument at /foo/bar/somepage:

html hdom:wrapper="site_template"head
titleThis will be overridden by the wrapper template/title
/headbody
This will not appear in the document.
div hdom:id="someVariableName"
This will appear in the document.
/div
/body
/html



HiperDOMDocument at /site_template:

htmlhead
title hdom:text="title"Document title goes here via
aquisition/title
link rel=stylesheet href="http://yoursite.com/site_css"
type="text/css"/
/head
body bgcolor="white"
table border="0" cellpadding="0" cellspacing="0"
tr
td bgcolor="#6699cc" hdom:text="navbar"
  Here goes the site navbar, which can be replaced by a
  subsite-specific navbar thanks to aquisition/td
td hdom:text="someVariableName"
  Here goes the actual body of the template, acquired from the
  calling (wrapped) template via the hdom:id attribute/td
/tr
/table
/body
/html



To add even more sugar, there could be a button in the
management interface of the "somepage" document to
automagically merge it with the (current) wrapper so that it
reads:

html hdom:wrapper="site_template"head
title hdom:text="title"Document title goes here via
aquisition/title
link rel=stylesheet href="http://yoursite.com/site_css"
type="text/css"/
/head
body bgcolor="white"
table border="0" cellpadding="0" cellspacing="0"
tr
td bgcolor="#6699cc" hdom:text="navbar"
  Here goes the site navbar, which can be replaced by a
  subsite-specific navbar thanks to aquisition/td
td hdom:text="someVariableName" hdom:id="someVariableName"
This will appear in the document.
/td
/tr
/table
/body
/html

This would make the Dreamweaver freaks happy, I think.


BTW, please don't call the solution "xHTML Template"; it's not
xHTML, it's generic XML - it can easily be used for RSS or WML
or MathML or NewsML for example.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] HiperDOM xmlc

2000-09-13 Thread Lalo Martins

We (I and Hiperlogica, a company I consult with) have been
developing a template renderer with similar intent to xmlc
(be based on XML/DOM, allow the template to be previewed and
edited using tools not aware of the format, such as xHTML
editors, and enforce presentation/logic separation).

As the project is somewhat on hold while we have more pressing
issues, I decided to share the current (rather kludgy)
prototype with the community. It is at
http://www.zope.org/Members/lalo/HiperDOM/

On Mon, Sep 11, 2000 at 02:06:08PM +, Jason Spisak wrote:
 Zope Devers,
 
 THis is going to seem strange coming from someone who hasn't been on the
 list in a long time, but I was at the Linux Expo in San Jose, and sat in on
 a Web app talk.  Lutris was in charge of the panel, and they talked about
 xmlc.  I went to their booth and asked about it. I think it could be the
 best way to get hard-core python people to jump on zope's band-wagon, and
 stop the dtml frowning.
 
 If you who are in the know about zope have time, please read a quick bit on
 what it is.
 
 http://xmlc.enhydra.org
 
 Especially the tutorial:
 
 http://staff.plugged.net.au/dwood/xmlc/index.html
 
 Is there any obvious reason why Zope wouldn't benefit tremendously from
 this design and programming separation and pure python boost?

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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: [Zope] :xxx syntax (was: HTML Editors that recognize DTML)

2000-06-27 Thread Lalo Martins

On Fri, Jun 23, 2000 at 07:49:21PM -0400, Jon Franz wrote:
 
 Also, its not XML compliant either, but I have a shorter dtml syntax patch
 available for download at:
 
 http://www.zope.org/Members/Coventry/dtml_shortcut
 
 it is a really small patch, and just allows : to replace dtml- or !--#
 inside your documents, such as in the snippet below:
 
 :var foo
 :if expr="la=lala"
 So you think la and lala are the same!?
 :else
 Ah, so you see a diffrence!
 /:if

I like this syntax; I'm in favour of adding it to a future
version of Zope (2.2.1?).

Except that your patch says it's GPLed, and GPL code cannot be
added to a ZPL product; please re-release as ZPL (I'm all in
favour of GPL, but this is not a good case for it :-) )

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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] Basic LoginManager HowTo

2000-06-02 Thread Lalo Martins

On Fri, Jun 02, 2000 at 07:29:18PM -0600, Bill Anderson wrote:
 Has anyone out there actually sarted _using_ LoginManager with ZODB
 storage? IOW, one that is not dependant on LDAP/SQL/etc., but that is
 functioning in place of a non-PTK acl_users folder? 

I tried. It's quite easy, except that you have to store the
user's password in a property, and access control is somewhat
broken WRT passwords, so anyone can read anyone's passwords if
they can write DTML.

Now I don't plan to just let anyone write DTML, but I don't
want to leave this hole open because I know I will forget it
sooner or later and open up an exploit.

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
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 )