|
|
||||||||||||||||||
|
|
||||||||||||||||||
![]() |
![]() |
Issue 10 - Revision 3 / March 25, 2005
|
|||
|
Why Zope 3 - - - - - - - - - - - - By Jim Fulton | February 12, 2005 Introduction The first production version of Zope 3 was released on November 7. This was a major milestone in the Zope 3 project. Many people are probably wondering what Zope 3 means to them, if they should start using it, and why. In this article, I'll try to answer these questions or, at the least, to provide sufficient information to help people answer these questions for themselves. First, I'll trace Zope 3's history, describing the reasons for decisions made along the way. History: Zope and BeyondZope was initially designed to empower non-technical users to easily manage information and create dynamic web applications. It achieves these goals in several ways, including providing:
These facilities worked well for lots of applications. In fact, there are some sophisticated content-management systems created by non-technical users, using just the through-the-web development facilities. Challenges for Zope in regard to Python:However, many developers need more than the through-the-web development facilities prebuilt objects provide. For these developers, a different set of development facilities and APIs are available. They can create additional file-system Python packages using a variety of APIs. There are nonetheless some significant challenges for Zope 2 Python developers:
In late 2000, Zope Corporation engineers evolved ways for Zope to better serve developers. The main ideas to come out of these sessions were:
Python is Zope's "secret weapon". Zope competes in a market dominated by Java-based solutions. Python is a major reason why developing applications for Zope is far more productive than developing for Java-based application servers. For all the reasons described above, however, Zope is not a very attractive development environment for Python programmers. Making Zope more attractive to Python programmers and allowing us to better leverage Python's strengths was a major goal for Zope 3 development. Continuing the HistoryShortly after (and unrelated to) these brainstorming sessions, Zope Corporation hired the core Python development team, Python Labs, and they brought fresh perspectives and sensibilities. As mentioned above, an early output of these brainstorming sessions was ZPT, which made it possible for developers and designers to collaborate on templates. We realized that an MVC-like framework really needed a component architecture, so we investigated component architecture that would (among other features) support separation of the application and presentation logic. Using a component architecture in a stateless environment such as HTTP was a major challenge. In a stateless environment the components needed for each request have to be assembled. This means that component assembly has to be easy. Note that the CMF provides some of the advantages of a component system. Application code is taken out of content objects and distributed to tools and skins. Tools are components that provide specific application-support functionality. Skins provide separate presentation and application logic, with an emphasis on presentation. While the CMF provided some of what we needed and demonstrated the benefits of separating presentation and application logic from data management, we wanted to see if we could do better. In particular, we wanted to extend behavior using objects rather than using individual templates and scripts. The CMF's reliance on acquisition alone means that all templates and scripts share a common namespace regardless of content type. Names have to embed type information, and have to be carefully chosen. We conceived an initial classification of components into content, view, and application components, loosely mirroring MVC, and designed a component-assembly mechanism using component registries and traversal components. Component assembly was based on connecting objects via interfaces. We created an initial prototype that proved that the component-assembly ideas were workable. This was promising enough to motivate further development. After this initial prototype, we evolved a more detailed story on how component developers worked, creating a short training course as a slide presentation that described the development process. This presentation was fictional, describing software that hadn't been written yet. The Python Labs team was instrumental in working out the initial development process and providing feedback. I gave the presentation many times, updating the course based on feedback. Essentially, this training course was the second prototype for the component architecture. In creating the development process, a major goal (beyond support for component development) was to provide a development model that would be attractive to Python programmers. Zope 2 Python products have lots of very Zope-specific configuration information embedded in their Python code, which makes the Python code less approachable and detracts from understanding the code. An early decision was to separate configuration from application code. The Python code became simpler, and it became easier to use code that was not Zope-specific. The idea of separating configuration from application code turned out to be very powerful. As this work was occurring, we realized we could make major improvements to the development experience by keeping an open mind about what developing for Zope could be like. We decided to approach the project as a major revision of Zope: Zope 3. Near the close of 2001, we had iterated as far as we could with the tutorial and knew we needed to pursue a Zope 3 project with the following goals:
Tres Seaver had long advocated using Extreme Programming (XP) within Zope Corporation. We needed to bootstrap the Zope 3 implementation and I decided that we could try XP at the same time. We held a 3-day development session, which I called a "sprint" [Editor: see ZopeMag's miniGuide to Zope Sprinting to learn how sprints work], to create an initial minimal Zope 3 implementation as quickly as possible. We used pair-programming, stories, and unit tests. This initial session turned out to be extremely productive. We held several other sprints at Zope Corporation, learning as we went along and making lots of important initial progress. Zope 3 work began as a development branch of the Zope 2 tree. We quickly realized, however, that leveraging the existing Zope 2 code would make it hard to explore new ideas. Backward compatibility with the existing code was far too much of a distraction. We decided not to worry about backward compatibility initially and soon created a separate development tree for Zope 3. Opening the processIn December 2001, we announced the Zope 3 project to the Zope Community as we were in the process of opening the Zope repository to contributors outside of Zope Corporation. Zope 3 provided a major opportunity for people to get involved in the Zope development process. We promoted the idea of sprints and held 3 Python sprints in Fredericksburg, in January and February of 2002. To date, there have been 28 community Zope 3 sprints. Sprinting has turned out to be great for:
The most important benefit of sprints is allowing people to meet, get to know each other, and collaborate in person. This makes it much easier subsequently to work remotely. The Zope 3 project has also led to a huge increase in the number of people working on Zope itself. The majority of Zope code contributions and the vast majority of contributors come from outside of Zope Corporation. Zope 3 is truly a community project. Process of DiscoveryThree years passed from the initial Zope 3 project announcement through the initial release, which was much longer than had been anticipated. The vast majority of the features were developed in the first year, when the pace was very fast, building Zope 3 from a base of nothing to a system with a majority of the features in Zope 2, with contributions from a wide variety of contributors. At the end of 2002, we made what we thought would be the first alpha release. In early 2003, we set about a series of "geddons", which were major restructurings intended to finish Zope 3 in time for a summer release. This was a time to evaluate what we'd done. Based on our experiences, however, we discovered aspects of the original designs that we wanted to change. By the fall of 2003, we had made a number of significant changes and had identified a number of changes still to be worked on that would take us well into 2004. The period from early 2003 to mid 2004 was one of consolidation. Few new features were added. The focus was almost entirely on building a strong foundation upon which we could later build additional features. In most cases this represented major simplifications in the architecture. More code was removed that was later added. Many of the changes made were significant. For example, we stopped using context wrappers to keep track of object location and switched to storing locations directly, leading to a vast simplification in location-aware code and object referencing. We completely rewrote a number of major subsystems. These changes greatly improved the architecture of the resulting system. They were possible because we were willing to take the time to learn from our initial mistakes and redo our work. The decision to slow down and take our time, doubling the time to get to an initial release, was based both on a commitment to excellence and the realization that we didn't need to rush. Despite its shortcomings Zope 2 is still a great system and it has a long life ahead of it. Over the course of work on Zope 3, our development processes evolved. We've:
By early 2004, there were several production projects using Zope 3. Clearly, Zope 3 was ready for production use even though some features were still missing or not ready to be finalized. Some people who could technically use Zope 3 in production couldn't risk doing so until the features they needed were stable. We decided to narrow the scope of the initial release to include just those essential features that were stable and could be used by people who don't need traditional through-the-web development features. We decided that Zope X3.0 would be a "developer's release", containing only those parts that were stable by early summer 2004. The Five ProjectA recent development is the Five project (http://codespeak.net/z3/five/), which provides facilities for using parts of Zope 3, particularly the Zope 3 component architecture., in Zope 2. Current StatusThe current Zope 3 is not backward compatible with Zope 2, although, through the efforts of the Five Project, many parts of Zope 3 are usable in Zope 2. The current Zope 3 is for Python developers. There is no stable through-the-web development support, although there are experimental facilities. I expect this to be the case for some time to come. There aren't many third-party products for Zope 3 and parts that are mature in Zope 2, like cataloging, are still evolving in Zope 3. With these limitations, Zope 3 provides some major advantages:
Zope 3 has both significant advantages and limitations relative to Zope 2. Whether it's right for you depends on your unique situation. Fortunately, you don't have to switch to Zope 3 anytime soon. Zope 2 will be with us for a long time. In fact, Zope 2 allows us to take our time with Zope 3. Thanks to the Five project, you can use parts of Zope 3 in your Zope 2 applications. Over time, Zope 2 will gain more Zope 3 features, easing the eventual transition to Zope 3.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| ZopeMag is committed to bringing you the best in Zope Documentation. | |||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Reproduction of material from any of ZopeMag's pages without prior written permission is strictly prohibited. Copyright 2003 - 2005 ZopeMag |
|