can someone explain this to me please

Discussion in 'Java' started by Mike Henley, Sep 6, 2003.

  1. Mike Henley

    Mike Henley Guest

    "Java may not be the best tool for making desktop applications
    (although it is a thousand times better at it than it used to be), but
    as many before me have said, Java really shines on the server, which
    is where most people deploy it now days."

    I don't program in Java, obviously. I'm not an IT professional, and
    though i have learnt some scripting languages such as python, ruby,
    and perl, i have stayed away from Java and C++ as they're not use for

    Can someone explain to me please why Java "shines on the server"? I
    have learnt some perl and PHP, how does Java on the server differ from
    those two, other than it being more difficult for me to learn and use?
    but more importantly, the first question, why it "shines on the
    server", as opposed to the desktop, and also as opposed to other
    Mike Henley, Sep 6, 2003
    1. Advertisements

  2. Mike Henley

    Roedy Green Guest

    It originally replaced C and CGI. Java is more efficient since it does
    not have to load a program for every transaction.

    PHP is not OO. It falls apart for a complex project.

    Perl has a syntax only its father could love. Again it is suited
    primarily for small projects written by a single author.
    Roedy Green, Sep 6, 2003
    1. Advertisements

  3. * there is a cross-platform standard: J2EE
    * there is a choice of application servers for all needs (Websphere,
    BEA, Oracle, Sun ONE, just to name a few)
    * Java is less vulnerable to viruses
    same for ASP

    the only technology that may come close is .NET, but then you are locked
    to Micro$oft.
    =?ISO-8859-1?Q?Peter_Sch=E4fer?=, Sep 6, 2003
  4. ... why it "shines on the
    The two big disadvantages of Java on the desktop is slow startup and huge
    RAM-consumption (30-200 MB per application). These disadvantages are of much
    less importance for a server application, because the server application is
    usually always running and there is enough RAM on the server.

    Compared to C and C++, many common causes of failure have been removed in
    Java: It can not fail on pointers pointing to something non-existing (it can
    still have null-pointers). It can not get out of boundaries by mistake and
    overwrite data structures belonging to other parts of the application. The
    garbage collection eliminates the problems involved in deallocating objects.
    Exceptions and try-catch constructs makes it easy to write stable
    server-applications. Other languages like C and Pascal lack these
    The well-known buffer-overflow problems allowing viruses to exploit servers
    are non-existent in Java applications.

    Niels Dybdahl
    Niels Dybdahl, Sep 6, 2003
  5. - Server applications are (I don't mean small web-sites!) usually big
    applications, not suitable for one person to implement. Java is designed for
    team-work, and beacuse of very good level of implementation of OO in this
    language maintenance of the applicaiton (remember the application is huge,
    so the maintenance is much harder than small applications) is much easier
    and more reliable than non OO languages such as PHP,

    - Java has many technologies specialized for server-side applications, such
    as JSP, Servlet, EJB, ... and some technologies which are more suitable for
    server-side applciations such as JMS, JDBC, ...

    - because of some features such as automatic resource management (most
    important one is the garbage collector) there are less problems in long-time
    running applications written in Java than other languages....

    - because of some sort of seperation of concerns in some of server-side Java
    technologies (especially EJBs), the programmers just focus on the business
    logic, not the middleware stuff...

    and many more things ...

    Amir Pashazadeh
    Amir Pashazadeh, Sep 6, 2003
  6. On most platforms, C does have exception handling. See setjmp/longjmp. Of
    course, this mechanism is much harder to use in practice than a try/catch
    block. The biggest downside to C is that OO programs become very hard to
    understand. C++ fixes this to a certain extent, but doesn't remove many of
    the dangerous constructs of C.
    Matthew Lundberg, Sep 7, 2003
  7. Mike Henley

    Mike Henley Guest

    Is java any good for an individual programmer? is it worth learning or
    should i stay with PHP? what about PHP 5 which introduces OO? and what
    about OO scripting languages such as ruby and python?

    again, i've heard a lot about JSP; is it worth learning for an
    individual programmer or should i stay with PHP? any advantages of JSP
    over PHP? what about ease of learning and ease of use? what about
    thanks :)
    also thanks to all others above who replied!
    Mike Henley, Sep 7, 2003
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.