The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

PHP V. Java by Psyop2005-05-04 04:30:37
  Hmm. by zeitnot 2005-05-04 05:08:34
>PHP has no built in user security or session management
>PHP has no built in support for sessions or user security

PHP has built-in session management. I have no idea what he means by "user security", but any security that can be implemented in Java can be implemented in PHP. The essence of security over HTTP is in things like SSL and other encryption functions, session management, and cookies. Java has that, PHP has that, ASP.NET has that, Cold Fusion has that...

>PHP Can scale only to a point, after which expansion and maintenance becomes expensive.

That's not true. The ability to scale way up is tied ideologically to object-oriented methodology. PHP is similar to C++ in that you are free to be as procedural or object-oriented as you want. The larger ths sytem becomes, the more you can assimilate long code segments and functions into objects.

Java forces you to be more object-oriented right from the start. It's also very strict about data types. In my experience, it's very difficult to hammer together a "quick and dirty" solution with Java when management is yelling for a solution right this second. It's usually easier with PHP.

The premise that Java code will scale better than PHP code is based on the trade-off of forcing you to design with absolute correctness right from the get-go. You spend more time designing on each component, spreading out the time required for designing a whole enterprise system "correctly" as opposed to lumping it together into one big re-design when you have to scale up beyond a certain point.

But the truth is this: the quality of your code is the key to scalability, regardless of your choice of language. PHP allows you to be messy if you need (or want), or as structured as you want. Java demands structure right away. But you can still make a mess out of Java, just as badly as you can with PHP.

Here is some food for thought: PHP is a concrete product, not just a language standard. Java, however, is a language with many implementations. Whose Java is he talking about? Usually we mean Sun Microsystems, but server-side Java has many implementations: IBM Websphere, Sun J2EE, BEA Weblogic...

...all these guys have their own Java virtual machine and their own language extensions and so forth. With each product comes its own set of idiosyncracies and quirks. If you go with Java, you are having to pick one of these. And then you need to get developers up to speed on that particular product.

Sun J2EE is probably the least expensive to deploy- I think you can just download it and start using it, like PHP. (Correct me, anybody, if i'm wrong on that...) The rest of them are commercial products and you'll have to buy them.

Should you decide later that you need to port from one Java platform (Sun J2EE, for example) to another (IBM Websphere, for example) it's probably going to cost significant time.

The only way you are going to permanently defend yourself against this guy, I'm sad to say, is to educate yourself really well on Java, and also learn/refresh yourself on compiler techology and virtual machine architecture and such. You need to know more than he does, period.

Good luck!
[ Reply ]
    I forgot - a word of caution by zeitnot2005-05-04 05:14:55
    "their own language extensions" by ToLazyToThink2005-05-04 09:10:44

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)