Flexible, template-freeable web framework?

B

Brian Marick

I have this idea of answering the question "What would happen if I
added unprecedented amounts of built-in support for exploratory
testing to a web app?" For the reasons, see <http://www.exampler.com/blog/2008/03/23/an-alternative-to-business-facing-tdd/
, but the reasons aren't important for this note.

Adding such support would (I suspect) require that the app make some
things real (into objects) that we ordinarily leave implicit. Examples:

1. Rather than substituting a bunch of values into a template,
stuffing the resulting string into an HTTP Response, and then
forgetting everything that went into the response, I see a controller
action creating a page object. That page object can be told to render
itself the normal way, but it can also be told to render itself in
ways a tester might prefer.

2. If I'm going to put a link on a page, and it's a link to a
particular model object, I don't want to lose that fact. I want a
tester to be able to say "oh, so you're an edit link to a
Certification, eh? Show me the Certification you link to as HTML - no,
wait, show it in some raw form."

3. I bet it would be nice if the GoF Command pattern were used for
controller actions so that a tester could easily replay what she just
did. (And snapshot workflow state so that she can "back up" and
restart along another path: think Prevayler, journaling file systems,
and version control systems applied to app state.)


I don't think Rails would be a good choice for this work because it's
built around assumptions that I would have to violate, meaning
potentially substantial changes to a big and complex code base.
Further, if the ideas turn out to be worthwhile, I'd want them to end
up in trunk, and that's pretty unlikely of a mature product that
oughtn't disrupt its user base this much.

So ideal would be a smaller, newer framework that's looking to
distinguish itself from Rails. I've been looking around at the
different frameworks, but I thought it'd also be good to ask if people
have frameworks to recommend. (Best would be a note from a framework
author saying, "What a coincidence - I'm already working on something
very like that!")
 
E

Eleanor McHugh

I have this idea of answering the question "What would happen if I
added unprecedented amounts of built-in support for exploratory
testing to a web app?" For the reasons, see <http://www.exampler.com/blog/2008/03/23/an-alternative-to-business-facing-tdd/

Adding such support would (I suspect) require that the app make some
things real (into objects) that we ordinarily leave implicit.
Examples:

1. Rather than substituting a bunch of values into a template,
stuffing the resulting string into an HTTP Response, and then
forgetting everything that went into the response, I see a
controller action creating a page object. That page object can be
told to render itself the normal way, but it can also be told to
render itself in ways a tester might prefer.

2. If I'm going to put a link on a page, and it's a link to a
particular model object, I don't want to lose that fact. I want a
tester to be able to say "oh, so you're an edit link to a
Certification, eh? Show me the Certification you link to as HTML -
no, wait, show it in some raw form."

3. I bet it would be nice if the GoF Command pattern were used for
controller actions so that a tester could easily replay what she
just did. (And snapshot workflow state so that she can "back up" and
restart along another path: think Prevayler, journaling file
systems, and version control systems applied to app state.)


I don't think Rails would be a good choice for this work because
it's built around assumptions that I would have to violate, meaning
potentially substantial changes to a big and complex code base.
Further, if the ideas turn out to be worthwhile, I'd want them to
end up in trunk, and that's pretty unlikely of a mature product that
oughtn't disrupt its user base this much.

So ideal would be a smaller, newer framework that's looking to
distinguish itself from Rails. I've been looking around at the
different frameworks, but I thought it'd also be good to ask if
people have frameworks to recommend. (Best would be a note from a
framework author saying, "What a coincidence - I'm already working
on something very like that!")

I did something rather similar a couple of years ago using WEBrick,
before I put the effort into learning Rails. With WEBrick it's really
easy to handle web interaction however you like, including buffering
requests for multiple replays or avoiding the whole MVC paradigm
altogether :) I keep meaning to go back to it someday, but other
projects come along.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,127
Latest member
CyberDefense
Top