easiest transition for a PHP website to move to Python?

P

Python Baby

I've got a database-driven website that's written entirely in PHP.

It's all pretty MVC : NOT embedded little calls inside HTML, but
rather little controller apps in the webroot that merge data with
HTML templates on the fly.

But for various reasons (mostly fun) I want to rewrite it in Python.

There are so many different approaches, though! Zope, Twisted,
mod_python, clearsilver, and all the goodies in standard library.

What would be the SMOOTHEST TRANSITION for a newbie like me to
rewrite my PHP+MySQL website to Python?



(The URL is http://www.musicthoughts.com)
 
L

Lothar Scholz

Python Baby said:
I've got a database-driven website that's written entirely in PHP.

It's all pretty MVC : NOT embedded little calls inside HTML, but
rather little controller apps in the webroot that merge data with
HTML templates on the fly.

But for various reasons (mostly fun) I want to rewrite it in Python.

There are so many different approaches, though! Zope, Twisted,
mod_python, clearsilver, and all the goodies in standard library.

What would be the SMOOTHEST TRANSITION for a newbie like me to
rewrite my PHP+MySQL website to Python?

Most important, what can you use ?
If you are independ, this means have your own dedicated or virtual
server, then i would suggest webware which is the most sophisticated
real python (Zope is not python) solution. Twisted is more a server
framework then a web solution.

If you don't want a app server then use mod_python with one of the ten
web frameworks. Look at www.python-hosting.com for a list. I recommend
Quixote or Sypce.
 
D

Diez B. Roggisch

Most important, what can you use ?
If you are independ, this means have your own dedicated or virtual
server, then i would suggest webware which is the most sophisticated
real python (Zope is not python) solution. Twisted is more a server

Where exactly is zope not "real" python? Just because it features two
templating-methods that are for good reasons _not_ python embedded into
html, its still a python webapp server.

I never used webware, so I can't compare both, but from what I see it
appears to me like tomcat (or maybe jboss) the python way. No problem with
that. But object-relational-mappers are a PITA if you _must_ use them. ZODB
oth is much more of a object-orientied (not relational, though) database.
And thats what I love about it - simply create objects, and save them,
without the need for prior mapping to anything.

For purely content-driven websites, I haven't seen much better solutions
than ZOPE together with some modern CMS, like PLONE or ZMS.

Regards,

Diez
 
D

Diez B. Roggisch

I've got a database-driven website that's written entirely in PHP.
It's all pretty MVC : NOT embedded little calls inside HTML, but
rather little controller apps in the webroot that merge data with
HTML templates on the fly.

But for various reasons (mostly fun) I want to rewrite it in Python.

There are so many different approaches, though! Zope, Twisted,
mod_python, clearsilver, and all the goodies in standard library.

Regardless my answer to Lothar's posting (which is about zope not beeing
python), I agree with him that webware appears to be close to what you are
expecting from a web-framework. So the transition to webware might be the
easiest, if you want to do it as straight-forward as possible. Mind you, I
never worked with webware so far, but it looks promising.

However, ZOPE has a different approach. Its outstanding feature is the
built-in database ZODB. This is a hierarchical strucured object-orientied
database with versioning. It stores everything - app-logic, templates and
data. Together with CMF/Plone or ZMS, there exist nice and clean
dublin-core aware data-from-layout-abstractions. Setting up a blog or even
much more complicated, content driven website is only a matter of a few
clicks. All editing of content is done via the webbrowser, and as zope
comes with its own user-model, its easy for you as admin to create new
accounts and grant fine-grained access to your sites for their respective
authors/editors/whatever.

So I would definitly advise you to take a look at zope - install it and play
around with it, especially with plone or zms.

But as said before - if you are actually seeking for the smoothest
transition, you might be better off with webware.

Regards,

Diez
 
L

Lothar Scholz

Diez B. Roggisch said:
Where exactly is zope not "real" python? Just because it features two
templating-methods that are for good reasons _not_ python embedded into
html, its still a python webapp server.
I never used webware, so I can't compare both, but from what I see it
appears to me like tomcat (or maybe jboss) the python way. No problem with
that. But object-relational-mappers are a PITA if you _must_ use them. ZODB
oth is much more of a object-orientied (not relational, though) database.
And thats what I love about it - simply create objects, and save them,
without the need for prior mapping to anything.

Read this

http://zope-is-evil-666.idyll.org/
http://www.amk.ca/python/writing/why-not-zope.html
http://pywx.idyll.org/advocacy/why-not-zope.html
For purely content-driven websites, I haven't seen much better solutions
than ZOPE together with some modern CMS, like PLONE or ZMS.

Only, as mentionend in other texts, if it is for simple content.
Otherwise the ZOPE restrictions are quite strong.
 
J

JanC

(e-mail address removed) (Lothar Scholz) schreef:
Most important, what can you use ?
If you are independ, this means have your own dedicated or virtual
server,

AFAIK Python Baby has his own HostBaby... ;-)
 
K

konsu

but the references given below discuss old versions of Zope! the latest Zope
seems to have overcome a lot of limitations listed (they now have SQL
connectivity, integration with other web servers, ZPT if DTML is
insufficient, etc).

I am not a Zope proponent by the way, I have just started looking at it, and
I am still trying to decide what to use: Zope, WebWare, or something else...

konstantin
 
P

Paul Boddie

Dang Griffith said:
On 30 Jan 2004 17:02:30 -0800, (e-mail address removed) (Lothar Scholz) wrote:

...

I don't know Zope, so feel free to ignore my point, but those articles
are nearly 4 years old. While there might be other reasons, I
wouldn't think old postings necessarily reflect the current version.

Whilst I think that some of the criticism is unfair, if somewhat
amusing in places, Zope does have a reputation as being a particularly
difficult beast for even the most ravenous python( expert)s to
swallow. In other words, it appears as a big system with lots of
unfamiliar techniques in use and, at least until modern times, not
that much documentation to help the uninitiated. That said, once you
get down to writing components, there are some good approaches in
common use which make the process both relatively easy and not so
different to how you would write applications in some of the other
frameworks.

It sometimes seems quite fashionable to trash Zope and hype Twisted,
for example, but the "maze of twisty passages" problem isn't exclusive
to Zope by any means.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,148
Latest member
ElizbethDa
Top