Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How does Dancer handle forms? How do other such frameworks do it?

by Anonymous Monk
on Feb 15, 2014 at 06:22 UTC ( [id://1075028]=note: print w/replies, xml ) Need Help??


in reply to How does Dancer handle forms? How do other such frameworks do it?

They all do it the exact same way :) the modules are different, but its all the same 100%

my $object = CGI->new; ## NOTHING TO GRUMBLE ABOUT HERE

They're all basically HTTP::Requests (HTTP::Messages), you get access to headers, you get a request object, which gives you access to params , or to file uploads ,or to the raw content if you want it

They're all the same everywhere in every programming language; the details are different (app->cookies versus request->headers->cookie ... lots of overlap and shortcuts )

Some advanced features include dumping the request to harddisk for lower memory usage and providing a filehandle to this temporary ...

similar advanced feature is stream-from-disk instead of loading in memory for responses

Mojo::Message::Request, Dancer::Request, Dancer2::Core::Request, Catalyst::Request, Apache::Request, Apache2::Request, Plack::Request

Unlike CGI.pm (which does a bunch) most of these have a corresponding ::Response object and various helpers, but thats about all the difference

All the frameworks give you a request object

All the frameworks want you to give them a response object

CGI.pm is very flexible but its about print not return for responses; if you use CGI::Application framework you get the same organization (request/response, no printing)

Most folks reflexively badmouthing CGI.pm are extremely ignorant about it

If you're using CGI.pm and following CGI to mod_perl Porting. mod_perl Coding guidelines you're 98% modern , only 2% away from using any "modern frameworks" which have a response object

  • Comment on Re: How does Dancer handle forms? How do other such frameworks do it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1075028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found