Why I use Zope and not ASP.net?


In 2002, I saw an article on Devshed.com about Zope. What they described intrigued me greatly. The whole “Everything’s an object” idea was fascinating. I proceeded to www.zope.org and downloaded Zope version Soon, I was in heaven as I discovered a new passion.

Before I get into this too much, you should know that I am not a Software Engineer. I am not an educated person. I have no formal training or computer science degree. Everything I have learned regarding programming, I learned on my own using books, the Internet, and practice. The thoughts I express here are strictly based on my own observations, opinions, and desires.

I originally started web design learning HTML and Javascript, of course, but soon realized the importance of server side code. So I ran into ASP and coming from a little experience in VB 6, it was easy to pick up. Then I found Zope. As much as I liked and enjoyed working in ASP/VB, I still found some tasks to be a little cumbersome. After testing Zope, it just made sense. For about 2 years I worked in ASP off and on, then about 2 more years in Zope.

This isn’t a story about why I switched from ASP though, it’s about not using ASP.NET. I purchased VB.NET 2003 in the summer of 2004. For six months I worked with web forms in .NET. After that, I concluded that it was better for me to use Zope. The keywords here are “better for me.” I gave ASP.NET a shot because I wanted to be sure I was working with a good platform for me and my clients. Doing so allowed me to compare what I learned in the previous ASP and in Zope. (From here on out, I will call ASP.NET, .NET.)

.NET is a great platform, and it’s very powerful and capable. It’s also very widely used and has a huge community of support. I really can’t say anything negative about it, except that it is too big and complicated. The things I might say that are drawbacks, are not necessarily negative as all platforms or environments have drawbacks. One drawback in .NET is the size of it. Many times I have found myself drowning in the overload of information and NOT finding what I wanted. Another drawback would be, from a web development standpoint, deployment. Deploying web applications in .NET is a pain. You cannot simply copy your application directory from a test server to the production server without running into path issues, or maybe some odd configuration at the ISP’s IIS server. As a result, when my clients want a simple change, I put them off because I have to do so much more work just to test some code and publish it.

I love the Visual Studio IDE and Intellisense. (That is what it is called, right?) Also, having the full procedural language, and having it separate from the HTML code is nice. Although, I have since learned that I like the integrated DTML mixed right in with the HTML better, but that is really only my preference. (Sounds like another blog to write)

In .NET, the compiled code is a benefit because even as complex and bulky as the .NET framework is, it is quite efficient during runtime. (for those uninformed, in .NET you must compile your code. In the older ASP, you simple edited the text file and ran it.) This compiling of code is partly a blessing for its runtime speed, but during development and deployment, it’s a curse. It just slows you down.

I would suppose in a large scale, corporate application, the compiling of code and separation of code and presentation is a benefit. And I suppose that the .NET framework would work better for web applications with thousands of concurrent users. But, that’s not what I do. That’s not what my clients want or need. My clients have less than 100 employees. (way less) 99% of what they need does not require the full scale, bloated capability of .NET. In fact, actually in my opinion, I believe that everything a small business would need for web applications, can be accomplished using Zope with the same performance as .NET, overall. Though you might find some things are faster in .NET, some are faster in Zope, so *overall* it’s a wash.

Concerning the speed of development, I would have to say Zope is faster, *overall*. There are some things that are faster in .NET as Microsoft has done a decent job helping the developer along with several pre-built objects. The problem is that when you want to customize the pre-built objects you run into problems trying to figure out how to use them in your own customized way, and since you almost always need to customize to suit your clients’ needs, that slows down development time greatly. So in this respect, I would have to say Zope is faster to develop in, but not in all cases as I have mentioned.

One of Zope drawbacks is that in order to work with it and be efficient you have to understand it. You have to *get* it. There are some concepts you have to understand. I suppose that’s no different in learning things like database design or programming in general, so maybe it’s not really a drawback after all. The concepts I am referring to here are really the relationship between DTML documents and DTML methods, and all other objects in the Zope database. But that is the beauty of Zope isn’t it? Zope is an application server that is really a database serving web objects. Everything in that database is just that, an object. How they all relate is the magic. It’s magic because they give you this framework to build upon, you take all the objects, design them and piece them together, and BAM you have an application.

During development, you inevitably run into code that needs debugging. I am split on this one. .NET is pretty good for debugging code. It has nice call stacks listed if you want and of course the IDE helps by allowing you to step through the code and see what your variables contain during runtime. Zope also has tracebacks and error logs allowing you to find an error. Neither platform has improved my development process enough over the other, so I would have to say it’s a tie.

Management. Zope is hands down, no contest, the winner here. .NET, as I stated erlier requires some tinkering to deploy and the code requires compilation when changed. This is a real pain when you want to move fast. The Zope server is easy to manage and quite reliable. The objects you create and develop are easily imported and exported and moved around making deployment a snap. In addition to all this, if you want to make a fast text change on a site, heck even a quick coding change, you simply log into the Zope Management Interface from any web browser on the Internet and make your changes. The changes are immediately available and if you just happen to need to revert from those changes, Zope has versioning built in and you can rollback the changes.

