Hi,
I'm a brand newbie of Java and Web programming. Only two months experience.
During the two months coding with Servlets, ECS 1.2, Apache, JServ, I get
the following suggestions about ECS. Because I'm a newbie, I will not be
suprised at all if I'm actually wrong. Please feel free to point out any
problem in the suggestions. In case I happen to be right, please also post
your opinion.
1. We need a good HTML, XML compiler to compile HTML/XML code into Java
classes represented by ECS classes. I know there's a html2ecs in ecs source
code tree. It doesn't work well. I tried long time to make it compiled. Then
the compiled version doesn't support unclosed HTML tag. There's very good
reason to have a flexible, stable HTML/XML compiler. You must have heard
people talking about seperating HTML design from coding. Think about it, if
we can convert existing HTML( designed by artists) into Java class. Then in
our servlet, we manipulate the whole set of HTML entity by adding, deleting
or changing value of element. Finally we can send the HTML result to client
side by HTML.output(out). So we are able to work on a static HTML as base.
And make it dynamic based-on servlet request. Serialization of ECS
classes(already exist, right?) are required to help the process.
2. We need easy access to HTML element referenced by element name. In my
experience, after I build a HTML object, then add bunch of elements, I
couldn't find a way to go back and assign value to one of those elements.
The only way I can change vaue of an element is I have to keep a reference
to that particular object. The following example can express my opinion
clearer:
HTML html = new HTML(...)
.addElement(...)
.addElement( new Input( Input.TEXT,
"txtUserName", "") )
...;
I didn't find a way to assign default value of the text field txtUserName to
"Administrator".
If there's function that can help me get reference of the input element in
object html, such as: Input userName = (Input)html.findItem( "txtUserName"
);
Then I can use userName.setValue(...) to set the default.
This will be even useful when the html object is load from file instead of
generated by code.
Having the above two improvements, we can easily seperate web design and
programing. A designer will generate HTML file by any HTML editor. Then
programmer converts it into Java class, or serialize it into a data file. In
servlet code, load the compiled data into memory, perform additional process
based-on servlet request. Then output the result to client side.
OK. That's all this time. Hope you can understand my poor English.
Enjoy your coding!
Li
----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]