I've been hearing a bit about Maypole (think "Struts for Perl"). In a nutshell, it's designed to allow you to write complex database driven Web applications very quickly. For example, how long would it take you to build a Friendster/Orkut type web application that does the following?
- login
- logout
- view users
- browse users
- search for users
- edit profiles
- mail out invites to new users
- accept invites
- reject invites
- sign up new users
- offer friend connections
- accept friend connections
Simon Cozens writes that it took him just over a week with only 300 lines of Perl. Maypole runs under mod_perl and is available on the CPAN. It's built on top of Class::DBI, Template Toolkit, DBI and Apache::MVC.
This is something that I think Perl has long been needing. Whether or not Maypole is the way to go is not something that I can say, but I do feel that something like this would be a Good Thing for several reasons. First, my job boils down to providing maximum value for minumum cost and the less code I have to write, the fewer bugs I will create. Second, Perl has long been lacking an enterprise level Web application framework. Regardless of your views on frameworks, this has been an issue which has led many outside of the Perl community to dismiss Perl.
Maypole is being actively developed, it has a mailing list and, with Simon Cozens being behind it, I think it has a chance to go far so long as people get behind it. It's also being built on top of solid, proven technologies.
Any thoughts? Are there problems with his approach? Are there competitors worth checking out?
Re: Building Enterprise Web Applications with Maypole
by lachoy (Parson) on Mar 02, 2004 at 20:58 UTC
|
(I posted this on Ovid's use.perl journal as well...)
I haven't taken a detailed look at Maypole yet (no tuits), but just off the top of my head there are a number of similarities between Maypole and OpenInteract (I'll focus on the still-in-beta OpenInteract2 because it's got a lot more going for it). Generally OI2 is much more heavyweight and designed to adapt to more environments than Maypole. But that doesn't mean it's better -- as usual flexibility comes at a price, in this case complexity. And as usual whether this complexity is worth it really depends on what you're doing.
There are almost certainly more differences, but I have a non-Perl day job to get back to :-) That said, I think the application server problemspace is sufficently complex that having multiple solutions are extremely useful.
| [reply] [d/l] |
Re: Building Enterprise Web Applications with Maypole
by perrin (Chancellor) on Mar 02, 2004 at 17:16 UTC
|
Now I'd like to see a comparison between Maypole, OpenFrame, OpenInteract, PageKit, and a homegrown CGI::Application + TT + Class::DBI approach. I suppose I'll get around to it eventually, if no one else does one. | [reply] |
|
| [reply] |
Re: Building Enterprise Web Applications with Maypole
by borisz (Canon) on Mar 02, 2004 at 15:52 UTC
|
I recommend Apache::PageKit it is also a database driven MVC framework. It has already solutions for most web programming problems like session management, language localization, authentication, form validation, skins and more.
It works with HTML::Template and DBI.
Read the Userguide.
www.pagekit.org
| [reply] |
•Re: Building Enterprise Web Applications with Maypole
by merlyn (Sage) on Mar 02, 2004 at 17:11 UTC
|
It sounds to me like a reinvention of SPOPS/OpenInteract, which is a mature collaborative project with a fairly large following. I wonder if the distinctions are worth the redundant overlaps.
| [reply] |
Canonical example
by zby (Vicar) on Mar 03, 2004 at 13:02 UTC
|
What would be nice is if someone wrote a simple application in all of those frameworks, so that we could compare them in the works. How about working out here the basic functionality list and then sending it to the authors of those packages to implement?
Here is my proposal:
- register user
- login/logout
- browse records from some database table (with paging)
- modification of a selected record
- creation of a new record
- select multiple records for deletion
All with proper locking etc.
By the way there is another one: Gestinanna (not much info in the core package - but you can look at StateMachine::Gestinanna), jsmith journal entry.
| [reply] |
Re: Building Enterprise Web Applications with Maypole
by Anonymous Monk on Mar 03, 2004 at 03:34 UTC
|
Are there competitors worth checking out?
You already know all the competitors, at least a lot of them (AxKit, Mason, Everything, OpenInteract, OpenPlugin/OpenThough .... they're all competitors more or less).
| [reply] |
Re: Building Enterprise Web Applications with Maypole
by danb (Friar) on Mar 03, 2004 at 16:59 UTC
|
Another web application framework to consider is Interchange.
| [reply] |
|
I looked into Interchange a couple of months ago and I found it very painful to install and set up. I finally got it running because I was too stubborn to give up but the experience made me reject Interchange for the project. I figured if it was that difficult to install and configure, maintenance wasn't going to be any better. My point here is that I don't think Interchange meets Ovid's description of Maypole as "designed to allow you to write complex database driven Web applications very quickly".
| [reply] |
|
I'm glad you have already looked at Interchange. I'm sorry you had trouble with it -- a lot of people share your frustration. Specific suggestions on improving it are welcome, we have had a hard time getting such feedback.
In my experience, it is difficult to have complexity of features without a steep learning curve.
If you are doing a one-off web app, lesser tools may do the job faster, since they do not require the initial learning investment.
But if you will be spending years and years on web apps, then the initial investment in Interchange will pay off in the long run.
| [reply] |
|
Re: Building Enterprise Web Applications with Maypole
by Anonymous Monk on Mar 03, 2004 at 03:40 UTC
|
Are there problems with his approach?
Yes, it's nothing new, so lets just keep the excitement level down :)
| [reply] |
Re: Building Enterprise Web Applications with Maypole
by Anonymous Monk on Nov 04, 2004 at 19:20 UTC
|
Is it possible to use some other database package besides DBI with Maypole ? | [reply] |
|
I would imagine that if you wrapped your other database package so it worked like DBI then you could do that. What other database package are you hoping to use? DBI is the central module for nearly all perl database interactions and in general it is foolhardy to use RDBMSes without using DBI.
| [reply] |
|
| [reply] |
|
|
|
|