From: Tom Clarke Date: 2003-01-25T08:42:02+09:00 Subject: Re: what's so great about narf? On Sat, Jan 25, 2003 at 06:49:53AM +0900, ahoward wrote: > On Sat, 25 Jan 2003, Tom Clarke wrote: > > > As an aside, it is completely covered with Unit tests, which makes > > integration of new features somewhat easier. > > this is really good - of course. > > > 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) > > i can appreciate that - but being somewhat old fashions don't know if i'd > trust it... My experience so far seems to be that what works in the tests, works for real. Obviously those with complex server setups may find things different. > > 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 > > is it true work is being done to integrate with Amrita tempaltes? It seems likely. I would be happy to see Narflates disappear should Amrita gain all of the Narflate features. > > I'm not going to profess to solve the problems of someone who has none :-) > > touche. i meant they were _greatly_ reduced by eliminating all the string > manip from my old cgi's and offloading it onto Amrita. Basically the Narf testing-with-templates approach came about as follows: 1) Tom uses Smarty with PHP 2) Tom fills up hashes and arrays with the data that should be displayed 3) Tom notices that this corresponds roughly to the things he wants to test when he displays html pages 4) Tom wonders what would happen if he developed a Webunit/http like api, where instead of looking at html he looked at those values that were put in the template 5) Tom likes ruby and decides to implement in that This coincided with mine and Patrick May's desired to improve ruby's CGI api and narf was the result. My dream for Narf is that loads of people either steal the ideas, or are inspired to come up with even better ones. And then implement them in all the platforms I have to build Web apps for so that I can easily test my applications. -Tom