PHP5 a threat, or a complement to server-side java?

W

Willy Kreim

Hi,

I'm of the opinion that PHP5 is a big threat to Microsoft's
ASP-dot-Net.

However, I'd like to know what the java community think of PHP 5 and
its more robust features that supposedly should be attractive for
enterprise development.

Do you think PHP5 is a complement, or a menace to server-side java?.
If so, why?

Can you think of scenarios where PHP5 and Java can work together?

Now going into the Twilight Zone: What about Sun creating bridges
between the two (or embracing and extending) PHP into Java? Has this
been done?

I'm just shooting in the dark here. I'm a beginner php4 programmer,
and also a begginer *client-side* (mostly swing) java programmer. I'm
just trying to think about how Sun could face the surging popularity
of PHP and maybe benefit from it to improve everyone's programming
experience -without annoying the faithful on both camps-.

In short: "PHP5 and Java, opportunities or menace?" Discuss...

;-)

Thanks
Willy
 
T

Tim Tyler

Willy Kreim said:
However, I'd like to know what the java community think of PHP 5 and
its more robust features that supposedly should be attractive for
enterprise development.

Do you think PHP5 is a complement, or a menace to server-side java?.
If so, why?

Can you think of scenarios where PHP5 and Java can work together?

Now going into the Twilight Zone: What about Sun creating bridges
between the two (or embracing and extending) PHP into Java? Has this
been done?

``To help pave the way for reliable object-level integration, Zend is
working with Sun Microsystems to develop a standard method of
integration interface. The result will give PHP programmers the ability
to treat Java objects just like PHP objects. And without worrying about
JVM resource wasting, or system stability.''

- http://www.zend.com/php_and_java.php

``The proposed specification will describe which of these Java objects
will be exposed to pages written in other scripting languages. The
specification will be grounded on at least one concrete scripting
language example, PHP, but the concepts will remain independent of the
scripting language and, if at all possible, the EG will also explore
the bindings to at least another scripting language.''

- http://www.jcp.org/en/jsr/detail?id=223
 
S

Sudsy

Willy Kreim wrote:
I'm of the opinion that PHP5 is a big threat to Microsoft's
ASP-dot-Net.
I'm
just trying to think about how Sun could face the surging popularity
of PHP...

I don't know where you're getting your information but it seems very
biased. I mean, "surging popularity"?! Do you know what PHP stands
for? Personal Home Page!
I see more feet doing the walking TO server side Java, for all the
good and usual reasons. You have to decide whether you want to deploy
on an industrial-strength foundation or something else. I know where
my money is sitting...

(Of course this could also be a troll)
 
C

Chris Smith

Willy said:
I'm of the opinion that PHP5 is a big threat to Microsoft's
ASP-dot-Net.

However, I'd like to know what the java community think of PHP 5 and
its more robust features that supposedly should be attractive for
enterprise development.

I'm afraid that you're speaking about completely different application
spaces here. Not sure what "enterprise" means to you, but it's possibly
not the same thing that word means to most anyone else. I just looked
over the list of new features in PHP 5, and while they are all nice,
they do not represent a list of helpful enterprise features. Rather,
they represent a move toward doing OO right. That's something that is
to be admired in PHP, but has existed in plenty of other languages for
plenty of time.

The limiting factor on PHP adoption is that PHP is rather intrinsically
web-oriented, and thus is best suited for an application space where the
hard problems of development are in the web presentation layer. That's
not true for enterprise-level development, where the hard problems are
often found in distributed transactional integrity (hence the popularity
of EJBs despite their many weaknesses), or in implementing business
rules and retaining the flexibility to change them easily without the
potential for mistakes, or in achieving high levels of scalability with
multi-processing and distributed programming. Web presentation is a
pain, sure; but hardly worth choosing a technology for.

