Planet Zope

        Zope related news
 

Jul-03

Plone Conference 2008 Registration Open!

Feed: Plone News
Early bird registration is now open for Plone Conference 2008, to be held October 6-12 in Washington, D.C. USA!

Plone: major Argentinean University launches its new institutional portal.

The National University of Cordoba (UNC), Argentina, recently launched its new institutional website built on Plone 3, the open source content management system. This project results from a close collaboration between the University development team with the support and assistance from menttes, a local Zea network member business.


Jul-02

Introducing Content Mirror


A few weeks ago at the New Orleans symposium in Plone, I presented on some software I was writing called Content Mirror, which is an addon product for Plone content serialization to a structured/relational database. Its a tool for doing content data deployments. Its nothing particularly new,  Alan and I have been talking about the deployment story for Plone since 2002. I was building CMFDeployment at the time for pushing out static copies of plone sites for ultra-secure systems. Alan and EnfoldSystems went on to build a data deployment solution in Entransit, for doing data deployments. Both were fairly succesful deployment solutions and are still in use and deployed today by a variety of Plone vendors. But both also had some failings, they required alot of configuration and committment to get working for an existing plone site. For example, Entransit required using the instance layout and additional products needed by EnSimpleStaging. While CMFDeployment has a bewildering array of configuration options. In my opinion, both are specialized consulting ware, ie. their primary deployed successfully by folks doing Plone development full time.

For most of the last year, I’ve primarily been doing Zope3 applications, in relational databases. A large part of the reason why I’ve enjoyed Zope3 so much, is that the impedence mismatch between application development is much less than with Plone. Paul Everitt asked at the first Plone conference in New Orleans if Plone was a Product or Framework. Its a question still heard in the community to this day. But to me the answer is clear, Plone is a product, and frankly thats a good thing for both the software and its users. Its however a bad thing when your building applications, their tends to be much more policy with products, that needs to be replaced or worked around when your building on them. As a result, products tend to have two other downsides in application development, developer inefficiencies and computational ineffiencies.

As an example of a developer inefficiency, one is evident just in starting up and serving a page from Plone. I call it the Plone tax, and over the course of a year its about a man month of work. This becomes more stark in comparison to other web app frameworks ( pylons, django, rails, z3, etc) which startup and serve a page in a few seconds. There’s been alot of work recently to this with plone.reload, optional loading of translations, and some heroic work by hanno, but the fact is that there is a lot of code to load up as well as data from the zodb to startup and serve a page in Plone.

Developer inefficiencies are also evident in the learning curve associated with being productive with a product. A product is typically a much bigger software stack, and Plone has and utilizes many components, from zope2, zope3, cmf, archetypes providing foundations, in addition to a growing number of plone specific infrastructure. Plone is the OpenOffice of opensource content management systems. We could drop in a pylons in a cubby hole of a plone tarball. Smaller systems offer a much better productivity to new developers, by giving them the ability to focus on the problem domain and solution, rather than how to frame the problem domain in terms of product concepts and contexts like Plone.

The real key in a data deployment scenario is to keep all the many and great features of Plone as part of the content management process, but also making that data accessible for use in other applications. By deploying content to an rdbms we get language and framework neutrality to interact with it, as well as access to a widespread number of developers and tools. In a nutshell, its data portability.

As a bonus, when using Plone as a product, and reserving customizations to applications onto of the content of a data deployment, the migration story for a Plone instance also becomes much easier.

In terms of computation inefficiency,  Plone does alot of work, which makes it easier to use as a product, but its also computationaly expensive for content delivery compared to simpler solutions that fit the needs of an application/problem domain. ie. the first rule of optimization, do less work. Replacing Plone as a content delivery mechanism, is a great way to make a system more responsive and vertically scalable, while still allowing a dynamic system.

Plone is a great product, and out of the box its offers ease of through the web customization, installation, and a wide range of functionality. My goal for data deployment with Plone was to make something that would enable reusing Plone as a product, as a content management system, but would allow flexibility in usage of that data. Moreover a tool that was easy to drop into new or existing sites.

Data deployments can also bring new features into a Plone. Its much easier to mine business intelligence and reports out of a relational system. For example getting graphs of content creation broken down by month and type or user or using commercial reporting tools.

So back to introducing content mirror. Its basically a system for doing data deployments, it features.. .

- Out of the Box support for Default Plone Content Types.
- Out of the Box support for all builtin Archetypes Fields (including files,
and references ).
- Support for 3rd Party / Custom Archetypes Content Types in one line of configuration.
- Supports Capturing Containment and Workflow in the serialized database.
- Completely Automated Mirroring, zero configuration required beyond installation.
- Easy customization via the Zope Component Architecture
- Elegant and Simple Design, less than 600 lines of code, extensive doctests
- Support for Plone 2.5, 3.0, and 3.1
- Opensource ( GPLv3 )

