[CLUG-tech] AJAX - PHP or Python long term?

Dewaldt van Wyk noesisid at gmail.com
Sun Dec 9 11:55:34 SAST 2007


Hi Wayne

I think it all depends on what your long term goals are. I Happen to
use PHP for the web, but for me it is a personal choice. A couple of
years ago I bargained on the fact that PHP would become a popular
server side scripting language.  That it did, but it is not all a good
thing. PHP certainly has the capacity to power great sites -- just
have a look at the mediaWiki project. Unfortunately, because it is
also so popular, every Tom , Dick, and Harry  decide to release an
opensource PHP project. What you find is  really crappy projects. So ,
just because there are tons of PHP projects out there doesn't mean
they are any good. I happen to find the bulk of them wanting. A lot of
developers blame the PHP language, I blame the programmers. I happen
to like the fact that the language doesn't require me to be "formal"
so I can quickly mash up something if I have to.

With Ajax, I find that on a small project, that the bulk of the
complex programming goes into the representation, the front-end in
other words; I am working on a PHP based AJAX workflow /  collaborator
and I have done everything from the ground up. I had a look at some of
the AJAX Javascript toolsets, and although great, I was reluctant to
use any of them for the following reasons:

1.  50+  odd pages of Javascript code with very few comments. If you
have never written your own ajax routines, and understand the basics
of AJAX dataflow, how are you going to debug it?
2. Do you really want someone else's code (that you might not
understand) at the heart of your project?
3. I was able to write a 2 page AJAX JS implentation that does exactly
what I want. XmlHTTPrequest objects are created and re-used as
necessary. Every request gets a process ID which gets tracked all the
way through to the server and back. I can trace any error that way. At
the moment, there are 2 weird server exceptions that the routine does
not yet handle very well, but I should be able to fix it with a few
lines more.

In other words, I would recommend you write your own AJAX JS
implentation for your first project just to come to grips with the
technology.

For me, the tricky part of AJAX is not the back-end. Why not use a
language that you are comfortable with and enjoy? If you like Python
and it does it well, why not? Don't use PHP because most people do,
but if you want to use PHP, it is also ok. It certainly does the job.

Another thing. Be very careful of complex, CPU intensive Ajax designs.
Zimbra's ajax interface hogs the browser. This is not to say that the
Zimbra design is utterly flawed, but browsers are really in their
infancy when it comes to handling very complex ajax designs. I read an
article on ajaxian (http://www.ajaxian.com/) about the current
problems with complex ajax interfaces on the browser, and I tend to
agree.

Have fun with AJAX!


More information about the clug-tech mailing list