Re: Looking for HTML templating system
Ketil Kristiansen <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 7 Mar 2004, Ruby Baby wrote: > For any item you put in your shopping cart, my business-programming can > give you a list of 20 items for "If you like this you will like..." > > But it's up to the visual design to decide how many of those 20 items > to show on the screen at once. Maybe for beauty or usability, the designer > only wants 3. So to do that, she would need "length" and "each" or "times" > methods. The designer shouldn't need to write code... and this is a poor example, in my opinion. What the designer should do is to be able to say, in the template, that (s)he wants x number of item y - i.e. just let the business logic take parameters from the template. In your example, you will have to choose some number of items to populate an array with, and then the designer may use only a few - not very efficient. Also, if the designer then wants more items than the business logic provides, (s)he will need to get the programmer to modify the business logic, which means that a change which *should* have taken the designer one minute will take much more time. I must admit that I haven't done any web coding in ruby yet... I'm attracted to amrita because of its simplicity and "clean" templates, but I don't know whether it can pass parameters from the template to the code or not... Speaking of amrita, does anyone know if it's dead? It seems there hasn't been any updates in a long time, and the Wiki seems to have disappeared. Best regards, -K -- "Reality is that which, when you stop believing in it, doesn't go away." - Philip K. Dick