Matthew Pearson wrote:
Like Dave, I'm also not suggesting Java is the only good solution.
PHP, Perl, Python and Ruby all have their place, but there are good
reasons why Java is popular for "Enterprise Class" IT.
What are these good reasons? I'd be interested to hear. PHP seems good,
and I am finding it OK to use, but I'm sure there must be better out
there. Am not at all convinced by the idea of perl for web stuff. Have
done it in the past and it probably works well if you have the time to
hunt out all the right CPAN modules, but on the other hand Java Serlets
and PHP are made for the job. PDO in PHP looks quite good for giving
connectivity to a lot of Databases. What is it about PHP that you
wouldn't consider it Enterprise class (especially when you consider the
, rather large, wikis that run on it)?
I'm not sure I'm the best person to set out the case, but I'll try. If
someone else in the group knows this area better, please correct what
I'm about to write.
First of all, I'm *not* suggesting that the other technologies are
unsuitable for enterprise solutions. Some of the world's busiest web
sites run on Perl and PHP. IIRC, Yahoo uses PHP and Amazon uses Perl,
so both are fine for big transaction volumes and big databases if you
understand how to scale them out (i.e. spread the load across multiple
servers).
PHP and Perl don't scale up (i.e. to one very big server) as well as
Java does, because the popular Java-based servers and JVMs have been
very carefully optimised to scale up well. This fits traditional
corporate thinking, which is one big box because that is often cheaper
and easier to manage than a lot of little ones (but harder to scale
quickly). As a result, Java solutions tend to look like resource hogs
when implemented on a small scale. They use a lot of resources just to
load, but don't need all that much more to handle a lot of users and
high transaction rates.
BTW, raw speed used to be a problem with Java - it isn't any more.
Personally, I use Perl with the Template Toolkit module quite a lot and
I've never got to grips with PHP. First of all, that's because I learnt
Perl before I came across PHP. Moreover, in the early days of PHP, Perl
was much more capable, which is probably no longer the case. Also, at
the time, PHP had different and incompatible database interfaces for
each different DBMS whereas the Perl DBI module provided a
database-independent API.
IMHO, the biggest reasons for using Java in practice are:
1) fashion - it is now perceived as the safe option, which is important
if your job and your boss's job depend on it. You're unlikely to get
fired for choosing Java. In the eyes of a lot of corporate IT people,
there are only two options - Microsoft or Java;
2) there are now a lot of moderately competent Java programmers out
there at reasonable salaries;
3) there are a lot of good development and testing tools available - not
that there aren't for other languages, but a lot of corporate IT people
have never heard of them;
4) there are good infrastructure libraries available for things like
reliable asynchronous inter-application messaging that smaller
organisations don't usually need to do;
5) the popular Java-based web servers are designed to allow you to
switch application modules in and out, and to reconfigure individual
applications without a restart. They also have quite powerful and
flexible authentication and authorisation architectures and good
performance management tools. You need a guru to get the thing set up
to start with, but once it is configured it is easy for other people to
manage it;
6) at the risk of starting a flame war, Java's OOP and modularisation
facilities are, arguably, much more rigorous than Perl or PHP. Both
Perl and PHP have a reputation for becoming difficult to use on very
large projects - that's large in terms of functionality, not transaction
rates or data volumes. Many of the very popular web sites are not all
that complex in terms of functionality. When your applications run to
millions of lines of code and there are dozens of programmers in the
development team, strong encapsulation becomes very important -
otherwise you run into major problems with namespace conflicts. I don't
know much about PHP's OO architecture, but Perl's is notorious for this.
I hope that gives you some pointers.
Tony Cowderoy
_______________________________________________
Peterboro mailing list
[email protected]
http://mailman.lug.org.uk/mailman/listinfo/peterboro