DTML. There are many people out there who would say DTML is no good. I completely disagree, particularly from a small business perspective. That’s a whole other debate and blog, so from my perspective and keeping with the relevance of this article, I will keep this simple. DTML allows you to easily create your application around your HTML and provide dynamic content. It looks like HTML, in fact I would describe it as super-charged HTML that executes on the server. .NET separates your code from your HTML. If you like that, or need it in some cases, then Zope is not for you. (unless you use ZPT, but I don’t) Because DTML is mixed within your page content, it’s quite easy to follow. This in turn speeds my development time.

.NET might have a full-blown development environment giving you a lot of power, but Zope does have Python scripts, and if so desired, external methods and products. Because of this, I wouldn’t say .NET has any additional capability over Zope. I am not a computer science guy though, so someone might argue that this is not true, but from my perspective, and for my clients needs, it is true.

.NET does not have or run an object database or use acquisition. This is what gives Zope its power. And again, someone might argue that Zope’s acquisition is no good, but for me, it rocks! I haven’t had any problems with it. It’s just one of those things in Zope that need an understanding of the concepts of object relationship.

.NET needs Windows. Not that this is bad, but limits options and makes it more expensive. I like options, makes it more useful to my clients. But, you should know, my favorite server setup for Zope is to run it on Windows 2000 or 2003 with Microsoft’s SQL server using the Egenix Zope DA for ODBC. With version 8 of Postgresql, I might be moving towards that though.

Zope connects to any data source I have thrown at it, and it will run on other platforms than Windows. (Linux) On a downside, Zope needs a licensed ODBC adapter on Windows if you use Zope 2.7 or higher, and on Linux you need licensed ODBC if you want to connect to Microsoft SQL server. This is not true when using MySQL or Postgresql on Linux, there are free database adapters available.

Well, let’s recap. I’ll list the pros and cons as I see it and how they fit with my needs.

Zope Pros

  • I love DTML and how there is no separation of code and content.
  • Python scripts, external methods, and products.
  • Easy to manage and deploy. Nice Zope Management Interface useable from any web browser. This also makes quick updates, actually quick.
  • It can do everything I need and ASP.NET provides me with no feature I need over the features of Zope. In other words, for my needs, Zope can do anything .NET can.
  • Easy to learn.
  • Easy to extend.
  • Runs on Windows or Linux.
  • Object database with custom object properties and acquisition.
  • No compiling of code.
  • Extensive database connectivity.

Zope Cons

  • No IDE. This would be nice, but since it’s quite easy to use a decent text editor connecting to FTP or WebDAV, it’s not needed.
  • Debugging could be a little better, but I don’t really have problems with it. Tracebacks and event logs are easy to use.
  • Need a licensed ODBC adapter for running with MS SQL server. You need this with Zope 2.7 and higher, it’s worth every penny, but would be nice if there was newer, free one available.
  • Not as widely used as other technologies. (Zope server use on Netcraft.com has doubled from 2/04 to 2/05 though, so that’s nice)
  • Documentation is a little lacking. (this is getting much better though)

.NET Pros

  • Nice IDE for development. Even the Web Matrix IDE is nice, but I much prefer the Visual Studio one. At about $100 for the Standard version of VB.NET, I can handle it. (but that wont connect to the full SQL server, you need to use MSDE)
  • Nice debugging. This is partly due to the use of Visual Studio though.
  • Great for enterprise application development with many developers.
  • Many pre-built objects for development.
  • Huge user base.
  • Tons of documentation and usage examples.
  • Full VB or C# language available. (or others too)

.NET Cons

  • Too much information, too big. It’s often easy to get lost when trying to find a solution. This is a huge problem for me. When you do actually find the items you are looking for, it’s got pretty good documentation though.
  • Deployment is a pain.
  • Code needs to be compiled. (makes deployment harder as well as other things)
  • Quick updates are a pain, because of the compiling of code.
  • Pre-built objects are nice and are documented fully. Well, not fully, because if you need to do something customized, which you always do, then documentation is lacking. This is a big deal to me because trying to customize something takes way longer than it should. So, this is a con.
  • You must use Windows.
  • No object database or acquisition.

Just to be a little more complete too, here is why I don’t use ASP. (The older ASP)

  • No object database and acquisition.
  • Database operation is a little more of a pain. Not that it is not doable, just more difficult.
  • SSI is available for dropping in code objects, but not anywhere near as nice and easy as using Zope DTML Methods or Python Scripts.
  • While it is easier to deploy than .NET, and updates are quick, and it’s not compiled, there is no easy management interface and it’s not easily done from any web browser. Again, it’s just easier in Zope.
  • The code is sort-of integrated and useable like DTML, but DTML is way easier, particularly when using databases.
  • I wouldn’t say that ASP is exactly extensible.
  • The thing I really don’t like about ASP though, and this is completely based on my own experience, it is slightly unreliable and the code is slightly slow and clunky when running.

I hope this information is helpful to someone out there. This isn’t ment to be disparaging to Microsoft or ASP and ASP.NET, it’s just that Zope seems to fit with my preferences and needs. .NET is great, and I have a couple clients that will continue to use .NET so I’ll keep using it, but if I can help it, I’ll use Zope.

Enjoy!

Greg Fischer
1st Byte Solutions