#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    el paso, texas
    Posts
    9
    Rep Power
    0

    can I do this in Zope?


    I want to have multiple sites that share pages. The pages will be in each site, i.e., no linking between the sites. furthermore, parts of some of the pages will be unique to each site. For example, I could have a Python site that would have articles on MySQL, with interspersed Python code, and a separate PHP site that would intersperse different code in the same places.

    Not only that, but the pages will change frequently. In the above example, if MySQL had a new release every 2 or 3 days, I would be changing the MySQL parts, and want to change them in only one place for all the web sites.

    Really, I would rather do this in PHP, since I have to maintain proficiency in that anyway, to read code such as phpBB and myPhpAdmin.

    Is Zope the best way to do something like this? I also don't want dynamic pages, since they don't get indexed well by the search engines.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    133
    Rep Power
    12
    In Zope there is a concept called acquisition. Acquisition is a fairly complex issue somtimes. Most of the time it works in the manner of object-oriented inheritance. If you request a page in a container and the container has the page: that page will be served. If you request the page and it does not exist in the container acquisition will make Zope traverse up the path and search in the containers container, and so forth, all the way up to the root. If the page does not exist in the root an error will be issued.

    Short answer: It's easy to do this in Zope. Many other things are not easy however so consider carefully before choosing. If you are building large systems Zope might be a good choice. If you are building small sites and you do not expect to have to put much work into the creation of the actual content Zope might be overkill.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    I think the answer is more complex than that, percivall. Bullwinkle was asking about having multiple domains pointing into the same Zope database. I think this is possible if you set up virtual domains in Apache and redirect them into a single database. However I do not know if acquisition would work between domains. If you go down this route then http://zope.org/Members/shaw/HowTo/ApacheFrontEnd is a good starting place.

    Since the pages are all static, a better solution may be to use a templating system like Cheetah (http://www.cheetahtemplate.org). This allows heirarchies of templates to be defined, so you could have a set of base templates containing all the common stuff and override them for the site-specific stuff. You would need to regenerate the pages whenever you edited them, but that is not a big issue.

    Dave - The Developers' Coach
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    133
    Rep Power
    12
    Oh. I didn't think that the sites would be on different servers and different domains.

    Well: It's still definitely possible (and not that hard). The solution in Zope is called ZEO (Zope Enterprise Objects) which allows you to have multiple Zope instances share a single (or multiple) datastorages. Running ZEO is a good idea even if you only use one Zope instance since it helps debugging (think: connecting to the ZODB running the Python interpreter interactively). The Zope instances connect to the ZEO server via unix sockets or via TCP. It is trivial to let each Zope instance have its own datastorage locally and mount the ZEO-controlled storage at a freely chosen mount-point under the Zope intstance's root.

    I personally run Apache as a reverse proxy to a Zope instance connecting to a ZEO datastorage for the main database while letting the Zope instance have a persistent Sessioning storage stored "locally".

    I'm not saying it isn't overkill; but it isn't that hard to do.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    76
    Rep Power
    11
    Originally Posted by DevCoach
    I think this is possible if you set up virtual domains in Apache and redirect them into a single database. However I do not know if acquisition would work between domains.
    ... I think virtual domains actually point to different paths and acquisition should kick in from there.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    Really, I would rather do this in PHP, since I have to maintain proficiency in that anyway, to read code such as phpBB and myPhpAdmin.

    Is Zope the best way to do something like this? I also don't want dynamic pages, since they don't get indexed well by the search engines.
    How could you do it in PHP without it being dynamic?

IMN logo majestic logo threadwatch logo seochat tools logo