From: Makoto Kuwata Date: 2004-03-09T02:46:18+09:00 Subject: Re: Looking for HTML templating system If you need a fast temlate system, try Kwartz. http://www.kuwata-lab.com/webtech/kwartz/ Kwartz is a template system for Ruby, PHP and Java. And it runs very fast. If you are interested in presentation logic, you also should try Kwartz. Kwartz can separate presentation logic from HTML template. It is a significant feature of Kwartz. See http://www.kuwata-lab.com/webtech/kwartz/kwartz-overview/index.php?page4 There are some merits if you separate presentation logic from HTML template: * you never break HTML design * you don't have to merge presentation logic into main program. Ruby Baby wrote: > Presentation DEFINITELY needs logic, for anything beyond the > stupidest "put a variable on a page" website. > > The differences is that a templating system should only have > PRESENTATION LOGIC, but no business-logic. I think so. It is just same as what I have thought. -- regards kwa >> > > it seems smarter to shift your focus from "HTML templates to >> > > put my Ruby in" to "Ruby class that puts out HTML". >> > >> Templates are templates, there should be no logic >> in them; they are only presentation. > > >Presentation DEFINITELY needs logic, for anything beyond the >stupidest "put a variable on a page" website. > >The differences is that a templating system should only have >PRESENTATION LOGIC, but no business-logic. > >The presentation having logic is a big part of making an >easy-to-use responsive website! > >For example, my site is http://www.cdbaby.com > >The presentation/display is constantly changing based on the >contents. It is deciding how it wants to present the business >information given to it. > >If an item is on sale, the designer has decided to put a big >yellow flag in the top-right corner. If it is one hour until >we close, the designer has decided to change the color of the >page to let the customer know we're almost closing, and they >should hurry. The designer has decided to capitalize the >artist names, and lowercase the album titles. > >All of this is presentation logic. > >And that stuff really should be up to the graphic designer >- not the business programmer. > >Then considering that the user can change their languages or >currency while shopping, I guess that's why I'm leaning towards >a Ruby class that outputs the HTML tags around the info, >instead of a flat HTML page that is filled with tons of logic >tags and variables for everything but the HTML markup itself. > >I guess I'd rather have a graphic designer take a day to learn >some basic if/then logic, than to design a permanently-ugly >system because we are assuming the graphic designer is an >unteachable idiot. > >