开发者

What's the fastest way to get CRUD over CGI on a database handle in Perl?

TL;DR: Want to write CGI::CRUD::Simple (a minimalist interface module for CGI::CRUD), but I want to check first if i overlooked a module that already does that.

I usually work with applications that don't have the niceties of having frameworks and such already in place. However, a while ago i found myself in a situation where i was asking myself: "Self, i have a DBI database handle and a CGI query object, isn't there a module somewhere that can use this to give me some CRUD so i can move on and work on other things instead of spending hours writing an interface?"

A quick survey on CPAN gave me:

CGI::Crud

Catalyst::Plugin::CRUD

Gantry::Plugins::CRUD

Jifty::View::Declare::CRUD

CatalystX::CRUD

Catalyst::Controller::CRUD

CatalystX::CRUD::REST

Catalyst::Enzyme

Now, I didn't go particularly in-depth when looking at these modules, but, safe the first one, they all seem to require the presence of some sort of framework. Please tell me if i was wrong and i can just plug any of those into a barebones CGI script.

CGI::CRUD seemed to do exactly what i wanted, although it did insist on being used through a rather old and C-like script that must be acquired on a different site and then prodded in various ways and manners to produce something useful. I went with that and found that it works pretty neat and that it should be rather easy to write a simple and easy-to-use module that provides a very basic [dbh, cgi IN]->[html OUT] interface to it.

However, as my previous surve开发者_如何转开发y was rather short and i may have been hasty in dismissing modules or missed others, i find myself wondering whether that would only be duplication of work already done.

As such i ponder the question in the title.

PS: I tend to be too short in some of my explanations and make too many assumptions that others think about things similarly as me, resulting in leaving out critical details. If you find yourself wondering just what exactly I am thinking about when i say CRUD, please poke me in comments and I'll amend the question.


Perhaps CGI-Browse suits your taste.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