On the other hand, Tim mentioned some upcoming ability to use PHP in
conjunction with Java code, and I can certainly see some promise there.
If nothing else, PHP seems to be quite popular for its convenience in
embedding code into pages, which is clumsy in Java. Various web
presentation layers have attempted to fill that space, and most have not
succeeded very well. It remains to be seen whether JSP 2.0 EL will
obsolete that need, or another language will take that place instead in
the near future. Since JSP 2.0 is so new (about six months old), I
haven't seen a lot of adoption yet.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
S

Steven J Sobol

Willy Kreim said:
Hi,

I'm of the opinion that PHP5 is a big threat to Microsoft's
ASP-dot-Net.

However, I'd like to know what the java community think of PHP 5 and
its more robust features that supposedly should be attractive for
enterprise development.

Do you think PHP5 is a complement, or a menace to server-side java?.
If so, why?

*shrug* I really don't know. PHP5, (and to a great extent PHP4) and ASP.NET
and Java have many of the same features. I've implemented web services
on my server using PHP4 and XMLRPC, for example. I have a Java desktop
client I'm creating to take advantage of the services I've created and will
also be doing a PHP web client.

I think Java and the Microsoft .NET languages are more feature-rich than
PHP is, but there aren't a ton of things you couldn't do with .NET *or* Java
*or* PHP.

**SJS (I use Java and PHP and like using both.)

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
S

Steven J Sobol

Sudsy said:
I don't know where you're getting your information but it seems very
biased. I mean, "surging popularity"?! Do you know what PHP stands
for? Personal Home Page!

I don't believe that's correct, and even if it is, so what?
I see more feet doing the walking TO server side Java, for all the
good and usual reasons. You have to decide whether you want to deploy
on an industrial-strength foundation or something else. I know where
my money is sitting...

(Of course this could also be a troll)

So could your first paragraph. PHP4 is very capable of doing much of the
stuff that Java does, although i don't consider PHP a replacement for Java
in every case.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
S

Steven J Sobol

Chris Smith said:
they do not represent a list of helpful enterprise features. Rather,
they represent a move toward doing OO right. That's something that is
to be admired in PHP, but has existed in plenty of other languages for
plenty of time.

Concur... PHP doesn't have and never has had proper OO.
The limiting factor on PHP adoption is that PHP is rather intrinsically
web-oriented

But here I must point out that I believe that the .NET languages are too.
Just not primarily focused on the web like PHP is (and of course, you can
develop desktop applications with the .NET tools as well as web apps).

I think the biggest barrier to developing non-web apps with PHP is the fact
that it's an interpreter. Sure, you can buy tools that will compile your
scripts into something approximating bytecode, but...

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
C

Chris Smith

Sudsy said:

So the answer is that PHP doesn't stand for "Personal Home Page",
although it used to. Clearly PHP is a cery different thing now than it
was during its infancy.

Reminds me of JSP being criticized by people who seem to have stopped
reading the spec at version 1.0.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
S

Steven J Sobol

Sudsy said:
Sigh! Do you think I make these things up?

OK, that's why I said "I don't BELIEVE" - but even if it is, *so* *what*?

How about answering the other part of my question? How does the meaning of
the acronym PHP have anything to do with its suitability for a specific
purpose?

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
W

Willy Kreim

Sudsy said:
Willy Kreim wrote:



I don't know where you're getting your information but it seems very
biased. I mean, "surging popularity"?!

I'm seeing more and more people dumping the IIS + ASP combo due to the
security issues, concerns about vendor lock-in, and those people who
used to run IIS and ASP pages are instead installing Apache (even on
Win2k/XP), and moving their scripts to PHP.

In a sense, I think PHP is going to take a lot of market share from
Microsoft's ASP (more than it's already taking).

This, I think, is a good move. Once people drop IIS and ASP, they'll
start running Apache, caring more about cross-platform portability
(maybe moving their web servers to unix/linux), and exploring more
powerful, cross-platform tools (like jsp, servlets and Server-Side
java).

What I currently DON'T see is Sun making a big push for JSP, or trying
to educate people who drop IIS and ASP and go to PHP into the virtues
of Java. Hence my message about how Sun could benefit from the PHP 5
momentum.

