分享

一个老外对Zope的评价,然后,他...

 昵称33596 2007-07-05
一个老外对Zope的评价,然后,他...  

1 - My story with Python
I met Python back in 1997. It was love at first sight :-) Until then, I had been developing applications mostly in C/C++ and java. When I write code, I like to write only what‘s needed to solve the problem I‘m working on. With C/C++ and java, I always felt like I had to write all these little extra lines of code that are needed because of the tools I‘m using, but have nothing to do with the problem I‘m trying to solve !

What I loved about Python is that it allowed me to get rid of all this extra work, and python let me focus on my problem ONLY! The language is never in the way.

2 - Why I wrote I started writing my first web applications in 1998. Since I‘d been programming with Python for one year, I naturally chose Zope as the framework I‘d use (not really understanding what Zope exactly was about). I wrote my first website using only basic features of Zope. I‘d only use DTML pages (ZPT didn‘t exist yet) and external methods when I needed Python code (PythonScripts didn‘t exist yet). Also, I wasn‘t using ZODB for the database. I was using other ones like PosgreSQL or MySQL

So I wrote a few small websites using these techniques. And I thought Zope, the senior python website administration mega-app, was okay for that task.
In 1999, I started to develop a "big" website (it was an Amazon.com-like catalog sales website with a big back-office). We were a young team of web developers with very little money but lots of ideas. We wrote a first version of the website using Zope the same way as I was using it before (mostly DTML but now with PythonScripts). Also, we were using inheritance a little bit.

While developing this website, Zope showed its limits for the way we were using it:

First of all, I didn‘t like the fact that source files weren‘t stored in the filesystem. I couldn‘t use my favorite Unix tools (vi, cvs, grep, find, diff, ...) because the files were trapped inside Zope structures.
DTML was okay for some tasks, but it was really ugly sometimes. DTML documents coudn‘t easily "call" each other with parameters.
Zope provided some inheritance, but it wasn‘t really "true" inheritance as in OOP.
Overall, I think I felt like I was too far away from developing a normal application in Python.

I now realized that we missed out on a lot of the great features of Zope and that it‘s really not designed to be used the way we used it. I‘ve used it since then to develop a collaborative portal and it worked great. We used the whole framework (ZODB, CMF and ZPT) and it was really nice and powerful.

So my opinion today is that Zope really is a great tool when you need collaborative features and content managment. This is the case if lots of people will work together on the content of the website and their work needs to be coordinated.

But for our website, we didn‘t need any collaborative feature or content management. The data was inserted in the database by some external applications. On the other hand, our website had a lot of logic in it (which means lots of pure Python code), and that‘s one area where Zope isn‘t too good!

So I started to think about developing some other tool that wouldn‘t have all these drawbacks. The thing that ultimately made us decide to stop using Zope was speed and resource usage! We had very little money for hosting so we had to put our production website on a shared server. It was a decent one (dual-800MHz P3 with 1GB or RAM), but when we started having several thousands of users per day, the server couldn‘t keep up !

Of course, I looked at other tools before developing my own: SkunkWeb, Webware, Albatross, TwistedMatrix, Quixote. I gave a try to pretty much all of those but every time I always felt that I had to write all these extra lines of code because of the tool itself. I wanted something simple but yet powerful!

So...

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多