installation docs
http://code.google.com/p/contentmirror/wiki/Installation

technical introduction / readme
http://code.google.com/p/contentmirror/wiki/Introduction

in a nutshell its technical architecture, is an event observers with aggregation by object on txn boundaries, using an operation pattern for serialization actions, along with schema transformation of archetypes to relational databases tables, using a sqlalchemy runtime generated orm layer. the technical introduction goes into more details.


PNG, Transparency, IE6, AlphaImageLoader, and SSL

Feed: ch-athens
In case you try to run one of the AlphaImageLoader fixes out there in order to teach Internet Explorer 6 to handle PNG images with transparent alpha channel information somehow gracefully... and in case you try to run this over SSL (https), you might...

Grok (and martian) rocks

Even if you're writing Plone code

Report from the New Orleans Plone Symposium 2008

Feed: Plone News
It's been a while in the making ? but here's my conference report from the New Orleans Plone Symposium 2008. Hopefully it will convey some of the excitement and energy that was present at the event ? it was really quite remarkable.


Jul-01

Repozecast Number 2

Repozecast #2, Plone Symposium Wrapup

The second episode (mp3) is now up. It contains ramblings about Repoze and how it relates to:

  • A wrapup of the Plone Symposium in New Orleans 2008
  • The current state of Zope-related Repoze software
  • Info about repoze.who
  • Recent Zope/Plone/Python user group talks
  • Thoughts about Deliverance

Enjoy!

-Chris


Setuptools distribution_links Considered Harmful

Feed: plope
distribution_links foils repeatability


Jun-27

Mock testing with mocker and plone.mocktestcase

You must be having a laugh

site-packages is too implicit

Dear site-packages, I am breaking up with you. No, it's not you, it's me.

Mark Ramm recently posted about on-going TurboGears activity. This made me curious, so I thought I'd install TurboGears 2 and poke around the source code a bit. Unfortunately, like way to many Python applications, the install process puts Python code in my Python's site-packages directory. Waaaaa!

A little bit of shell fiddling (ls -t1) and I was able to produce a list of newly added packages so I could uninstall them when I was done:

rm -rf PasteDeploy-1.3.1-py2.4.egg
rm -rf Routes-1.7.3-py2.4.egg
rm -rf WebHelpers-0.3.2-py2.4.egg
rm -rf Beaker-0.9.5-py2.4.egg
rm -rf FormEncode-0.7.1-py2.4.egg
rm -rf decorator-2.2.0-py2.4.egg
rm -rf nose-0.10.3-py2.4.egg
rm -rf Mako-0.1.8-py2.4.egg
rm -rf WebOb-0.9.2-py2.4.egg
rm -rf simplejson-1.7.1-py2.4.egg
rm -rf Babel-0.9.2-py2.4.egg
rm -rf Pylons-0.9.6.2-py2.4.egg
rm -rf Genshi-0.5-py2.4-macosx-10.5-i386.egg
rm -rf SQLAlchemy-0.5.0beta1-py2.4.egg
rm -rf ToscaWidgets-0.9.2-py2.4.egg
rm -rf TurboGears2.egg-link
rm -rf Paver-0.8.1-py2.4.egg

This is hardly a pattern that's unique to TurboGears though. Most Python applications follow this bad habit of wanting to install packages into your site-packages directory. Once your site-packages directory acquires too much stuff, and you start running into package version conflicts, some people have followed the barbaric practice of installing a Python for every application. OK, so I used to have a whole mess load of messy Pythons on my system ... but that was way back in 2007. I don't usually follow or recommend this approach anymore though (beyond creating a single Python 2.4 install on Mac OS X 10.5 since Apple skipped a version, grrr.)

What are some better approaches then?

VirtualEnv allows you to clone an existing Python installation, so that you can quickly create new Python installs without the hassle of configure, make, make install. With the --no-site-packages option you can also exclude all packages that are already installed in site-packages in the newly cloned Python, which is useful if you've been careless about what you've already installed into your site-packages directory. This is the correct way to create a development install of TurboGears 2 - I was just too hasty in my initial install and forgot to do this. VirtualEnv is good because it works with existing Python conventions of 'python setup.py install' and 'easy_install somepackage'. So even if the Python package authors haven't concerned themselves with the problem of conflicting packages and implicit versions, you can still manage these problems.

The other approach is to explicitly manage your Python import path so that only the specific versions of the packages that a Python application requires are on the path. This is the approach that zc.buildout takes. If your application requires Routes 1.7.3 and PasteDeploy 1.3.1, then installing that application will generate code that looks like this:

