--- Kirk Haines <khaines / enigo.com> wrote:
> On Wed, 4 Feb 2004, paul vudmaska wrote:
> 
> > Amrita? kind of cook but i've tended to avoid
> template
> > systems. ruby scripting is (so easy/intuitive)
> maybe
> > just a little more sophisticated than a mark-up
> > language so why learn another? Maybe ERuby and
> just
> > sandbox a script/template?
> 
> Well, for my purposes, Iowa _generally_ just uses
> regular HTML with an 
> extra attribute, 'oid'.  There are a few special
> tags like <repeat> and 
> <if>, and a special bit of syntax where @WORD where
> calls the method WORD 
> and inserts its return value.  Also, one can insert
> other components by 
> importing them and refering to them much like an
> HTML tag.  So, a few 
> differences from plain markup, but not much.
> 
> And the net result is that I can do things like
> this:
> 
> <p>Ad tag summary as of: @current_time</p>
> <ul oid="tagList">
>   <li>@tag</li>
> </ul>
> 
> And then in the seperate code file, the code would
> be:
> 
> <%
>   class AdTagSummary < Iowa::Component
>     attr_accessor :tag
> 
>     def current_time
>       Time.now.to_s
>     end
> 
>     def tags
>       r = []
>       application.dbpool.getConnection do |dbh|
>         sql = 'select distinct(origin_code) from
> ad_responses'
>         dbh.select_all sql do |row|
>           r.push row[0]
>         end
>       end
>       r
>     end
>   end
> %>
> 
> <?
>   tagList {
>     item = tag
>     list = tags
>   }
> ?>
> 
> 
> The code is cleanly seperated from the presentation,
> allowing one to muck 
> with the presentation at will without worrying about
> the code, and the 
> markup is just plain HTML with a few special things,
> so the learning curve 
> is pretty low.
> 
> 
> Kirk Haines

Seperation of duties(developers from designers) is
beneficial to all. My observation is that as scripting
languages become more intuitive/approachable it
*might* be helpful to turn their power over to
designers - if it can be done without jeapordizing the
integrity of the supporting system. Only with access
to variables that are pushed  to the file for example.



I'm just setting forth something to consider. In
truth, i'm more of a designer, so maybe that's why i
thot of the above. Templates are probably better. They
have a proven history.



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/