Forum Moderators: phranque

Message Too Old, No Replies

Java vs. PHP

If you had to choose

         

webjourneyman

3:52 am on Apr 20, 2006 (gmt 0)

10+ Year Member



I´m trying to decide between two open source CMS, one is programmed in Java, the other in PHP. Since I figure I might eventually like to make changes to the core I would like your input on pros and cons of each. Nothing fancy or in deapth info needed, just your "feel" of either programming language if you have experience.

Or, if you had to choose between the two whitch would you choose?

webjourneyman

2:07 pm on Apr 20, 2006 (gmt 0)

10+ Year Member



Java is more of an industry standard while PHP is more used by hobbyist.

Java has standards while PHP has none.

More libraries for java than for PHP.

PHP is easyer to learn.

Better sandbox in PHP

FourDegreez

7:37 pm on Apr 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use both; PHP for smaller projects and Java for more complex or "critical" projects, generally. It is easier/faster to code in PHP. It just seems a bit more "amateurish" than Java, and doesn't allow for robust OO coding, tier separation, and other buzz words. (I'm sure some will argue otherwise)

One benefit of PHP is that it is (ironically) more portable than Java, since it's an interpreted language and nearly all hosts support it. To support Java, you need a JVM running and that adds extra complexity that many hosts don't want to bother with, unless you've got a dedicated package or some other setup that provides the JVM. Since PHP code is interpreted each time it loads it will never perform as well as Java or allow you to catch errors at compile time (there is no compile time), although there are various optimizing and caching mechanisms to help with performance.

Anyway, just some thoughts.

hakre

10:02 am on Apr 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi webjourneyman,

that's not an easy to answer that question. you find people which dislike php and ones which dislike java (like I strongly do).

for java: there a a lot of students learning java. indeed they may have no sense for programming but as long as they are able to catchup your clients deadlines you're free to go with them. just coders.

for php: as with java, there are a lot of hobby-programmers which just show that the language is useable for many things. it's more a language for the web-frontend of many different kind of applications and doing a great job.

for both i think it's hard to get valuable programmers.

anyway, java has a large amount of overhead so it might be just stupid to use it.

but all this is only about the language and has nothing to say about the two cms-es you'd like to choose between. which are they?

webjourneyman

12:44 pm on Apr 24, 2006 (gmt 0)

10+ Year Member



Its either the php based joomla or the java based imcms.

Thanks for the reply

hakre

3:20 pm on Apr 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



as far as i can see - i do not know icms very well - does icms provide far more features then joomla.

joomla has also some problems with the xhtml document structure even if some contributors want to see these limitations removed. because of this and some other signals i assume that the joomla codebase is not well done even if many people still tend to say it's easy to use. you should take a view into the source first and make your own impression.

for icms i even haven't viewed the source so i can not tell you something from that angle.

but anyway i think it's a matter what kind of features you need.

webjourneyman

6:36 pm on Apr 24, 2006 (gmt 0)

10+ Year Member



Thanks for your reply, since you prefer and are knowledgable about PHP perhaps you can tell me something about Ruby on Rails. The feature Im hoping a cms would help me with is to enable readers to contribute to a choose your own adventure story site. The contributor should be able to define from and to what page (part of story) his entry links.
Since all the cms´s Ive looked at require modification I was thinking perhaps I should just make it myself. RonR should do the job, or?

Moosetick

7:17 pm on Apr 24, 2006 (gmt 0)

10+ Year Member



If you are planning on having someone else host your server you will find it much easier to have PHP hosted than Java. Nearly all hosting services provide PHP. Java isn't as widespread.

Of course if you are planning on hosting yourself or on a dedicated server then that is not an issue.

Java is more powerful in the hands of a good programmer.

To get the best choice, you have to ask yourself what are you going to be serving. If its just calling records from a small database(less than 1M records) and doing basic queries then PHP may be the way to go. If you really need high end threading, data manipulation, and true OOP then Java may be best.

Frankly, I would suspect that 99% of web apps could be handled by PHP with ease.

webjourneyman

8:58 pm on Apr 24, 2006 (gmt 0)

10+ Year Member



Thanks all, I think I´ll settle on PHP, Java is probably an overkill for the thing I had in mind.