From: Tom Clarke Date: 2003-01-25T04:58:06+09:00 Subject: Re: what's so great about narf? Hi Ara, As one of the authors I am biased, and I probably wouldn't say Narf is great - but I think it might sometimes be better. On Sat, Jan 25, 2003 at 02:09:08AM +0900, ahoward wrote: > > web rubyists- > > o.k., call me an idiot (it won't be the first time) but i've read the narf > docs and can't see what it really buys me? considering these facts : > > * the cgi, and cgi/session modules are well doccumented and easy enough to > use ( p, = cgi['param'] isn't _that_ hard IMHO ) The relevant parts of Narf are derivatives of the CGI, and could just be considered refactorings. We wanted something better, so we wrote it - and that's all. As an aside, it is completely covered with Unit tests, which makes integration of new features somewhat easier. > * webunit can be used to unit test these cgis if desired. see next point. Narf testing differs from Web testing in a few ways: a) It's all in process - you don't need to fire up a web server (this seems suprisingly helpful) b) It's integrated with the templates which provides some useful testing enchancments and make it much easier to find out what your app is doing c) We've worked hard to make the API really simple, so it doesn't get in the way, and tests are short and to the point > * amirta makes it trivial to test cgi's since all they do is manipulate data > anyhow (many cgi's i've converted to amrita end up going from hundreds of > lines to tens so testing is often overkill - just tidy/validate the html > and your off) I'm not going to profess to solve the problems of someone who has none :-) > significant gains in the areas of simplicity and funcionality, but narf just > seems like another API? please note that i asked to be called an idiot so can I think we've pushed the boundaries of making Web applications more easily testable - at least that's the idea. I doubt we have a miracle cure though. -Tom