In short: MINDSHARE, MINDSHARE, MINDSHARE. Like it or not, PHP has
more mindshare on the linux community than jsp. And this SHOULD BE
WORKED ON, imho.
Otherwise jsp and java risks becoming just "an enterprise thing" (like
Cobol, Smalltalk and the like) and not a synonym of the web and web
development.
Do you know what PHP stands
for? Personal Home Page!

I thought it was php hypertext preprocessor. ;)
I see more feet doing the walking TO server side Java, for all the
good and usual reasons. You have to decide whether you want to deploy
on an industrial-strength foundation or something else. I know where
my money is sitting...

Agreed when thinking about large developments and the Fortune 500 and
large corporations, but when I wrote my original post I was thinking
more about general geek mindshare, you know, the slashdot population.

I'm thinking about JSP vs. PHP mindshare. Just count on the number of
ready-made scripts that someone wishing to create a web community,
portal, intranet, news site, discussion forums, etc can find on the
php camp vs. .jsp. For example, until recently, there were no decent
FREE jsp based discussion forum scripts, like phpBB. When I asked
around I was directed to JiveForums, a VERY expensive commercial
offering.

This is an area where PHP mindshare outnumbers JSP greatly. And as I
said, I see Sun doing almost nothing to promote JSP script development
and usage. "Built (a great language) and they'll come (the
developers)" is not a good strategy.

Thankfully, things started improving slowly recently (last ~ 12
months) and now there are a few decent jsp based discussion forum
scripts available, but it took the jsp camp ages to reach the php
camp. (Maybe this is due to the easier to learn nature of php?,
getting more beginner's mindshare?).

Here's a good jsp based discussion forum script I'm using on my sites,
btw, and with which I could finally replace all my php scripts

http://yazd.yasna.com/beta/index.jsp
(Of course this could also be a troll)

Believe me, I'm not. I just think that PHP5 will accelerate php's
mindshare and usage growth across the web, and I'd hate to see JSP and
java confined to marginal mindshare like Sun allowed to happen to the
Netscape Enterprise / Sun One web server vs. Apache.

So I repeat / rephrase my question: what can Sun do to lure php
developers into jsp and java? And will they do their best effort
towards this goal? what about building bridges between the two
development communities?

Regards,
Willy.
 
B

bitbucket43

Steven J Sobol wrote:
OK, that's why I said "I don't BELIEVE" - but even if it is, *so* *what*?

How about answering the other part of my question? How does the meaning of
the acronym PHP have anything to do with its suitability for a specific
purpose?

For the benefit of yourself and Chris, let me explain why I consider
the genesis of a language or framework to be significant. PHP is a
server-side scripting language. It appears to have been developed as
an alternative to full-blown CGI Perl scripts. This is understandable,
considering the Perl learning curve. It's far easier to embed code in
your HTML.
This also parallels the genesis of JSP. You were originally required
to write servlets with lots of println statements which generated the
desired HTML. Now you approach the problem from the opposite direction,
using tag libraries or scriptlets to incorporate Java functionality.
So why is genesis important?
Let's suppose you purchase a vehicle built in the early '60s. It's
likely got 4-wheel drum brakes and an in-line six or possibly a small
V-8 engine. Gas mileage is par for the times, namely poor. Maintenance
costs are spiraling as subsystems reach the end of their effective
lives.
Now imagine you purchase a vehicle manufactured in the mid '90s. The
engine technology has improved to the point where you can reasonably
anticipate 100-150K miles of life. Front disk brakes are standard,
although you might even get four-wheel disks. Gas mileage is roughly
double what it was in the '60s.
Sure you can "update" the vehicle from the '60s. Heck, I do it and
it's a lot of fun! It's also more costly when it comes time to replace
floor pans, rear quarter panels, etc.
You can put mag wheels on the '60s car and it might LOOK better but
you're still stuck with the original underpinnings. No matter how many
"bells and whistles" you add, the foundation is the same (even if you
add sub-frame connectors and an 8-point rollcage).
So perhaps the latest incarnation of PHP is "new and improved". I
still don't believe the OP's statement that it's enjoying "surging
popularity". And I still wouldn't consider it as a candidate for a
serious website, given its origins.
Obviously, (and so appropriate to the metaphor) YMMV.
 
S

Steven J Sobol

bitbucket43 said:
For the benefit of yourself and Chris, let me explain why I consider
the genesis of a language or framework to be significant.

thank you :)
So why is genesis important?
Let's suppose you purchase a vehicle built in the early '60s.

