Re: Java is becoming the new Cobol



Richard wrote:

"""If you're a Java developer, now's the time to invest in new
skills."""
.....
The question then is: Is Java just another fad language in the range:
Algol, Pascal, Modula2, Ada, C++, that will be replaced by the next
fad languages Ruby, PHP, C# which will then be replaced by the
next ...

I don't think it's a fad language. However, I do see much Java being replaced on servers by C#. Looking at the two languages, C# is Java, take 2 - the syntax is *very* similar, but it leaves out some of the verbosity of Java. (heh - maybe it *is* the new COBOL!)

For example, if you wanted to access a property of an object which the property of another object which is the property of another object (whew!), in Java you have...

topObject.getSecondObject().getThirdObject().getProperty()

....whereas, in C#, it becomes...

topObject.SecondObject.ThirdObject.Property

(Plus, with the Visual Studio IDE, you only have to type like 5 or 6 characters to get that second line! :> )

Another aspect that I like is the way that properties are defined. In Java, it's almost COBOL-like in the way properties are defined (at least in our shop). We have the property items in the top, then the constructors, then the get and set methods after that. In C#, you declare the get and set method as part of the property.

I see C# and Java in one camp, and PHP and RoR in the other. I *really* like PHP's implementation of OO, although I'm sure it will mature more in version 6. They have a "magic" function __call($method, $arguments) that is called (if defined) if a method is requested of an object that does not exist. Using this, if you just need a simple getProperty() or setProperty() method, you don't have to define every single one of them!

Here's an example from a web site I've done...

public function __call($method, $arguments) {
$prefix = strtolower(substr($method, 0, 3));
$property = strtolower(substr($method, 3, 1)) . substr($method, 4);

if ((empty($prefix)) || (empty($property))) {
return;
}

if ($prefix == "get") {
if (isset($this->$property)) {
return $this->$property;
}
else {
return "";
}
}

if ($prefix == "set") {
$this->$property = $arguments[0];
}
}

Voila! :) (Of course, a limitation of the above is that it will blow up if you say setFoo("bar") and $foo is not actually a property. I'm sure I could put some error checking in for that, and probably will at some point.)

So, in answering your question, I don't see PHP and RoR as Java-killers. I see C# as a serious competitor, but I believe that until Mono matures more, the Unix/Linux installations will continue to go with Java. However, the advice given in that first quote is good. Innovate or die (figuratively speaking, of course).

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \/ _ o ~ Live from Albuquerque, NM! ~
~ _ /\ | ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail ~ daniel @ "Business Website" below ~
~ Business Website ~ http://www.djs-consulting.com ~
~ Tech Blog ~ http://www.djs-consulting.com/linux/blog ~
~ Personal E-mail ~ "Personal Blog" as e-mail address ~
~ Personal Blog ~ http://daniel.summershome.org ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational? A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine
.



Relevant Pages

  • Re: HTML "scrape" causes loss of query string in URL
    ... >> in PHP with several PHP scripts interacting with one Java servlet, ... >> which interacted with several Java classes. ... > process to go from PHP to JSP. ...
    (comp.lang.java.help)
  • Re: e-commerce portal
    ... haven't had a single site that sees a need for this sort of hardening. ... Java anymore. ... PHP is a technology that has gotten a harsh rap due to large security ... Marketing at its worse, eh? ...
    (comp.databases.pick)
  • Re: [PHP] Semi-ADVERT, not really spam, sorry for it
    ... I appreciate your position but you need to understand that freelance PHP developers charge what they do because that's what the market will pay. ... I've recently taken on 2 PHP contractors and even though there's only 20 GBP difference in their daily rates one is miles better than the other, to the point where I'm having to check everything the slightly cheaper one is doing and I've found a number of killer bugs that would have caused major issues had they gone live. ... Email Java tutor needed! ... I thought that I might also utilize similar help against humble payments. ...
    (php.general)
  • Re: Security - PHP Vs Java
    ... against PHP and suggested Java. ... Their concern was that PHP could not ... be trusted to handle the security of the data adequately. ... My team have become fairly adept PHP programmers, ...
    (comp.lang.php)
  • Re: PHP security (or the lack thereof)
    ... But in the 1990s, Java was created. ... That PHP is relatively new with respect to computing ... PHP-CGI: .28 million hosts ... average "experience level" of each developer is equal, ...
    (Bugtraq)