[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

anyone using amrita?

Navindra Umanee

7/12/2005 3:42:00 PM

Hi,

I've been looking at the documentation for Amrita[1] lately and I have to
say, the whole concept seems very elegant and appealing for anyone who
wants to separate context from presentation. Throughout the site
however, I've seen hints that Amrita may not be as performant as it
should be.

Does anyone here have a testimonial for using Amrita for a non-trivial
and relatively busy website? How well does it perform in practice?

Also, what is the difference between XTemplate[2] and Amrita? I
couldn't really see any from a casual browsing, except for syntax --
and Amrita seems to have the nicer syntax.

Thanks,
Navin.

[1] http://amrita.sourc...
[2] http://xtemplate.source...


5 Answers

Aria Stewart

7/12/2005 4:44:00 PM

0

On Wed, 2005-07-13 at 00:42 +0900, Navindra Umanee wrote:
> Hi,
>
> I've been looking at the documentation for Amrita[1] lately and I have to
> say, the whole concept seems very elegant and appealing for anyone who
> wants to separate context from presentation. Throughout the site
> however, I've seen hints that Amrita may not be as performant as it
> should be.
>
> Does anyone here have a testimonial for using Amrita for a non-trivial
> and relatively busy website? How well does it perform in practice?
>
> Also, what is the difference between XTemplate[2] and Amrita? I
> couldn't really see any from a casual browsing, except for syntax --
> and Amrita seems to have the nicer syntax.

I've used both, and now Amrita2 as well.

Amrita2's performance is far more tweakable, and it's more flexible in
most ways, but not quite stable for production use.

XTemplate is a bit more view-pulls-from-model, and Amrita is more
model-pushes-to-view, in concept. They're pretty close, though. Amrita
takes some funny pushing to make some designs work, and XTemplate can be
cleaner.

Amrita's performance isn't as hot as one might like, but it's not
abysmal.

I really like working with Amrita, and amrita2 is shaping up nicely as a
major update.

The AJAX stuff in Amrita2 is especially spiffy -- take an HTML template,
and model data, and it spits out json data to update an HTML page
client-side. Unbelievably clean. template.expand() on the client side,
template.expand() on the server side.

There's one quirk of Amrita2 I'm struggling with at the moment, but
nothing untoward.

ERB is far more general, but also messier. Each has their place -- and
with amrita2, you can mix them. It's pretty nice.

Ari



Navindra Umanee

7/12/2005 6:41:00 PM

0

Hi Aredridel,

Thank you very much for the informative reply!

Aredridel <aredridel@nbtsc.org> wrote:
> XTemplate is a bit more view-pulls-from-model, and Amrita is more
> model-pushes-to-view, in concept. They're pretty close, though. Amrita
> takes some funny pushing to make some designs work, and XTemplate can be
> cleaner.
>
> Amrita's performance isn't as hot as one might like, but it's not
> abysmal.

Performance-wise, how does XTemplate compare? Is there any particular
reason you're using Amrita2 over XTemplate? (I suppose XTemplate
doesn't have AJAX)

> ERB is far more general, but also messier. Each has their place -- and
> with amrita2, you can mix them. It's pretty nice.

Currently I'm using Ruby string interpolation (two levels of it) to
generate all my HTML. I'm not using any particular template package,
just Ruby string manipulation. It's fast and allows caching, but I
fear not very elegant or maintainable in the end.

Thanks,
Navin.


mrt

7/12/2005 7:26:00 PM

0

Amrita looks pretty neat, but the first example template on the project
home page is invalid HTML (missing closing TD tags). Is that required,
or just an oversight in the example?

Jeff Barczewski

7/12/2005 9:40:00 PM

0

That is just an oversight, Amrita or specifically Amrita2 can
absolutely work with valid HTML or XHTML.


Aria Stewart

7/13/2005 4:54:00 AM

0

On Wed, 2005-07-13 at 03:40 +0900, Navindra Umanee wrote:
> Hi Aredridel,
>
> Thank you very much for the informative reply!
>
> Aredridel <aredridel@nbtsc.org> wrote:
> > XTemplate is a bit more view-pulls-from-model, and Amrita is more
> > model-pushes-to-view, in concept. They're pretty close, though. Amrita
> > takes some funny pushing to make some designs work, and XTemplate can be
> > cleaner.
> >
> > Amrita's performance isn't as hot as one might like, but it's not
> > abysmal.
>
> Performance-wise, how does XTemplate compare? Is there any particular
> reason you're using Amrita2 over XTemplate? (I suppose XTemplate
> doesn't have AJAX)

I haven't benchmarked -- my guess is close, but I haven't looked.

I'm using Amrita because I like model-pushes-view more than
view-pulls-model as a concept. They're really close, though.

> > ERB is far more general, but also messier. Each has their place -- and
> > with amrita2, you can mix them. It's pretty nice.
>
> Currently I'm using Ruby string interpolation (two levels of it) to
> generate all my HTML. I'm not using any particular template package,
> just Ruby string manipulation. It's fast and allows caching, but I
> fear not very elegant or maintainable in the end.

I agree, but then, I don't mind fighting with a validator for an hour
either.

Ari