By ax on
on my search for a php uml tool, just found this site: http://phppatterns.com/ :
The Mission
- Raising awareness and bringing PHP to the Enterprise
- Creating understanding of PHP's Advanced Capabilities (such as Object Orientated Development)
- Applying Software Design Patterns to PHP
The bottom line is quality not quantity.
all what drupal needs
looks great - check it out! some hints:
- Templates and Template Engines (my first read, linked from hotscripts)
- http://phppatterns.com/index.php/faq/faqlist/ , incl. http://phppatterns.com/index.php/faq/faqlist/3
also watch the comments.
Comments
A real eye-opener, thanks Ax
A real eye-opener, thanks Ax
But using "serious" apporach to develop PHP applications leads us to 100% OO, isn't it? I cant see other way for Drupal than complete rewrite in this case.
thats what i wanted to sugges
thats what i wanted to suggest next (going 100% OO, that is)
think about it ...
rewrite - oy
A complete rewrite isn't feasible, but one may dream ...
My ideal Drupal
- Object oriented
- Python
- features ZPT for themeing
- Structured text for composing
- Keep Dries and Kjartan as checkin police
+100 ;)
exactly what i'm dreaming about sometimes (how did you know? ). the only (strong) point i see against this is that python isn't nearly as popular and available as php as a web programming language. see the Apache Module Report from December 1st, 2002:
Count
%
Count
%
%
at least it's growing stronger ...
+1
my other main concern is performance, but I've seen interesting projects (like compiling python to native code)
--
Marco
Mod_python is not the only way
I don't think this is a fair comparison. PHP is used almost exclusively as an Apache module, while mod_python is just one of the ways to use Python for the web. There is also PCGI, FastCGI, mod_snake and good old plain CGI.
There are also other servers in use. Zope, for example, comes with it's own Zserver. Medusa is a rather interesting approach and Xitami is apparantly also widely used.
Besides, using the modules that come with Python you can write your own web server:
you can also write a web server in php
sure. i think the question is not how python can be used for the web, but how easy, reliable and performant it's deployment is.
python CGI is just too unperformant. using *CGI - how do you restart you long running process when the server reboots? same with Zserver etc? besides: which hoster has Zope/Medusa/Xitami installed?
i think mod_python is the best solution regarding deployment (python restarts when apache; it is quite performant), thats why i used it for comparision
It was about the popularity
Correct my if I'm wrong, but IMHO your post was about the popularity of Python as a web programming language.
Comparing PHP and Python popularity by looking at the use of a single Apache module underestimates the actual use of Python a bit I think. There are a lot of different ways to serve Python generated pages in use compared to the almost exclusive use of PHP with Apache.
By the way, I agree that mod_python is one of the best ways to integrate Python with Apache, but that is beside the point.
doesn't zope already provide most of this?
i've played with zope a bit in the past and it's amazingly flexible, the frustration that almost everyone i've talked to shares is that the barrier to getting started is pretty hard (ie. if you just want an app that does "X") and all the pre-written apps (wiki's, weblogs, trouble ticket systems etc) are all half finished and seriously lacking features compared to their non-zope competitors.
adam.
Zope is maddenning
I've tried to understand Zope for hours upon hours. Istep through it in the debugger, and I still can't follow in detail how a request gets served. Zope provides so many features, for free, that is is amazing. But the learning curve is so steep.
For a large project, I prefer to use a framework that I can understand in total, like Drupal.
what about zope type tools in php?
i totally understand, i've tried with zope repeadly as well and always ended giving up.
out of curiousity has anyone played with the "zope like" tools written in php? the ones i've seen are ariadne, php application server and phportal.
adam.
Python is not Zope
There appears to be a general misunderstanding that Zope is the one and only way to use Python for web programming. This is no big surprise as Zope is used as the primary Python success story.
Althoug Zope is a powerfull framework, you do not have to use it to develop web applications in Python. The language comes with a lot of modules that makes web programming fast and easy, and there are a lot of third-party extensions.
For example, mod_python is a nice way to integrate Python with Apache, Cheetah is a flexible and fast template engine (partly inspired by Smarty) and Webware provides enterprise-level web application components (think NeXT/Apple's Enterprise Objects and Sun's Enterprise Java Beans).
That having said, it took me three books about Zope before I realized that it was also possible to forget about this heavyweight approach and just write Python web code without it.
Twisted
Don't forget about Twisted when discussing Python network programming. They have a number of unique features including the best deferred execution implementation I've ever seen.
Also don't forget that the ZODB can be used standalone, without Zope.
.. dream on
- all content to be validated xml
- definable xml scheme for each user input element
- input editor to make use of xsl stylesheets (display) and xml schemes (validate input)
- output generated via xslt (via Apache Cocoon ?)
- markup via XSP
- still have the easy set up and go approach of Drupal
... dream on.
No need to rewrite
I cant see other way for Drupal than complete rewrite in this case.
No need to rewrite, at least what it is working
New module or new module changes could use classes. You can write classes and just modify what call the hooks to include call_user_func() and method_exists()
The main problem, in design terms, would be PHP's single inheterance capability. A modular system such as Drupal would greatly benefit from multiple inheterance...
Just have to disagree.
Nonsense. Java isn't limiting in not providing multiple inheritance, and nor is PHP. It brings as many problems as it solves. I can't actually think of a single situation in Drupal-like CMS systems where multiple inheritance would actually be useful, or where the lack of it couldn't be coded around by elegant structuring.
Going OO would require a complete rewrite, because all the core hooks, etc would need to be migrated to OO. This will break everything utterly, and there won't be an easy migration path. It's not something that you can rewrite bits of at a time.