Sophisticated Editing of Zope Objects
I am new to using Zope. It looks very interesting, but one thing that appears to be a weakness is the way you edit DTML Documents and Methods (and other objects too for that matter) by using a simple text field in an HTML browser. For complex objects this looks like a serious problem. Other than exporting the object, editing it in a more sophisticated browser and importing it again, are there better solutions? Thanks for the help. Dan ------------------------------------------------- Dan R. Schenck mailto:schenck@posc.org Business Unit Manager http://www.posc.org POSC, Suite 275 10777 Westheimer Houston, TX 77042 voice: +1 (713) 267-5166 fax: +1 (713) 784-9219 -------------------------------------------------
On Thu, Jan 13, 2000 at 04:49:18PM -0600, schenck wrote:
I am new to using Zope. It looks very interesting, but one thing that appears to be a weakness is the way you edit DTML Documents and Methods (and other objects too for that matter) by using a simple text field in an HTML browser.
For complex objects this looks like a serious problem. Err, how do you mean? With custom Z-Classes and Products, you get to design the user interface that is used to manage the object. The sky's the limit, conceivably you could use Java applets et. al to make the editing easier.
If, on the other hand, you are talking about DTML Documents and Methods, what features are you missing from the traditional text-box approach?
Other than exporting the object, editing it in a more sophisticated browser and importing it again, are there better solutions? Since your question was extremely vague, I can't offer anything concrete. Clarify your question. What do you mean by "more complex objects". Long DTML Documents? Split them up into short DTML methods and include them into one "wrapper" DTML document.
-- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
Stephen Pitts wrote:
Other than exporting the object, editing it in a more sophisticated browser and importing it again, are there better solutions? Since your question was extremely vague, I can't offer anything concrete. Clarify your question. What do you mean by "more complex objects". Long DTML Documents? Split them up into short DTML methods and include them into one "wrapper" DTML document.
Perhaps he meant ways to edit DTML code? You can use HTTP-PUT, FTP or WebDAV to communicate with Zope to edit DTML code, besides using the Zope management interface. Regards, Martijn
Howdy, I'm just about to start a large web-based project. Lots of files, SQL backend, user logins, etc. Something like themes.org, slashdot.org, or freshmeat.net. I'm considering starting it with Zope, which I have only recently discovered. However, I have the following "fears": 1) It will be too slow How does the integrated ZServer compare to, say, Apache or Netscape Enterprise Server? Is ZServer the fastest way to use Apache? 2) I will get trapped into the product I don't know Python. I *do* have experience with Perl and some PHP. If I spend a bunch of time learning DTML, will I still wind up getting forced into using Python, a language I have no experience with? 3) I won't be able to do what I'm used to I read that ZServer doesn't support virtual hosts. So if I want to manage several websites through Zope, does that mean I need a separate IP Address for each website? Or would all of my URLs need to look like http://server/Site1 http://server/Site2 etc. Also, is there anyway to use PHP on a Zope-managed website? Is it possible to use regular CGI programs through ZServer as well as the Zope Objects? I really, really like the security in Zope and the pretty user management interface. It prevents me from having to create all that crap from scratch in PHP if I want to delegate tasks to non-Unix people. Any feedback, examples of current similar sites (vanilla Squishdot sites need not reply :), statistics, or suggestions are welcome. Thank You, Derek Simkowiak dereks@kd-dev.com
* Derek Simkowiak (dereks@kd-dev.com) [000114 01:55]:
I'm considering starting it with Zope, which I have only recently discovered. However, I have the following "fears":
2) I will get trapped into the product I don't know Python. I *do* have experience with Perl and some PHP. If I spend a bunch of time learning DTML, will I still wind up getting forced into using Python, a language I have no experience with?
I wouldn't worry about *python*, just work through the tutorial (at www.python.org) and look for stuff in the library reference (same place). Just remember that the python way isn't using regexps for everything and you'll be fine. Fear is the mindkiller etc. *But*: (there always is, huh?) The learning-curve of Zope appears to be S-shaped, and the steep part is *very* steep. I'm there now, I ought to know :) Though since you've dabbled in perl I don't think dtml will scare you... k.
discovered. However, I have the following "fears":
2) I will get trapped into the product
*But*: (there always is, huh?) The learning-curve of Zope appears to be S-shaped, and the steep part is *very* steep.
I'm a C programmer by profession, so I'm not worried about it. I'm more worried about investing two months into DTML and "Zope Object" designs and code only to find out that the server load is too high, or that I can't do something that I'd like to, and then have to restart the project with Apache, PHP, Perl/CGI, etc. --Derek
On Thu, 13 Jan 2000, Derek Simkowiak wrote:
discovered. However, I have the following "fears":
2) I will get trapped into the product
*But*: (there always is, huh?) The learning-curve of Zope appears to be S-shaped, and the steep part is *very* steep.
I'm a C programmer by profession, so I'm not worried about it. I'm more worried about investing two months into DTML and "Zope Object" designs and code only to find out that the server load is too high, or that I can't do something that I'd like to, and then have to restart the project with Apache, PHP, Perl/CGI, etc.
I would expect Zope to compare favorably with other dynamic content solutions. ZServer although written in python is quite fast. Medusa (on which ZServer is based) should be at least as fast as apache in serving dynamic pages, and Zope is certainly faster than straight cgi solutions. Zope is really composed of three pieces, an object database, the object publisher, and DTML. Zope is actually a framework based on these building blocks. Having used each component independantly I can say that they are all pretty fast and powerful. Now Zope adds overhead in terms of a security model, acquisition etc but you would have to design those for your case anyway. Remember also that DC is highly concerned about scalability issues and they already provide solutions like the ZEO, a distributed version of ZODB. In terms of component access I would think that Zope is the best solution on the market, as it is based on python, which is easily extended in C or C++ and has a very active community. If you want actual numbers I suggest you write a small application and serve it directly from ZServer (I can send you one if you want) and compare it with one written in Perl/CGI PHP. Pavlos
I would expect Zope to compare favorably with other dynamic content solutions. ZServer although written in python is quite fast. Medusa (on which ZServer is based) should be at least as fast as apache in serving dynamic pages
Not even close. I can write an application in C, as an apache module, that can do 1000 transactions/second on a machine that zope does 150 on. However, the development cycle is SO much faster in zope that it is worth it. When was the last time you needed 1000 TPS, anyway. IIS/ASP is even faster (and even uglier to develop for, in my opinion). I do suspect that Zope is probably in the same ballpark as ColdFusion, which is closest in functionality. I have never benchmarked CF, though. --sam
Derek Simkowiak wrote:
Howdy, I'm just about to start a large web-based project. Lots of files, SQL backend, user logins, etc. Something like themes.org, slashdot.org, or freshmeat.net.
I'm considering starting it with Zope, which I have only recently discovered. However, I have the following "fears":
1) It will be too slow How does the integrated ZServer compare to, say, Apache or Netscape Enterprise Server? Is ZServer the fastest way to use Apache?
ZServer's HTTP server is probably the fastest way to use Zope, yes... but as I understand it, Zope with an Apache front-end is pretty fast with FastCGI too. Depending on your hardware, you can probably expect to be able to sustain between 15-80 hits/sec. Not nearly as fast as static pageserving, probably not as fast as mod_perl or ASP, but not too bad considering Zope's level of dynamicism. If a majority of page hits come in a 10-hour period, even if Zope limped along at 15 hits/sec, this would mean you could serve 540,000 page hits in that period. Bruce Perens reports that his Zope site (technocrat.net) went through a number of Slashdottings and served nicely. For all the magazine talk about everybody needing something capable of sustaining some ridiculous number of page hits/sec, I don't personally know anyone operating a site that Zope couldn't keep up with. If you're Amazon.com, maybe you'd look into ZEO or something, but if you're putting up a Linux user group page or something along those lines, Zope's probably going to frequently be tapping its fingers waiting for the next request.
2) I will get trapped into the product I don't know Python. I *do* have experience with Perl and some PHP. If I spend a bunch of time learning DTML, will I still wind up getting forced into using Python, a language I have no experience with?
Unfortunately, TANSTAAFL ("there aint no such thing as a free lunch"). It helps a lot to know some Python when using Zope, but it's not strictly a requirement. You can do a *lot* with DTML and ZClasses but you'll ultimately produce better apps and conquer the Zope learning curve faster if you know a little Python. So, the literal answer is no but the effective answer is probably yes. The good news is that if you're learning Zope, you're really learning Python in a fashion because all the objects in Zope are actually Python objects. So learning one is complementary to learning the other. There's been some talk at DC of aiming to create interfaces to other languages inside Zope (e.g. Perl), but no promises. Probably more importantly though, one of the fundamental differences between Zope and PHP/Perl (as indicated by the name "Zope" -- the Z Object Publishing Environment) is that Zope (and Python) take a much more object-oriented view of app development. This doesn't necessarily make it harder. OO development makes a lot of things a lot easier and more maintainable. But it does require an investment in time to learn some new terminology (e.g. what's a method?, what's inheritance?)
3) I won't be able to do what I'm used to I read that ZServer doesn't support virtual hosts. So if I want to manage several websites through Zope, does that mean I need a separate IP Address for each website? Or would all of my URLs need to look like
I must admit I've never used them, but Evan Simpson has come up with SiteAccess, which is some sort of virtual-hosting-capable product for Zope. Additionally, Michel Pelletier at Digital Creations has authored another one that is probably going to be included in the DC "Portal Toolkit" (which will be demoed at the upcoming International Python Conference). I may be way off base here as to the intent of these products, so you should check them out yourself if you plan on virtual hosting.
Also, is there anyway to use PHP on a Zope-managed website? Is it possible to use regular CGI programs through ZServer as well as the Zope Objects?
The answer to both those questions is probably one in the same: Not with ZServer. Instead, use Apache to front-end Zope instead. With some clever planning and configuration, I imagine it's possible to use mod_php, mod_perl, mod_whatever, plus normal CGI as well as Zope all front-ended by Apache. I know for a fact that it's at least possible to use both vanilla CGI and Zope frontended by Apache. Netscape Enterprise Server works well in this capacity too. -- Chris McDonough Digital Creations, Inc. Zope - http://www.zope.org
For all the magazine talk about everybody needing something capable of sustaining some ridiculous number of page hits/sec, I don't personally know anyone operating a site that Zope couldn't keep up with. If you're Amazon.com, maybe you'd look into ZEO or something, but if you're putting up a Linux user group page or something along those lines, Zope's probably going to frequently be tapping its fingers waiting for the next request.
All it takes is some credit card processing over SSL with Apache and you will definitely need multiple servers. As a benchmark, on a dual processor 450Mhz webserver with lots of RAM and a rainbow SSL card, running Linux 2.2.x kernel and a recent version of apache, we never saw more than 150 transactions/second with normal requests to static objects in apache. This was on a platform that can do over 1000 TPS without SSL. The overhead for SSL is huge. If you also include the length of most CC processing transactions, you also have to deal with requests that last 20 seconds instead of .5 seconds. This causes very intensive resource utilization. Now translate those numbers to Zope. Zope starts out with no more than 150 TPS on the same hardware. Now throw in SSL and it probably drops to 20 or 30 TPS. Add in 20 second long transactions, especially with our friend, the python interpreter lock, and you run into real performance issues. However, if you have a machine that is dedicated to running the credit card processing, you can build the entire transaction in zope, but then have the final submit button link to a credit card processing box that is just running straight apache. I should imagine that you would have reasonable performance numbers that way. If your site only processes 1 or 2 credit cards per second, you probably will have no problem, regardless of your solution. I had the joy if building a system that could process 1000 Credit cards/second, and it was not fun (no we didn't use zope, I didn't know about it yet). Of course, it turned out that Visa themselves only process about 4000 cards/second, so we had a few spare cycles in the end ;-) --sam
All, Thank you very much for your detailed replies. I have decided to try Zope for my project. What I've gathered from the responses is that (1) I'll need to run through Apache, because ZServer is too limited to offer CGI, PHP (and other modules), and SSL. (2) I'll need to learn Python. (It'll just delay the project a couple of weeks, which is no big deal since it's a personal pet project) (3) It's somewhat slow but scales well and decreases the amount time in development by several orders of magnitude This is basically what I thought. I'm sure you'll all see questions about Zope development from me here over the next couple of months. Thanks Again, Derek Simkowiak dereks@kd-dev.com
Derek Simkowiak wrote:
I'm considering starting it with Zope, which I have only recently discovered. However, I have the following "fears":
1) It will be too slow
How slow is too slow? Zope's speed relative to static page servers isn't very meaningful when you're serving dynamic pages (as you seem to be planning to do). Even if Zope ran your particular application more slowly than some other solution, as long as it's fast enough you still win if you have cut development time, eased maintenance, added features, or saved license and support fees. The Mindcraft benchmarks come to mind, here. Their configuration of Apache on Linux didn't serve requests as fast as IIS on NT, but it still was fast enough to saturate an OC-3, so who cares?
2) I will get trapped into the product
Any product with a learning curve will 'trap' you in this sense. DTML and Zope application structuring can be hairy, depending on what you are trying to do. You rarely need to know more about Python than its expression syntax, which is unremarkably similar to that of C, Pascal, Basic, etc. The only time you would need any in-depth knowlege of Python would be to hack the Zope source or write extensions (Products or external interfaces). Come to think of it, Python is as much easier to learn than the rest of Zope as C is than the full set of standard C libraries and APIs. Or to put it another way, I deliberately created a PythonMethod product in order to allow me to write more Python and less DTML :-)
3) I won't be able to do what I'm used to
You mainly mention virtual hosting here, so I'll plug my SiteAccess product. It handles virtual hosting with ease, and also allows you to perform various nifty tricks with URLs and request pre-processing. Integration of PHP and other CGI programs is best handled by sticking Apache in front of everything, IMHO, which also gives you SSL and allows you to easily manage and serve static content like images. Cheers, Evan @ 4-am
Dan, This was my basic approach as a Zope newbie: 1. Used HotMetal Pro 5.0 to "prototype" my site. This was essentialy to create a template for the site with the graphics, navigation, and structure that would be used throughout. The goal was to tweak the look and feel that I wanted to capture. 2. Manually segmented my template into a set of DTML methods - like standard_html_header, standard_html_footer, standard_menu, context_menu, stylesheet, etc. This allows me to take advantage of the Zope acquisition capability to enforce my sites structure on all the content that was yet to be created. The goal was to understand and take advantage of Zope's acquistion features and products. If you aren't making use of acquisition, then you aren't making use of Zope. 3. Created a folder structure in Zope to represent the organization for my content. 4. Began adding my content by creating DTML Documents in these folders. Here is the key fact - Once I got to step four, I really didn't need a "sophisticated" HTML editor. Most of my content just requires HTML header tags, <BR>'s, and <P>'s for the formatting. Acquisition does all the real formatting magic and I can just concentrate on the actual text of my content. For this reason, most any text editor is sufficient for my needs at this point. It makes a lot of sense at this point to just use your favorite text editor with an FTP capability to get at your DTML docs. Best Regards, Brian Holdsworth -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of schenck Sent: Thursday, January 13, 2000 5:49 PM To: zope@zope.org Subject: [Zope] Sophisticated Editing of Zope Objects I am new to using Zope. It looks very interesting, but one thing that appears to be a weakness is the way you edit DTML Documents and Methods (and other objects too for that matter) by using a simple text field in an HTML browser. For complex objects this looks like a serious problem. Other than exporting the object, editing it in a more sophisticated browser and importing it again, are there better solutions? Thanks for the help. Dan ------------------------------------------------- Dan R. Schenck mailto:schenck@posc.org Business Unit Manager http://www.posc.org POSC, Suite 275 10777 Westheimer Houston, TX 77042 voice: +1 (713) 267-5166 fax: +1 (713) 784-9219 ------------------------------------------------- _______________________________________________ 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 (10)
-
Brian K. Holdsworth -
Chris McDonough -
Derek Simkowiak -
Evan Simpson -
Kaleissin -
Martijn Faassen -
Pavlos Christoforou -
Sam Gendler -
schenck -
Stephen Pitts