A vehicle purchased in the early 60s won't have had constant upgrades.
PHP has been constantly upgraded and added to and improved since it was
originally released. Bad analogy.
So perhaps the latest incarnation of PHP is "new and improved". I
still don't believe the OP's statement that it's enjoying "surging
popularity". And I still wouldn't consider it as a candidate for a
serious website, given its origins.

Then you wouldn't consider C++ either? The underlying basis of C++ is in
a language that is decades old. Even Java technology is over ten years old...

I'm sorry - you still haven't offered a valid reason to choose Java over
PHP or any other language. I'm not saying Java isn't a good product - in fact
I like Java and am developing more and more stuff using Java technology.
I'm just saying that you need to offer a more relevant argument.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
C

Chris Smith

bitbucket43 said:
For the benefit of yourself and Chris, let me explain why I consider
the genesis of a language or framework to be significant.

Great, but I don't see a parallel. We're not talking about applying
modern knowledge to the same thing that existed some time ago. We're
talking about a very different thing altogether, which goes by the same
name. More like my buying a 2004 Taurus and comparing it to one from
1986. The newer product will have some definite similarities, at least
in the general impression that it gives, but it's not going to suffer
from most of the problems of the 1986 model and may even be designed for
more modern patterns of use.

Not that I think PHP is the be-all/end-all of web application
development. As I said before, I think it's primary weakness is that it
was designed specifically as a web language, and is therefore suited for
problems where the web presentation is the hard part of the problem.

I just don't think it's fair to imply that because it has its root in
Rasmus Lerdorf's "personal home page" product in 1995, that it can't
possibly be used for non-personal use. Quite the contrary, I think the
intentional name change away from "personal home page" clearly conveys
the developer's intent to move PHP into a different space, and they've
clearly been doing so... for about as long as JSP has even existed in
the first place, and longer than most of the more popular alternatives.
Among popular alternatives, only Perl/CGI and ASP have been around much
longer, and I doubt many people would call them state-of-the-art
bleeding-edge products in helping with enterprise development anyway
(and if ASP, only because of recent changes).
And I still wouldn't consider it as a candidate for a
serious website, given its origins.

That's your choice, I suppose... and that of your current and potential
employers. I don't see how that could possibly be considered a good
reason. So I'm curious... would you use JSP?

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
D

Dale King

Hello, bitbucket43 !
You said:
Steven J Sobol wrote:
the
meaning of

For the benefit of yourself and Chris, let me explain why I consider
the genesis of a language or framework to be significant. PHP is a
server-side scripting language. It appears to have been developed as
an alternative to full-blown CGI Perl scripts. This is understandable,
considering the Perl learning curve. It's far easier to embed code in
your HTML.

The origins are not really a basis for making a judgement. Java
after all started out as a language for set top boxes and
handheld devices. Tecnology grows and adapts beyond its initial
purposes.
Let's suppose you purchase a vehicle built in the early '60s.

I agree with others that this is not a very fitting analogy.
So perhaps the latest incarnation of PHP is "new and improved". I
still don't believe the OP's statement that it's enjoying "surging
popularity".

Well it is supposedly is on 32% of domainds and over half of
those running Apache. That does not necessarily mean those sites
are running with PHP code. Yahoo is running PHP by the way.

You might also check out the statistics available here:
http://www.php.net/usage.php

I know little about PHP myself, but I recommend an informative
interview with Rasmus Lerdorf (which is where I got those
statistics) that you can hear/read at
http://www.itconversations.com/shows/detail58.html

I found the interview enjoyable and I know nothing about PHP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top