PDA

View Full Version : PHP pros and cons


camel
23 Jun 2005, 12:24
i'm faced with a very finicky client (Parliament) that wants an OSS solution, i'm trying to convince them to go with a Java solution they seem very insitent on PHP.

now one of us needs to be convinced, me to go PHP, or them to agree to Java.

My justification for Java....


compiled not scripted language
quicker?
stabler?
more reliable in enterprise solution
pros for php

???:confused:

Shrimp
23 Jun 2005, 12:49
Hmm, for PHP over Java I'd say:

Scripted, not compiled.
Quicker.
Stabler.
More reliable (my current project is being used by every branch of our company, as well as many of their customers, not 100s of users, but more than enough to prove it's perfectly reliable, and has never let me down once since the project starter about 4 months ago).


I can't really think of any cons... :P

hai2u
23 Jun 2005, 13:09
Pros for PHP... Uhmm...

Yea it can... oh... uhhh....

No you've got me.... Servlet solutions beat server side scripting hands down.

camel
23 Jun 2005, 13:58
PHP stabler than java, and more reliable, sorry dont buy it, wasnt it this site that got hacked?
and how can it be quicker than a compiled language?
and when i mentioned Parliament, that implies thousands of users as it will be an internet site.

Shrimp
23 Jun 2005, 14:06
Umm, if you wrote Java code with a flaw in, that could be hacked any day of the week same as this one...

Thought you wanted opinions... *shrug*

PHP is increasingly being used in many 'enteprise' applications across all types of businesses, with thousands of users on very high traffic internet and intranet sites. I see no reason why it can't be classed as a reliable enterprise solution.

That's also my opinion but anyway *shrug2*

Shrimp
23 Jun 2005, 14:12
Ok maybe I sound too much like a fanboy, which doesn't really help you... Sorry.

On the other hand you don't sound to willing to try ;).

camel
23 Jun 2005, 14:36
Servlet solutions beat server side scripting hands down.

I am of the same opinion

camel
23 Jun 2005, 14:42
soz shrimp about being so abrupt, i do have the inclination to not use scripting, much rather compiled code, yes i agree about the flaws in a code being responsible for security.
And i wanted fanboys opinions, thats why i posted here :P, want to know what the hype is about,
so the way i see it is PHP = ASP (on a technology level)?

Shrimp
23 Jun 2005, 15:01
Hmm, yes, much closer to ASP than to Java on a technical level. But on a features and ease of use level I'd say it's way above both of those :)

camel
23 Jun 2005, 15:41
ok but then, i'm not convinced to go PHP, how do i convince parliament?
its not like they gonna do the work, or host it.
Java is as free as PHP.

DawEEd
28 Jun 2005, 17:31
Soz, got to this thing a bit late....

Trying to compare php to Java is like trying to compare cake flour to a food processor.

Security is dependenant on how well you write the software and the platforms and technology used.

The whole architecture of Java just surpasses that of PHP, if a person is asking this question obviously they missed something in the fundamentals of Java, go RTFM. PHP may have moved on since my last work with it, back then I found it short of Lasso which is another server side scripting option, but it's not free.

But what it mainly comes down to is the scalability u need, the load or spread of load over servers. I have yet to see someone successfully use PHP for a multi-tier solution. multi as in a three tier or more.

I especially like the Java class loader capabilities, where u can call classes dynamically , reload them if you changed it. Java architecture, makes it run better the longer it runs. It indexes the methods and classes most used.

Oh yes Happy Birthday Java, turned ten a couple of days ago.

camel
29 Jun 2005, 17:26
OMG, I had someone actually believing and trying to convert me (like the true bible basher spirit) to believing that PHP is THE way, and that scripted stuff is as fast if not faster than compiled.
UM, who in development here has found that a complex piece of code runs faster on script than in compiled languages?
in my experience even VB is faster than vb script. (about 20 times)

]E[::NameLess
29 Jun 2005, 22:26
ye i agree

camel
30 Jun 2005, 16:57
http://www.osnews.com/story.php?news_id=5602&page=3

<A>Nom@n
01 Jul 2005, 07:09
heh I like php more too - can't give you bulletpoint list of why though :/
i only use java when necessary.
i just keep hearing our java developers moaning about how crap java's cleanup (i think they called it trash collection) is and how the server kept falling over above 200000 transactions per second because of this - guess they scared me away for life :P

btw nice php page there comparing java speed
/me ducks

Shrimp
01 Jul 2005, 08:27
Well there are plenty of *massive* sites using PHP which generate shitloads of traffic and data if you're looking to compare things.

Start with something like http://sourceforge.net/ - Completely PHP powered. A site that I'm sure serves many millions of hits a day on it's 100 000 + projects, and well over a million users (excluding users who have registered or use many of those 100 000 project's forums and other services).

Another pretty traffic and data intensive site - http://www.deviantart.com/ - completely PHP powered again. This site has thousands of users online at any one time, and a new artwork is submitted every few seconds at the very least. There are shitloads of forum posts, comments, journal entries, poll votes, favourites, etc etc submitted by the second and it manages all this perfectly.

Something closer to the gaming side of things - http://ataricommunity.com/forums/ - running the self same forum software as this. as of my typing this, there are well over 250 users online at the same time, with new topics and replys happening at an insane rate.

And something else: http://wikipedia.org/ - completely PHP again. As you know this site is absolutely massive boasting well over a million articles across all of it's supported languages , I'm not sure how many users there are, but just in the minute of "06:20", there were 32 submissions - more than a submission every 2 seconds.


All of these sites are up constantly, and have never seen them down for whatever reason. They also spew out pages and content at an insane rate, so I don't see any speed issues either. As for the 'enterprise', sites like SF.net and dA rely on these sites as are they *are* their enterprises.

camel
25 Jul 2005, 11:54
another thing to take note of.

http://www.tek271.com/articles/JavaOrPhp.html

thx shrimp for those sites, made some interesting browsing...

hai2u
31 Jul 2005, 23:27
What about a site like google.com which is entirely Python powered?

My problems with PHP are primarily, that because of general flaws in the syntax it is much longer to write something that would usualy be only a few lines.

Why cant you do Class->Method->Method? (If a method returns a class.)

Mostly there are poor ways to do things any language - but in PHP there are far more. The fact that register_globals was deprecated many a year ago hasnt changed the fact that php applications still use it.

Technicaly speaking, there are much better languages.

camel
01 Aug 2005, 20:27
thx Karny,

that was the kind of pros vs cons i was looking for, from someone that has used it and seen the light :P.

ok, i think this about wraps up my researching, i will present my research next week, you guys have made a difference ;). if client insists then i will get php developers, shouldnt be a problem getting those kina skills should there?

THX