开发者

Which Perl web framework should I use?

I would like to develop a web application using Perl.

Refer some Perl package (like Strawberry) w开发者_如何学编程hich is simple to install. Also it should be suitable for the web application.


Have a look at Mojolicious, a complete and modern framework for Web applications whose only requirement is Perl (no additional modules required!).

To install it, just download a Strawberry Perl version and issue cpan Mojolicious: no dependencies required. Or, download the latest tar.gz for Mojolicious, unpack it, and perl Makefile.PL && make test install.

With it, you get a Modern Perl web client, server, MVC framework, plugins, websockets, templating engine... you name it, and the only requirement is Perl (5.8.8+).

Alternatively, have a look at Catalyst, which has a bit more requirements than Mojolicious but also has a couple books out, and a bigger community behind it.

You can install all sorts of Modern Perl goodies having a look at Task::Kensho. Its purpose is to have all Modern Perl modules one uses to develop web applications, etc. If any of the prerequisites don't install, file a bug report as it is supposed to Just Work


Try out Dancer - Effortless Web Framework. It is very easy to use.

#!/usr/bin/perl

use Dancer;

get '/hi' => sub {
    "Hello World!"
};

dance();


For starters, I always recommend looking at CGI::Application with HTML::Template as the templating engine. Simple enough to install and start with, lightweight and still packed with enough punch to keep everyone (well almost) happy!


About 10 years ago, I was busy doing full time web app development with Embperl 2.0 betas. It was certainly nice to work with at the time. It seems to have been maintained with bug fixes etc since then, but fundamentally hasn't changed much since then.

A few years ago I researched all the Perl WAFs but didn't find anything really appealing. At work, we are using Python+Django but there doesn't seem to be a solid Perl version.

Thus for any quick & dirty web project I'm still resorting to just good old CGI.pm. I'm still a Perl guy at heart.

At the moment I'm again researching all the latest Perl toolkits and Mojolicious with DBIx::Class certainly seeems to be the way to go!

What I haven't found an answer for yet is how to easily build rich user interfaces for database applications with Mojolicious, without having to worry much about generating HTML tables and doing usual CRUD.


I do recommend Mojolicious, especially their micro framework Mojolicious::Lite, which gets you started pretty fast. It doesn't have the kind of documentation like Catalyst, but it is growing. No dependency, other than core Perl, should ease the pain of getting you started.


Embperl is still being maintained, although it is kinda quiet on the mailing list.

Embperl might be an option for small sites.

It is conceptually similar to PHP, but more powerful. Fast (due to lots of C bindings), still easy to install (preferably from command line), works best with mod_perl, but a CGI operating mode is also supported.

Though, I haven't used all its advanced features (embedding xml-libs, configuring https, for instance), but it is great to use perl on the data-output side, when you have perl also on the data input side (data staging/scrubbing).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