Hmmm. This may be no help to you at all, but I am doing something like that
with Iowa. Let me explain what I am doing and if it sounds at all
applicable, I can help you try it out.
Some of my clients have access to a content management system with which
they can control content on their pages. This system was originally written
in uninspired Perl. I have been slowly converting pieces of it to Ruby and
improving its capabilities at the same time.
In the past the content was stored in a database, and for every page hit a
db query took place to get the content. I recently switched the system to
use Iowa instead of Perl CGIs for generating the pages, and then I took it
one step farther.
The CMS system now saves the content in the database only for use by the CMS
system. The actual pages are generated as Iowa components by the CMS system.
Every time page content changes, the CMS system will regenerate the
component into a static file. I actually did this because it now lets me
provide dynamic capabilities to clients in the form of Iowa components that
they can just include into their web pages via the CMS system. So, one
company might have access to a set of components that allows data entry and
report generation, and they can control where and how those capabilities are
reached simply by embedding something like:
<IssueView idx="7"/>
into the CMS system. It all gets rolled into a component for that page and
looks static, even though it's really not.
Now for the part that may make this of no use to you.
There's no real
magic here. Iowa has a seperation of code from HTML. It solves a lot of
the same problems that Rails does, but in a very different way. So, you
write your static HTML in one file. You can include results of executing
Ruby methods in your HTML, and there are a few really simple markup tags for
handling conditions and loops.
<p>The current time is: @current_time</p>
<repeat oid="number_list">
@number <if oid="is_winner?"><b>This one is a winner!</b></if>
</repeat>
Soooo....you'd still be creating your static content in HTML/CSS, and just
using Ruby to create whatever dynamic portions are in it, but the Ruby code
is all segregated into a seperate file.
If this sounds like it might be helpful to you, give me a shout and I'll
help you get going.
Kirk Haines
···
On Wed, 28 Jul 2004 20:36:47 +0900, Martin DeMello wrote
That too, but mostly static sites generated from dynamic content
(i.e. if the content changes, the relevant pages are simply
regenerated, but from a websurfer's point of view it's static). I
keep thinking that there has to be something better than HTML/CSS to
write the view in, even if I can't come up with it myself. So far