tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Manico <>
Subject Re: JRuby sucked up the bath water but left the baby behind.
Date Tue, 17 Jun 2008 10:42:24 GMT
You can not write enterprise-class, secure, web-centric software with 
PHP or RoR. The jury is still out on Python.

To gain the benefits of Java you would need to turn the PHP language 
into - Java. So far, all projects that try to spit out bytecode via a 
non-Java language have failed.

Writing enterprise-class software is difficult. There is no way around 
it. The idea of "running PHP on Tomcat" should be taken out back and 
executed Sopranos-style.

- Jim
> ----- Original Message ----- From: "Clifton Brooks" 
> <>
> To: "Dev Tomcat" <>
> Sent: Tuesday, June 17, 2008 9:22 AM
> Subject: JRuby sucked up the bath water but left the baby behind.
>> Instead of binding Ruby to Java as in JRuby, or Python to Java as in 
>> Java,
>> we have to find a way to compile Ruby on Rails applications, .py 
>> files, and
>> PHPs into java servlets.
>> Although I adore programming in Java, most web developers simply find 
>> it too
>> difficult to learn.  They prefer PHP, RoR, and Python because all 
>> three are
>> easier to learn and use without understanding.  These languages don't 
>> scale
>> as well and sacrifice run time efficiency for development time 
>> efficiency.
>> The greatest advantages of servlets include:
>> 1.  The fact that they parse requests and generate responses through 
>> method
>> calls instead of operating system processes or Fast CGI.
>> 2.  JNDI connectivity, particularly database connection pooling.
>> 3.  WORA and platform independence.  (More a factor compared to .NET 
>> than
>> the open source technologies.)
>> Sadly, JRuby and Jython are just interpreters written in Java and 
>> they run
>> more slowly than the original binary interpreters.
>> If, instead of interpreting JRuby, PHP, and Jython, Tomcat, or some
>> extensions for it, could compile programs in these languages into java
>> servlets, then all of the advantages of the Java world will instantly 
>> become
>> accessible to these popular languages.  This suggestion is analogous 
>> to the
>> .NET model which compiles any language into Windows only byte code.  
>> Here,
>> any language compiles to platform independent, Java bytecode.
>> I love Java as a language, and almost always prefer to develop in it, 
>> but
>> maybe it's greatest virtues aren't syntax and grammar.  Most web 
>> application
>> developers prefer PHP for reasons similar to those which make RoR
>> appealing.  However, the technologies underneath these languages don't
>> measure up to the JVM and Tomcat or other Servlet containers.  This 
>> causes
>> all sorts of scalability problems, and it slows down the entire 
>> internet.
>> When and how can we grant Java infrastructure to PHP developers?  
>> When and
>> how can we compile PHP, Ruby, Python, and other web application 
>> languages
>> into Servlets?
> I dont know about the feasibility of this, some clever person can 
> figure it out, but there is definitely a market for PHP in tomcat.
> The question comes up in the user groups. I imagine there are 
> practical challenges to that and the half cocked Servlet solutions out 
> there seem to be reinventing PHP in JNI, and doing a fairly bad job.
> I was wondering if an extension to the Apache runtime would not be a 
> better way to go... APR + PHP_R kind of idea.
> And then just look for some cool but simple interop. Like a servlet 
> can forward to PHP, and visa versa.
> ie you can just use TC for your PHP, and you can get it integrated to 
> some degree with servlets.
> ... ie take two great technologies and bring them a little closer, not 
> a competitive product, just closer coop.
> Make servlets and PHP better bed mates. The idea is that as Apache PHP 
> is developed further, TC gets the leverage, with a few perks.
> "Damn thats a nice WIKI in PHP... I'm going to drop it into TC, add 
> the PHP_R engine to TC and forward requests to it from my servlet"... 
> something like that.
> If PHP starts a session in this env, servlets see it as well... so 
> theres a little engine overlap, but otherwise Apache TC are 100% compat.
> Bean passing with primitive types would add a creative dimension to it.
> JRuby is cool, but I feel if you want to write a powerful site all in 
> j script... well, you get what you made.
> I think that any leverage in that area will come from the JRE itself, 
> now that Sun is backing ruby, in the form of a JIT Script engine or 
> something like that in the JRE, so I think, not worth the investment. 
> The compilation of scripts to Java could first be attempted external 
> to TC... if they get it right, well its just a java class that TC can 
> use.
> Servlet + PHP as bed mates == most internet solutions
> Now that product like Netbeans are bringing in PHP editors, allowing 
> for hybrid solutions makes even more sense.
> Just a thought ;)
> --------------------------------------------------------------------------- 
> The most powerful application server on earth.
> The only real POJO Application Server.
> See it in Action :
> --------------------------------------------------------------------------- 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Jim Manico, Senior Application Security Engineer |
(301) 604-4882 (work)
(808) 652-3805 (cell)

Aspect Security™
Securing your applications at the source

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

View raw message