From: Ollivier Robert Date: 2004-04-16T18:59:21+09:00 Subject: Re: New HTML Toolkit Idea In article , Bill Atkins wrote: > I was thinking today about how much I hate writing scripts to generate > HTML and I sat down and wrote some code. I'm thinking about making a > simple toolkit to generate HTML in an abstract way. Here's my sample > code: > puts RHTk.new do > title "A Test of RHTk - The Ruby HTML ToolKit" > include_css "style/rhtk.css" > body do I know these methods of wrapping HTML tags into classes/objects is "en vogue" but really you ought to work in a MVC-based system, separating the code from data and presentation. The code (controller) should instanciate the data (model) through templates (view). That way you don't have to change the code to change presentation or your data. Even if you have to change the code, it will be a _code_ change, not a presentation one. Amrita is the way IMNSHO. -- Ollivier ROBERT -=- EEC/AMI -=- ollivier.robert@eurocontrol.int Usenet Canal Historique FreeBSD: The Power to Serve!