cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: App Design Philosophy Rant
Date Wed, 14 Feb 2001 23:16:33 GMT
On Wed, 14 Feb 2001, Ray Allis wrote:

> Is this what y'all are discussing?
>
> http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-xmlj2ee.html

not i, no. in fact, glancing over it, i'd say this example is pretty bad,
if only for this method on one of their beans:

/**
 * generates an XML document for the reservation entry form.
 */
public String toXML()
{
    return new String( "<?xml version=\"1.0\"?>" +
               "<?cocoon-process type=\"xslt\"?>" +
               "<?xml-stylesheet href=\"/stylesheet/form-html.xsl\"
type=\"text/xsl\"?>" +
                "<?xml-stylesheet href=\"/stylesheet/form-wml.xsl\"
type=\"text/xsl\" media=\"wap\"?>" +
                   "<form action=\"reserve.jsp\">" +
                  "<head>" +
                  "<title>ABC Car Rental</title>" +
                  "</head>" +
                  "<input type=\"text\" name=\"customerName\" value=\"" +
this.getCustomerName() + "\" size=\"11\"/>" +
                  "<input type=\"text\" name=\"carType\" value=\"" +
this.getCarType() + "\" size=\"11\"/>" +
                  "<input type=\"text\" name=\"startDate\" value=\"" +
this.getStartDate() + "\" size=\"11\"/>" +
                        "<input type=\"text\" name=\"endDate\" value=\"" +
this.getEndDate() + "\" size=\"11\"/>" +
                         "<input type=\"text\" name=\"reservationNo\"
value=\"" + this.getReservationNumber() + "\" size=\"11\"/>" +
                  "</form>" );
}

that's ugly as sin.

- donald


Mime
View raw message