Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 30th, 2004, 09:14 AM
bullwinkle bullwinkle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: el paso, texas
Posts: 9 bullwinkle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to bullwinkle Send a message via Yahoo to bullwinkle
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.

Reply With Quote
  #2  
Old March 30th, 2004, 07:07 PM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
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.

Reply With Quote
  #3  
Old March 31st, 2004, 05:59 AM
DevCoach DevCoach is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: London, England
Posts: 1,585 DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level)DevCoach User rank is General 6th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 2 h 58 m 23 sec
Reputation Power: 1372
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

Reply With Quote
  #4  
Old March 31st, 2004, 11:30 AM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
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.

Reply With Quote
  #5  
Old March 31st, 2004, 12:12 PM
xdhxy xdhxy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 76 xdhxy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 16 m 14 sec
Reputation Power: 10
Quote:
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.
__________________
yxScripts.com

Reply With Quote
  #6  
Old April 1st, 2004, 08:53 AM
sfb sfb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Posts: 623 sfb User rank is Sergeant Major (2000 - 5000 Reputation Level)sfb User rank is Sergeant Major (2000 - 5000 Reputation Level)sfb User rank is Sergeant Major (2000 - 5000 Reputation Level)sfb User rank is Sergeant Major (2000 - 5000 Reputation Level)sfb User rank is Sergeant Major (2000 - 5000 Reputation Level)sfb User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 5 h 53 m 21 sec
Reputation Power: 33
Quote:
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > can I do this in Zope?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap