Thread Closed

Python/Perl/PHP versus Java

 
Share Thread Thread Tools
Mar17-05, 06:30 PM   #1
 
Recognitions:
Retired Staff Staff Emeritus

Python/Perl/PHP versus Java


In terms of enterprise web development why would you choose Java over Python/Perl/PHP? I ask this question because i've done significant web development with both Python and PHP and have recently been dabbling with jboss/tomcat/j2ee and have found that Java is very cumbersome. Not only is it a pain to program for, it is a resource hog. My personal opinion is that Java is an unweildly language obfuscated by marketing/legal mumbo jumbo. Just trying to find/download anything from Sun's website requires an immense amount of patience. I've come to the conclusion that the only companies wanting to implement any web frontend/backend in Java have a huge burning hole in their pockets.

Sorry if this sounds like a rant, but I just want some honest responses.
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Bird's playlist could signal mental strengths and weaknesses
>> Minus environment, patterns still emerge: Computational study tracks E. coli cells' regulatory mechanisms
>> Bacterium uses natural 'thermometer' to trigger diarrheal disease, scientists find
Mar17-05, 06:32 PM   #2
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
For back-end web development, I'd pick one of the text-processing-oriented langauges like PHP, too. If I needed object-orientation, I'd pick Python.

- Warren
Mar17-05, 07:20 PM   #3
 
Recognitions:
Retired Staff Staff Emeritus
I totally agree. Then why are so many companies investing in Java? Is there something special that Java provides that would compel them to choose this technology? I think Yahoo got it right:

"Yahoo is a cheap company. It can't afford to waste engineering resources."

They are currently running on php with a sprinkling of python.
Mar17-05, 08:08 PM   #4
 

Python/Perl/PHP versus Java


If you wanted to do anything multi-threaded, or distributed, Java makes it pretty easy.

I have not found Java servlets to be that cumbersome. I haven't tried the J2EE/Struts stuff.

PHP is good for doing simple things - but becomes a pain for large, complex projects because it is untyped.

Last time I tried Python, their DB support wasn't up to snuff, at least for the DBs I was using - PostgresSQL and MySQL(yeah I know - yuck)
Mar17-05, 08:28 PM   #5
 
Recognitions:
Gold Membership Gold Member
Quote by so-crates
If you wanted to do anything multi-threaded, or distributed, Java makes it pretty easy.

I have not found Java servlets to be that cumbersome. I haven't tried the J2EE/Struts stuff.

PHP is good for doing simple things - but becomes a pain for large, complex projects because it is untyped.

Last time I tried Python, their DB support wasn't up to snuff, at least for the DBs I was using - PostgresSQL and MySQL(yeah I know - yuck)
Perl and Java both have the best DBCs. Even moreso, Java's DBC support is more optimized for higher-end databases like Oracle or Sybase.
Mar17-05, 08:32 PM   #6
 
Recognitions:
Gold Membership Gold Member
Quote by dduardo
My personal opinion is that Java is an unweildly language obfuscated by marketing/legal mumbo jumbo. Just trying to find/download anything from Sun's website requires an immense amount of patience. I've come to the conclusion that the only companies wanting to implement any web frontend/backend in Java have a huge burning hole in their pockets.
Well Sun's target for Java is the professional market, not hobbyists. Java is a resource hog - 1.5 isn't that bad, but 1.4 and 1.3 both had some issues. Where Java really shines for web programming is high volume sites. You should hear some of the nightmares of people running Apache and trying to serve a high amount of users with a Perl frontend. You'll hear about all sorts of hacks (mod_perl hacks and DBC modifications) , etc. to help ease all the simultaneous database connections that are going on. I've heard of similar nightmares with Python and PHP.

Also, most companies that do use Java for web frontends don't worry about the complexities of Struts, J2EE, etc. They have programmers that just worry about writing the frontend, and system administrators that implement the applications once they've been written. I'm sure you're finding it tedious to try to program with Java and maintain a J2EE configuration. That's not what any real environment will be like, though.
Mar17-05, 08:44 PM   #7
 
Recognitions:
Retired Staff Staff Emeritus
Python makes mutli-threading a piece of cake. Two interfaces are provided. The low level interface and the easy way is to basically do this:

start_new_thread(function_name, args)

You can't get any simpler than that.

The other interface is high level uses the thread class. You pass the target and various other parameters to the constructor. To start the thread you do threadname.start(). You can even daemonize a thread by using the setDaemon function.

------

As for distributed computing, just check out the original Bit torrent project. IBM also offers a good intro into grid computing with python:

http://www-106.ibm.com/developerwork...rpintro-i.html

------

If Yahoo isn't big enough I don't know what is. Also check out Sourceforge.

------

I haven't had an issues with the postgresql bindings. If it is an issue you can always create a c++ module that uses the c++ bindings that you import into your programs. But I guess thats what they do already anyway.
Mar17-05, 08:53 PM   #8
 
Recognitions:
Retired Staff Staff Emeritus
Quote by graphic7
Also, most companies that do use Java for web frontends don't worry about the complexities of Struts, J2EE, etc. They have programmers that just worry about writing the frontend, and system administrators that implement the applications once they've been written. I'm sure you're finding it tedious to try to program with Java and maintain a J2EE configuration.
That's a major problem. You need more people maintaining and as a result costs a lot more money. I would prefer to throw more computers at the problem than pay full salaries.
Mar17-05, 10:09 PM   #9
 
Quote by dduardo
That's a major problem. You need more people maintaining and as a result costs a lot more money. I would prefer to throw more computers at the problem than pay full salaries.
I agree. Almost any language can be made to work in a situation if you're willing to throw enough time and money at it. What does that tell you about the language? Almost nothing.

People are far too willing to forgive programmers and companies that produce overly complex products and then justify it after the fact by claiming that the tool is only "designed for professionals". There's a big difference between "designed for professionals" and "you need lots of time and money to burn in order to make this work". The second doesn't necessarily imply the first.
Mar17-05, 10:21 PM   #10
 
Recognitions:
Gold Membership Gold Member
Quote by master_coda
People are far too willing to forgive programmers and companies that produce overly complex products and then justify it after the fact by claiming that the tool is only "designed for professionals". There's a big difference between "designed for professionals" and "you need lots of time and money to burn in order to make this work". The second doesn't necessarily imply the first.

Are you referring to Java in this statement?
Mar17-05, 11:19 PM   #11
 
Quote by dduardo
If Yahoo isn't big enough I don't know what is. Also check out Sourceforge.
And what language does Yahoo use for Yahoo! Games?
Mar17-05, 11:28 PM   #12
 
Quote by graphic7
Are you referring to Java in this statement?
Somewhat; for things like J2EE (which actually was designed for large, heavyweight systems) I don't think it's wrong to tell someone that this tool wasn't designed for them. So long as it's done up front.
Mar17-05, 11:35 PM   #13
 
