jakarta-ecs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Crater <jcra...@mwsi.net>
Subject RE: html2ecs
Date Wed, 14 Aug 2002 20:39:17 GMT
I don't use ECS for this because I don't want to build my static HTML in
Java. But, I see little advantage mixing my dynamic coding logic
(Velocity, JSP) in my static HTML either. Six of one, half a dozen of
the other so to speak. I also see little value in creating complex
custom tags or specialized Java Beans to do the work for me. If you
could build your static HTML in a visual editor, load that into an ECS
tree in a servlet at runtime and then operate on that html to produce
the dynamic content using ECS, you could create a clean separation
between static and dynamic code, allow for a clear division of labor AND
avoid creating specialized beans or taglibs. This is exactly the model
Windows programmers have been using for years. No one puts C++ code in
their .rc files and no one creates Windows resources by hand when you
can use the visual editor. This model clearly works. I see little
difference for web content.  

Your servlet code would look something like this...

{
	Html html = new HTML("addcontact.html"); // loads
addcontact.html into the ECS model
	Form form = html.getForm("contactForm"); // now we just use the
contents
	form.getInput("name").setValue(name);
	form.getInput("phone_number").setValue(phoneNumber);

	// done!
}

Since the constructor would build the tree, all you have to do is access
the contents using new or existing ECS methods. This just seems simpler
to me.

Someone please tell me why this logic is flawed. 

John


-----Original Message-----
From: Jon Scott Stevens [mailto:jon@latchkey.com] 
Sent: Wednesday, August 14, 2002 1:44 PM
To: ecs-dev
Subject: Re: html2ecs


on 8/13/02 2:06 PM, "John Crater" <jcrater@mwsi.net> wrote:

> Hi,
> 
> I've been working on an ECS HTML tree builder that reads from a File 
> or Reader and builds ECS HTML heirarchies. I've actually got something

> working (not tested well yet though). I noticed the html2ecs 
> subproject and that someone had started on this but not completed it. 
> Is there any interest in something like this out there?
> 
> John

It shocks me that people still use ECS for this...take a look at
Velocity. No more hard coding HTML in Java.

http://jakarta.apache.org/velocity/

-jon


--
To unsubscribe, e-mail:
<mailto:ecs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:ecs-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ecs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ecs-dev-help@jakarta.apache.org>


Mime
View raw message