NYCPHP Meetup

[nycphp-talk] Java provides???

Paul A Houle paul at devonianfarm.com
Wed Aug 12 14:33:02 EDT 2009


Michael B Allen wrote:
> My personal opinion is that if you're a Windows shop and you treat
> software development like a logistical problem and you need to hire
> and fire programmers like a commodity, then use Java. It's much more
> forgiving than PHP. To be effective with PHP you must really
> understand PHP well. If you're really good at PHP it can be much more
> powerful than Java. Of course most people fall into the Windows
> commodity programmer category and so I predict Java will be around for
> a while. But PHP will continue to dominate with power programmers.
>
> Mike
>
>   
    I'd say it's the opposite.  Java's improved more in the last ten 
years than PHP has (although PHP certainly has)

http://blogs.law.harvard.edu/philg/2003/09/20/java-is-the-suv-of-programming-tools/

    Back in 2003,  Java Frameworks such as Struts were part of the 
problem,  not part of the solution.  Much better frameworks exist 
today,  and there's much more of a "framework culture" that people 
understand how to build apps well.

    It's impossible to explain the power of the Eclipse/Java IDE to 
anyone who works primarily in dynamic languages.  I mean,  it does 
things that PHP IDEs can't even dream of doing:  first of all,  Eclipse 
overcomes most of the verbosity of Java that makes Java painful to work 
on.  You can click on a 'create class' button and it creates a file in 
the right place for the namespace it's in,  fills in the headers and all 
that.  Renaming a class in Java is a big pain manually,  but can be done 
in two clicks in Eclipse:  Eclipse renames all the instances of the 
class,  renames the file.  Refactoring operations that could take a few 
hours in PHP or in Java w/o an IDE can be done in under a minute...  and 
never a mistake.

    What I'd really like is a less verbose language,  like Scala,  with 
the good IDE.  There's no reason Eclipse/Scala couldn't be as good as 
Eclipse/Java,  except that a lot of people just don't appreciate what an 
advance Eclipse/Java is over vi.

    It's much easier to be productive,  at a low level, in PHP than it 
is in Java.

    I've given business people 1-day bootcamp training in PHP and that's 
been enough for them to make small changes to their sites.  Systems like 
Smarty are a big waste of time in my opinion,  since graphic designers 
can quickly learn enough PHP to write templates -- and they find it's a 
useful skill.

    Personally,  I'm working on a product that has a complex meta-object 
system:  it's kind of a CMS for robots,  or an object-relational mapper 
turned inside out.  It layers object-relational and semweb capabilities 
over mysql and enables extreme re-use of code and database schemas.  It 
heavily uses the dynamic dispatch capabilities in PHP,  but the core of 
it is complicated enough that I wish I had the help of a compiler and 
IDE in maintaining it.

    If I were a Windows shop,  I'd go for ASP.NET.  C# is a wonderful 
language,  a living language.  Microsoft is continually improving it,  
while it seems Java is stuck in reverse.  Linq is just great,  and the 
C# generics system makes Java generics look like a joke.  There's a lot 
of junk in ASP.NET,  but if you avoid the junk,  it's a system that's 
better in J2EE in all ways (Java Web Faces is as much of a stinker as 
ASP.NET Web Forms)  The big trouble is that people from straight-windows 
backgrounds can't tell what's junk and what's not -- w/ a decade of PHP 
experience (and a healthy phobia of accidentally being stateful) I've 
found it easy to find the good stuff in ASP.NET;  recent versions of IIS 
do a good job of surviving exceptional events inside ASP.NET,  better 
than most Tomcat installations I've seen.

    Of course,  ASP.NET means you're stuck with Windows...  If you can't 
accept that,  you've got to use something else.
 



More information about the talk mailing list