« /** Still no comment */ | Main | Circle/Ellipse Paradox... NOT! »

Why some web frameworks don't distinguish between GET and POST

aniel Hinojosa asks What the hell ever happened to doGet() and doPost?

It occurs to me that perhaps the framework authors believe that if you use the same class (an Action in Struts-speak) to process both GETs and POSTs, then perhaps you've got a design flaw.

The argument here would be that the URI you go to generate a form perhaps shouldn't be the one you submit the form back to. When using a web framework, creating new URIs is cheap, after all.

This would obviously revolve around alignment of responsibility; a class that needs to handle GET and POST differently is possibly taking on too much responsibility.

Now, I should make a disclaimer here: I don't program like that myself. In fact, the custom base class I use for my Struts Action splits up the request handling into GET/POST methods; a classic use of a supertype. But I'm wondering if my webapps would improve if I didn't make this distinction.

Post a comment


About

This page contains a single entry from the blog posted on June 16, 2004 6:53 AM.

The previous post in this blog was /** Still no comment */.

The next post in this blog is Circle/Ellipse Paradox... NOT!.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.35