Article:
  The PHP Scalability Myth
Subject:   Dude's right!
Date:   2003-10-18 01:23:46
From:   anonymous2
Response to: Dude's right!

Not to be disrespectful, but I do think you left out a few things.
For just a terminal


class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}



For an Applet
import java.applet.Applet;
import java.awt.Graphics;


public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}


For a Java Bean
package org.acme;


import java.rmi.RemoteException;
import javax.ejb.*;


public class HelloBean implements SessionBean {
private SessionContext sessionContext;
public void ejbCreate() {
}
public void ejbRemove() {
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
}
public String sayHello() throws java.rmi.RemoteException {
return "Hello World!!!!!";
}
}


Full Threads Newest First

Showing messages 1 through 4 of 4.

  • Dude's right!
    2003-10-19 00:32:44  anonymous2 [View]

    but then a JSP?
    <% out.println("Hello world"); %>

    pretty much the same as php isnt it...
    • Dude's right!
      2003-10-20 15:01:28  anonymous2 [View]

      Look into webserver generated files, what it makes with your 1 line - 1,2,3 or more classes???
      • Dude's right!
        2003-10-21 07:22:48  anonymous2 [View]

        It doesn't matter what it generates server side. Because you don't have to write that or maintain it.

        JSP and PHP are very similar. Personally, I think that whenever your language has <% } %> in it you're doing something wrong. That's why I don't do PHP, and why I don't do Model 1 JSP.

        ZPT *is* the best page templating language around. I just wish it was available for Java. Zope sucks.
        • Dude's right!
          2003-11-10 13:37:48  anonymous2 [View]

          You should check this out: http://phptal.sourceforge.net/