aspose file tools*
The moose likes General Computing and the fly likes PHP ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "PHP ?" Watch "PHP ?" New topic
Author

PHP ?

bob connolly
Ranch Hand

Joined: Mar 10, 2004
Posts: 204
Hello!

I'm hearing alot of buzz around the office about PHP, and when asked by management, users ect, if we should be looking into PHP, i'd like to be able to provide somewhat of an intelligent reponse, ie one that will "hold water" at least for the next year or so!

Has anyone run across an "objective studies" of the pros and cons of JAVA vs PHP!

Thanks much for any references!



Thanks very much for any references!

bc
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
objective studies in IT?

PHP is at the moment (in technology) where Java was 6 years ago with JSP 0.92.
Spaghetti code, poor security (Java never had that), no maintainability.

It's a cross between JSP 0.92 and the first versions of ASP but without the option for external components (Javabeans/ActiveX controls).


42
bob connolly
Ranch Hand

Joined: Mar 10, 2004
Posts: 204
So based on what you're saying then Jeroen, we should be able to configure a 'detuned' version of Java and achieve the same
'performance' and 'ease of development' as PHP?

And if that's the case, then the big difference must be in having to learn the JAVA APIs, does that sound about right?

Thanks again Jeroen!
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
In my experience, that's not the difference.

The difference is that, because PHP is untyped, initial development is quicker. 99% of the time, the type conversions are performed the way you want them to be, without your having to think about them or worry about types.

The downside is that the other 1% of the time aren't caught by the compiler, and become bugs that tend to survive into production. The result is that, as a PHP site grows, it becomes harder and harder to maintain as type conversion bugs become numerous enough to start interacting.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I have seen a lot of younger programmers (highschool age) picking up php. Main reason I see, cheap hosts normally support it without any additional costs.

Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

http://www.coderanch.com/t/282883/JSP/java/JSP-Servlet-VS-PHP


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Moving to General Computing.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You might be surprised to see what PHP5 has brought to the table. My experience with PHP dates back to times when PHP3 was the "production-ready" version and things have progressed since then. For example, PHP5 supports object-oriented development to some degree. Not as well as Java/C# does, let alone SmallTalk/Ruby/whathaveyou, but still.

Of course it'll take quite a while for the old bad habits of code'n'fix PHP development to die away.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
I seem to remember that PHP was moving towards "objects" that didn't support data hiding/encapsulation. Since, in my opinion, that's the biggest benefit of using objects, PHP "objects" seemed pretty pointless to me.

Do PHP5 objects support data hiding (i.e., data members that are in a private scope, not accessible to functions outside that class)?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Warren Dew:
Do PHP5 objects support data hiding (i.e., data members that are in a private scope, not accessible to functions outside that class)?

Yes, they do.
bob connolly
Ranch Hand

Joined: Mar 10, 2004
Posts: 204
So based on reading these very helpful posts, including Gregg's previous 2003 discussions, i'm imagining that PHP has evolved considerably since 2003, so maybe i'll just cut to the quick and ask a question that's seems to be buzzing around the workplace lately - 'if you were planning on developing a web site, for use by 1 organization primarily, to be accessed locally and in the field, by about 300 financial analysts, who are heavy users of complex EXCEL spreadsheets, who will want to download, change, and upload their spreadsheets daily', would you include PHP on the list of development tools to be seriously considered for such a site?

Thanks again very much!
bc
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

I look at PHP as bearing the same relationship to Java as Visual Basic does to C++. PHP is a really great language to do "quick-and-dirty" webapps in, for one-offs and prototypes. It's much beter than ASP, for my money, since it was designed specifically FOR web use, and the object-oriented facilities make it much neater for larger projects.

OTOH, there have been a number of PHP-based exploits announced recently, and I'm personally more comfortable doing massively-complex interconnected systems using Java.

One thing I'm not comfortable with, however, is the common business practice of trying to run an enterprise off spreadsheets. As a data entry facility, Excel lacks good input editing and validation features. As a means of storing critical business info, it's only as secure as the desktop it's stored on, and only as up-to-date as the last person to push it back to an enterprise backup/recovery area.


Customer surveys are for companies who didn't pay proper attention to begin with.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by bob connolly:
So based on reading these very helpful posts, including Gregg's previous 2003 discussions, i'm imagining that PHP has evolved considerably since 2003, so maybe i'll just cut to the quick and ask a question that's seems to be buzzing around the workplace lately - 'if you were planning on developing a web site, for use by 1 organization primarily, to be accessed locally and in the field, by about 300 financial analysts, who are heavy users of complex EXCEL spreadsheets, who will want to download, change, and upload their spreadsheets daily', would you include PHP on the list of development tools to be seriously considered for such a site?

Thanks again very much!
bc


Desribing what the web site's functions are is typically not enough to determine the underlying technology. There are more important issues when making this decisions.

  • Security, as Tim mentioned, would be high on my list since you are accessing private documents appearntly outside the firewall of sorts.
  • Your hardware is something to consider. Are you running new hardware, old hardware? If it's old, is your company willing to beef it up/buy new hardware to support a java infastrcture? If not, PHP is a lot nicer with older hardware.
  • What do the developers know? What type of learning curve will there be implementing either technology?


  • And the list could go on. None of these really make a difference with respect to what the web app will do.

    Now, on an aside, and as Tim mentioned, I'm also am not sure about passing documents around. However, there are solutions ready-made for such things and a good idea would be to way the cost of implementing already built and tested systems vs developing one from scratch. The first one that comes to mind, because we use it where I work, is called Movaris. We use it to pass PDF's from one department to another to be approved by various people. I'm not sure how your excel doc passing around workds, but Movaris handles many different document types, including Excel. But search google for other alternatives.
    bob connolly
    Ranch Hand

    Joined: Mar 10, 2004
    Posts: 204
    Thanks again all!

    Really appreciate your help on this!

    bc
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: PHP ?