velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Harrison <>
Subject Re: Switching from PHP to Java/Velocity, Performance?
Date Thu, 13 Apr 2006 01:55:01 GMT
Dominik Bruhn wrote:
> Hy Will,
> thanks to your response. My question was not only concerning Velocity but also 
> about Java in General in Comparison to PHP. I hope that there are some 
> Developers who have user Java and Velocity in realy huge sites. 

You must also consider complexity. If you have a site which is simple 
then PHP will probably be fine, even under heavy load. However, if your 
application is complex then Java shows its mettle.

You *can* write nice PHP code, but it requires a disciplined developer. 
You can also write horrible Java code, although its less permissive 
about what it allows at compile time (strong typing).

The point is that each language has its role, and I think blanket 
statements like "PHP is not a language" are not helpful. Python for 
example is a great language, and we have used it several times to 
develop quick solutions that would have been substantially more 
difficult in Java.

However, with the infrastructure around Java/Struts/Velocity the actual 
code you have to write is greatly reduced, and whats left is simplified. 
For web apps Java/Tomcat/Struts/Velocity remains a credible and 
effective solution.

The downside to Java I feel is a pretty long learning curve compared to 
other languages. It is certainly more verbose, and has quite a few 
elements that make life complex.

PHP and Python on the other hand have not developed the same 
infrastructure to date, although if you want a CMS there are many 
options that will be a good start.

As for performance, I must agree that performance is a question of 
architecture and complexity. Complex applications will be slower because 
they need more DB time and more CPU. The best way to handle this is - as 
a previous poster said, keep everything cached where possible, hit the 
db the least possible, and keep the architecture open so you can deploy 
multiple web servers as part of a cluster.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message