Problem Creating Instances Mysteriously Solved
While we have no idea why this is the case, my incredible Zope hosting dude, David Elkins (hurrah.com) and I managed to get my code working so that I can now create instances of my own ZClasses reliably. We only did two things. We took the code that should have worked and didn't, copied it, and pasted it into a new DTML Method object with a different name (we called it 'test' instead of 'startClearing'). We restarted the back end of the Zope server. Now it works. It even works in its original form and name. No clue why. Frankly, only mildly interested in the reason. It works. I must, however, say that this has shaken my confidence in Zope a bit even though I am acutely aware that there could be dozens of non-Zope reasons for this to happen. This was just too weird and it cost me 21 unbillable hours. Weird.
Dan Shafer wrote:
While we have no idea why this is the case, my incredible Zope hosting dude, David Elkins (hurrah.com) and I managed to get my code working so that I can now create instances of my own ZClasses reliably. We only did two things.
Well, to be honest, if you're relying on ZClasses for anything other than amusement and frustration, then you could be in for a bumpy ride... cheers, Chris
Chris..... I cannot TELL you how much I appreciated that response. I was about to build a fairly major application around ZClasses. If your caution is accurate -- and I've been lurking this list long enough to know your capabilities to some extent and your credibility to an even greater degree -- then I'm going to switch strategies NOW before I get into more trouble. I'm not really a heavy-duty programmer. I'm more of a scripter who glues things together. I design great software and engaging, usable user interfaces but I'm frustrated at the lack of depth in UI capabilities the Web browser offers, which is why I've been looking at other solutions. I'm going to wait a day or so and see if anyone jumps in who disagrees with your assessment but if, as I suspect, you are right, then I'm going to be outta here and finding a better solution to my Web application needs. At 05:50 PM 4/20/2002 +0100, Chris Withers wrote:
Dan Shafer wrote:
While we have no idea why this is the case, my incredible Zope hosting dude, David Elkins (hurrah.com) and I managed to get my code working so that I can now create instances of my own ZClasses reliably. We only did two things.
Well, to be honest, if you're relying on ZClasses for anything other than amusement and frustration, then you could be in for a bumpy ride...
cheers,
Chris
Dan Shafer wrote:
I'm going to wait a day or so and see if anyone jumps in who disagrees with your assessment but if, as I suspect, you are right, then I'm going to be outta here and finding a better solution to my Web application needs.
Hmmm, better solution meaning non-Zope? Well, that, of course, was not my intention :-) My beef with ZClasses is that I just never seem to find a need for them. All you really need are very dumb data objects (I tend to use DTML Documents, although any PropertyManager will do...) and Python Scripts and ZPT... If you can explain a bit more about your app I'd be happy to give some pointers on how I'd tackle it. NB: This may, of course, not be the _right_ way, but... cheers, Chris
No, not necessarily non-Zope. I love Zope. The problem is I've spent a lot of years developing an object mentality so I tend to design and think in terms of objects rather than, as you say, "dumb data objects." OO is one of the big reasons I'm drawn to Python and thence to Zope. The application is a little hairy to describe in a short enough space to justify taking up list bandwidth, but I'll give you a quick summary. Obviously, any insights you have as to a solid Zope approach would be more than welcome. I've spent a ton of time on this already and although I think I'm getting close to understanding how to do it, I've thought that a few times and been wrong every time! My client's business involves a sort of therapeutic process. Clients engage in a process called a "clearing." Each clearing has associated with it an arbitrary number of "clearing images", a number which cannot be determined in advance or bounded. Within each Clearing Image is, among other properties, a collection of short text descriptions which, again, can occur in any number from 12 to (theoretically) infinity. So this seemed to me to cry out for objects. A Clearing Object contains one or more Clearing Image Objects which in turn contain 12 or more Emotional Pattern Objects. All of these objects have properties, of course. Now, in point of fact, this is largely just data. There isn't the usual OO notion of having methods packaged with the data that operates on the data because the interaction with the data is largely quasi-monolithic. The user is a professional who conducts a clearing in person or over the phone with a client. He or she fills out HTML forms as the client describes responses to questions and to visual images. As I looked at using a relational DB model for this, it seemed to me that the levels of relationalilty involved would get kind of tricky and I'm not really a database whiz. (I'm not a Zope whiz, either, but if I'm going to spend time mastering something, I'd sure rather have it be Zope than SQL! I know a good bit of SQL but I hate mucking about with it.) There is so much about Zope that I love as a Web application delivery platform. But I need, e.g., a simplistic, non-Zope interface (i.e., a sort of "standard" UI) for the user to start a new clearing, edit an in-process clearing, and search for patterns among clearings. I didn't see a straight-forward way to do this with dumb documents; creating a new clearing, e.g., if a Clearing were a DTML document rather than a ZClass, seemed to me to be convoluted at best. But I'm sure open to suggestions! At 08:15 PM 4/20/2002 +0100, Chris Withers wrote:
Dan Shafer wrote:
I'm going to wait a day or so and see if anyone jumps in who disagrees with your assessment but if, as I suspect, you are right, then I'm going to be outta here and finding a better solution to my Web application needs.
Hmmm, better solution meaning non-Zope? Well, that, of course, was not my intention :-)
My beef with ZClasses is that I just never seem to find a need for them. All you really need are very dumb data objects (I tend to use DTML Documents, although any PropertyManager will do...) and Python Scripts and ZPT...
If you can explain a bit more about your app I'd be happy to give some pointers on how I'd tackle it. NB: This may, of course, not be the _right_ way, but...
cheers,
Chris
Sometimes ZClasses can get wedged -- I don't know the details on when, but one workaround is to delete the last character from the class ID (usually an equal sign) and then add it back again (two separate changes). That will usually re-attach broken ZClasses in my experience. On Friday, April 19, 2002, at 08:26 PM, Dan Shafer wrote:
While we have no idea why this is the case, my incredible Zope hosting dude, David Elkins (hurrah.com) and I managed to get my code working so that I can now create instances of my own ZClasses reliably. We only did two things.
We took the code that should have worked and didn't, copied it, and pasted it into a new DTML Method object with a different name (we called it 'test' instead of 'startClearing').
We restarted the back end of the Zope server.
Now it works. It even works in its original form and name.
No clue why. Frankly, only mildly interested in the reason. It works.
I must, however, say that this has shaken my confidence in Zope a bit even though I am acutely aware that there could be dozens of non-Zope reasons for this to happen. This was just too weird and it cost me 21 unbillable hours.
Weird.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Now *that's* weird! Thanks for that note, Matthew. I could have spent a lot of time looking for that kind of non-obvious solution. At 07:26 AM 4/22/2002 -0400, Matthew T. Kromer wrote:
Sometimes ZClasses can get wedged -- I don't know the details on when, but one workaround is to delete the last character from the class ID (usually an equal sign) and then add it back again (two separate changes). That will usually re-attach broken ZClasses in my experience.
On Friday, April 19, 2002, at 08:26 PM, Dan Shafer wrote:
While we have no idea why this is the case, my incredible Zope hosting dude, David Elkins (hurrah.com) and I managed to get my code working so that I can now create instances of my own ZClasses reliably. We only did two things.
We took the code that should have worked and didn't, copied it, and pasted it into a new DTML Method object with a different name (we called it 'test' instead of 'startClearing').
We restarted the back end of the Zope server.
Now it works. It even works in its original form and name.
No clue why. Frankly, only mildly interested in the reason. It works.
I must, however, say that this has shaken my confidence in Zope a bit even though I am acutely aware that there could be dozens of non-Zope reasons for this to happen. This was just too weird and it cost me 21 unbillable hours.
Weird.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Chris Withers -
Dan Shafer -
Matthew T. Kromer