Recognitions:
Gold Membership Gold Member
Quote by master_coda
Somewhat; for things like J2EE (which actually was designed for large, heavyweight systems) I don't think it's wrong to tell someone that this tool wasn't designed for them. So long as it's done up front.
Well, if you disect the J2EE acronym you get Java 2 Enterprise Edition. This should tell you whether or not it's designed for you. I won't argue the fact that J2EE is a very complex product. You have Tomcat, ant (I believe, they're including this nowadays), and the whole administration interface, a few plugins for LDAP, Web Start (this allows rapid remote deployment of Java applications - very nice, too), plus J2SE.

Disecting J2SE, we have Java 2 Standard Edition. I don't think anyone would argue that J2SE is overly complex. There's the JVM, the bytecode compiler, source code, the API documentation, a few other little things (like the debugger, remote debugger, Web Start client, etc.)
Mar18-05, 07:55 AM   #14
 
Recognitions:
Retired Staff Staff Emeritus
Quote by so-crates
And what language does Yahoo use for Yahoo! Games?
so-crates, of course Java can be used to make online games, but I actually prefer flash games because the stupid JVM doesn't keep on crashing. Regardless, the focus of this thread is on server-side programming, not client-side.
Mar18-05, 08:20 AM   #15
 
Recognitions:
Retired Staff Staff Emeritus
Quote by graphic7
Well, if you disect the J2EE acronym you get Java 2 Enterprise Edition. This should tell you whether or not it's designed for you. I won't argue the fact that J2EE is a very complex product. You have Tomcat, ant (I believe, they're including this nowadays), and the whole administration interface, a few plugins for LDAP, Web Start (this allows rapid remote deployment of Java applications - very nice, too), plus J2SE.
This is what I mean by marketing mumbo jumbo. If I forked Python and renamed it to Python Enterprise Edition, other than being a really bad acronym (PEE) , does this make it any more appropriate for enterprise level programming?
Mar18-05, 09:28 AM   #16
 
Quote by graphic7
Well, if you disect the J2EE acronym you get Java 2 Enterprise Edition. This should tell you whether or not it's designed for you. I won't argue the fact that J2EE is a very complex product. You have Tomcat, ant (I believe, they're including this nowadays), and the whole administration interface, a few plugins for LDAP, Web Start (this allows rapid remote deployment of Java applications - very nice, too), plus J2SE.

Disecting J2SE, we have Java 2 Standard Edition. I don't think anyone would argue that J2SE is overly complex. There's the JVM, the bytecode compiler, source code, the API documentation, a few other little things (like the debugger, remote debugger, Web Start client, etc.)
Just sticking "Enterprise Edition" into a name isn't being upfront. Sure, I know that some guy running a server out of his basement shouldn't use it, but how large should a company have to be before they have enough resources to get a J2EE-based system working?

I think the standard edition is unnecessarily complex, but it's still good enough to be useful. I just wish more of an effort was made to make the language good at doing simple things.
Mar18-05, 12:06 PM   #17
 
Recognitions:
Gold Membership Gold Member
Quote by dduardo
This is what I mean by marketing mumbo jumbo. If I forked Python and renamed it to Python Enterprise Edition, other than being a really bad acronym (PEE) , does this make it any more appropriate for enterprise level programming?
Would PEE have LDAP plugins, a rapid remote installation service, Tomcat, a Python make, a web administration interface?

If PEE did have a simple package that contained Python, bundled with Apache and some plugins, a sleek web administration interface to distribute the Python apps to multiple servers, I would consider that Enterprise. If you haven't gotten it by now, an "Enterprise" package is something that is easy to administer for a high volume of users. J2EE has a all of thus: a) the web administration interface makes it very, very easy to move Java apps/containers across systems b) for client-side apps, show me a utility that does something like Web Start c) there's plenty, plenty of API documentation.

Java could be streamlined a bit more. What people neglect to think of is that Java is a whole language. C has been around for much longer, and it's integration into an operating system is much cleaner. Sun, however, has to produce a version of Java for Linux, Solaris, and Windows, which is by no means an easy task. Each of those OSs are supported as well as the other ones (there are a few exceptions pertaining to file i/o and SWT). Sun also produces an Enterprise distribution for each of those respective platforms. Does Perl, PHP, or Python have a single package for Linux, Solaris, and Windows to install that configures Apache, comes with a slick web interface, and much more? No, you do it yourself, and that does not qualify it as enterprise-worthy.

Edit: Zend, a PHP server that is propiertary, is an exception to the above statement about Enterprise readiness.
Thread Closed
Thread Tools


Similar Threads for: Python/Perl/PHP versus Java
Thread Forum Replies
Python VS Java Programming & Comp Sci 13
AJAX versus JAVA Computing & Technology 45
Java or Python Computing & Technology 13
Perl Computing & Technology 16