import sys
sys.path[0:0] = [
  '/Users/kteague/buildouts/shared/eggs/PasteDeploy-1.3.1-py2.4.egg',
  '/Users/kteague/buildouts/shared/eggs/Routes-1.7.3-py2.4.egg',
]

This gives you the advantage that if you are installing a number of different applications that are rely on many of the same packages and versions, then you can safely reuse those packages between installs - without needing to hose a site-packages directory. You can have a shared directory of Python packages that looks like this:

/Users/kteague/buildouts/shared/eggs/Routes-1.7.3-py2.4.egg
/Users/kteague/buildouts/shared/eggs/Routes-1.9-py2.4.egg

Neither of these are active on your Python path, but you can pop them onto your sys.path and import the version you require as desired. This approach means that your application declares what versions of which packages it wants to use at install time. You aren't relying on implicitly using the versions of the packages that happen to be installed in site-packages each time you run the application. Should trying out TurboGears 2 mean that next time I try and launch a Grok application I get a nasty surprise due to conflicting package versions? No, of course not.

It does require a different approach to managing an applications dependencies when being explicit about packages. If I've got '/Users/kteague/' in my source code, I don't want to check that file into version control, and if I move the application install to a different location, I've got to adjust all of my paths. Buildout takes the approach of automatically generating all files with hard-coded paths, so moving an application just means re-running ./bin/buildout after the move. And your version control system only needs to manage a buildout.cfg file and you don't have to commit a bunch of hard-coded paths into your repository.

Maybe it would be nice if Python had the concept of an 'explicit library location', perhaps a 'python-3.1/lib/python-explicit/' location? Then you could write something like this:

import sys
sys.require('PasteDeploy','1.3.1')

Then instead of the seeing INSTALL.txt files that read:

$ sudo easy_install somepackage

We could have:

$ sudo easy_make_new_packages_available_but_dont_hose_existing_programs_with_implicit_dependencies somepackage

This is similar to the approach that Ruby Gems takes. I'm not sure if it's better than the buildout approach, since this approach embeds your library dependency information in the source code instead of having that information available in an easily parsed buildout.cfg or setup.py file.

If "explicit is better than implicit" then why do we manage our Python library dependencies so damn implicitly?



Zope's entry into the commit count pissing match

Mark Ramm-Christensen of the TurboGears project starts what looks like it will be a great commit count pissing match . I know that wasn't his intent. He just wanted to show the TurboGears project is active. But nevertheless, this kind of thing tends to get rather silly rather quickly, so we certainly can't leave Zope out!

Amounts of commits on a project are only a very vague measurement of project activity. Some projects may have more frequent, smaller commits than others, depending on project culture. Or maybe people with more commits simply make more mistakes! It's also only a single measurement of project activity. Lines of code changed might make more sense, but it's harder to do. Determining what belongs to the project and what does not is very tricky though. There are also other measurements of community activity. Amount of documentation produced, say. Or package release frequency on PyPI.

Anyway, back to Zope. How does it fare in this? We're not dead yet either, after all. In the month of june alone, the svn.zope.org repository saw 663 commits. In the last 30 days or so, Mark's measurement, we got 796 commits (give or take 10; I'm not being strict with day boundaries here). Almost 800!

If we start pulling in commits from other projects related to Zope but not kept in svn.zope.org, we'd get a bigger number. We could go counting commits in the Plone collective, for instance. If we included commits of projects that we sometimes use with Zope, such as SQLAlchemy and Paste, we'd get even more commits. That'd be silly though, as we've already won!

Hah! :)



XML   Syndicate
» ZopeNews rss1.0
Feeds   recent Feeds
07-04 07:01 PyPI recent updat
07-03 21:49 Plone News
07-03 13:16 Zea Partners News
07-02 21:52 Itinerant Source
07-02 17:07 ch-athens
07-02 17:06 Zope.org Product ...
Bookmarks   del.icio.us
» del.icio.us/tag/zope
» del.icio.us/tag/zope3
- - - - - - - - - -
del.icio.us is a collection of personal, categorized bookmarks
About   About PlanetZope
» PlanetZope aggregates
the weblogs and product
announcements of zope
related websites.
- - - - - - - - - -
8294 newsitems since june 2004
- - - - - - - - - -
It is made using Zope 2.7,
CMF 1.4.2 and Mark Pilgrim's UniversalFeedParser 4.2
- - - - - - - - - -
Contact: d2m
- - - - - - - - - -
Nearby planets
» Advogato
» Apache
» Debian
» Lisp
» Plone
» Python
» RDF
» Twisted
» XMLhack