Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Perl: Why you no modern web framework?

by domje (Novice)
on Jun 22, 2013 at 19:04 UTC ( #1040284=perlmeditation: print w/ replies, xml ) Need Help??

Apologies in advance. This should have been in Meditations and not Seekers. My bad, guys.

First off I would like to say that I hope this sparks a productive conversation more than anything.

Being that I've fancied myself a Perl fan for ~ 10 years the most basic question that always crosses my mind when knee-deep in a project is: why isn't there a better way?

I was recently contracted to build a custom website with specialized user functionality and a single item that would turn up for each user role at a different price, a second item that would show up only for one specific role, and a checkout/payment process to sell them. After basically completing the site in Catalyst the client then scrapped a lot of the custom portions of the site. Thus wasting 3 weeks of my time having taken the site from soup to nuts and then reworking it (also included in this time were 3 major change orders for the layout). Basically every time they got feedback from a silent partner they changed their mind from what we agreed upon in the beginning.

But I digress. This isn't about clients.
The solution I settled upon became a Catalyst app using Handel for the cart and a couple of the Business:: modules for shipping and payment.

However with solutions like Drupal and WordPress being so popular in deployments these days I am at a difficult crossroads.
I love Perl. I started 10 years ago with it writing custom CGI's for small-business clients such as a dispatching system for tomato trucks that printed triplicate handbills, stashed all the information in a database, and made daily reports for the yard masters.
It was an exercise in tedium for me back then to be sure!

I've deployed a couple of very basic, plain sites with the help of modules like Mason which worked very good for me. Under mod_perl it was silly fast and wicked reliable.

On this latest project however I feel that Catalyst falls short. Having all of cpan available really helps to add functionality but much like Django or Rails you still have to get your hands dirty and hack together some kind of interface. Nothing "just works" right out of the box.

So the real question comes down to this: why isn't there a Perl CMS platform like Drupal?
After years of seeing books on Drupal, Joomla, Rails, etc. on the shelves of my local book stores I decided to give it a shot and see what all the fuss is about.
I liked the simplicity of rails and felt it was too simple. I just didn't like it. It felt like an alien language that was just too primitive. I felt I could do more and do it more efficiently with Perl so I left it alone.
This week I tried out Django. Again much like Rails it was very simple, and much like Perl it's very powerful being that it's written in Python. But personally I dislike Python syntax and despise the indentation requirements in certain files...

And this brings me to Drupal and the real heart and soul of my frustration with Perl.
Why is there no Perl CMS platform like Drupal?
I love the idea of Drupal. It just works out of the box.
Everything is easy to install. The modules, the themes, etc.
I dropped in the Commerce Kickstart add-on last night and currently find the most difficult part of this whole process is simply recoding template files to migrate my own layouts into Drupal themes.
I don't see why something like this couldn't be achieved with a framework that is simpler and less bloated than, say, Catalyst with the power of something like Mason.
Cause I'll tell ya. Running Catalyst under FCGI is a b*** on shared hosting!
It took a week to get the dang thing live because of all the dependencies and the host support not having any idea what I was trying to accomplish. In the end I had to solve all of the problems myself because support was useless.
And the worst part is, the way the chosen provider sets up their Apache, the app is killed and re-launched every time the site is hit. Thus it's VERY slow.
So I ask the question. One last, desperate time, why don't we have something like Drupal? Where it JUST WORKS and it's wicked easy to configure and install?
None of this myapp_create.pl controller nonsense!

The Drupal approach is really straight forward to the user and make s a lot of sense. It's something I've thought over and over 'there should be something like this' when working on Perl projects.
Perhaps it's the paralysis of analysis caused by browsing CPAN but maybe it's time to cherry pick the best ideas and stuff them all in the same box...

Thanks all for listening to the rant ;)

Comment on Perl: Why you no modern web framework?
Re: Perl: Why you no modern web framework?
by aaron_baugher (Deacon) on Jun 22, 2013 at 20:20 UTC

    Your question title says "web framework," but it appears you're really looking for a CMS. There are Perl CMSs, if that's what you're looking for.

    It may be because Perl programmers want more lower-level control. I've used Drupal, Wordpress, and other CMSs, and I always get frustrated when I can't get them to do what I want (or more often, not do what I don't want) without digging through lots of files of code. If you're a programmer, rather than a user, and you want to do more than just publish content and tweak its style, you get more control by starting with a framework like Dancer or Catalyst and just creating what you need on top of that.

    Aaron B.
    Available for small or large Perl jobs; see my home node.

Re: Perl: Why you no modern web framework?
by derby (Abbot) on Jun 22, 2013 at 20:43 UTC

    So sad ... no love for webgui.

    -derby

      So sad ... no love for webgui.

      What is it? How is it different than "Django"?

      The "Django" wikipedia page looks maintained, while the WebGUI one doesn't

      The only "comparison" I could find favors Django http://vschart.com/compare/django-cms/vs/webgui

      So Django seems to have a slight marketing edge I guess

        Well, that and webgui is written in Perl where as Django is written in Python. What's with the Django fixation anyway?

        We care about Perl here, so webgui seems to have a slight interest edge I guess.

Re: Perl: Why you no modern web framework?
by davido (Archbishop) on Jun 22, 2013 at 21:52 UTC

    Why you no modern web framework?

    So the real question comes down to this: why isn't there a Perl CMS platform like Drupal?

    Because nobody has written a Content Management System like Drupal for Perl yet, possibly because Drupal already exists, and it's more work to re-write it in Perl than to learn enough PHP to tinker with it. I know that's not great for Perl enthusiasts. However, to say that Perl has no content management systems isn't correct either:

    • Galileo -- A simple modern CMS built on Mojolicious.
    • CatalystX::CMS -- A "drop-in content management system" for Catalyst.

    Those are just a couple that I know of. I imagine that there's room for improvement with both of those. I know that Galileo is under active development. I wouldn't be surprised if collaboration is encouraged.


    Dave

Re: Perl: Why you no modern web framework?
by sundialsvc4 (Monsignor) on Jun 22, 2013 at 22:44 UTC

    Go write one.   :-D   Every good system in CPAN (or PHP, or Python ...) started with someone’s good idea.

    But here is what you are very likely to encounter when you go down “the Drupal road” ... plug-in hell.   I’ve been there, as likely have you.   The software, good and well-built though it is, has a very narrow view of what “content” is, and a very limited capability to devise true “business rules” concerning it.   Very soon, your “exceptions,” as defined by those plug-ins and callouts, have become the rules.

    Perl offers a number of very good frameworks by which any sort of web-application (front and back end) can be constructed in less time than you would do without their assistance.   So, full-disclosure, does PHP, so it really isn’t the fault of the language.   But these Perl frameworks are generally building-blocks.   Systems like Drupal make it look easy, and in so doing, tend to yield much more fragile production systems.

    You definitely do have a customer-expectations problem, and I would suggest trying to deal with it diplomatically but firmly.   The more times any piece of source-code is changed, the weaker it becomes.

    I’m afraid that you are wearing some rose-colored glasses with regards to Drupal ... no software system, regardless of implementation language, is really that way.   And you are also encountering the realities of “shared hosting.”

        You're very picky about sundialsvc4, are you ex-lovers/BFFs or something? :-)

        If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

        While I agree on the criticism regarding this particular postís handling ó I hadnít seen it happen, so Iíll also add, if it indeed happened this way ó I donít think you should be this harsh, in fact, please take your differences to a private conversation or something.

        By all means, both of you are high level monks, both of you must have done something good to earn that. You should know better.

Re: Perl: Why you no modern web framework?
by space_monk (Chaplain) on Jun 23, 2013 at 06:28 UTC
    I love the idea of Drupal. It just works out of the box.

    I would love to know which box he opened, it sure as hell wasn't the one labelled "Drupal"

    If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)
Re: Perl: Why you no modern web framework?
by blue_cowdawg (Prior) on Jun 24, 2013 at 13:00 UTC
        I love the idea of Drupal. It just works out of the box.

    Really? That wasn't my experience at all. I tinkered with Drupal for about a week and not even the examples given on the Drupal web site worked without a lot of tinkering. Then I went to actually deploy it to a web server and had to tinker more. Asking on the Drupal forums for pointers on how to integrate Drupal with Apache failed to give me a straight answer. In the end I just gave up on Drupal. I have several Perl based frameworks that I work with and more in Java. Don't need another one.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Perl: Why you no modern web framework?
by Ralesk (Pilgrim) on Jun 26, 2013 at 12:44 UTC

    The whole confusion about frameworks and CMSes and whatnot aside, Iíve been wondering about something similar, just about forum software.

    Why are all the forum engines written in (ancient-ish) PHP? Or if not, theyíre in ASP. Every other language, including Perl, but also Python and Ruby (which are slightly more known for their webbiness) have none that are worth the bother really. Itís a bit disappointing. (As is the PHP onesí insistence for using MySQL, but thatís a rant for another day.)


    Update: It seems thereís some confusion about things and people think I donít know that PerlMonks runs on Perl.

    When Iím talking about forums, Iím thinking about things like YaBB (that was Perl, later became yabbSE and then SMF), phpBB, vBulletin, and the likes. For this class of bulletin boards, LanXís example below about Perl-community.de is a good one. PerlMonks, yCombinator, SlashDot and so on have a very different way of working with, probably partly because of the threading, but probably for other reasons that I canít really put my finger on. Thereís also StackOverflow that one could call a forum, but, not sure...

    I had googled and wikipediad (thatís a word now) and looked at things that those searches resulted in, and I saw some seriously wonky-looking, long-not-maintained things. Iíve seen SMF from the inside, itís not pretty ó yet for that genre of forums itís one of the best out there and there seems to be no challenger out there that could serve any of the other three languages.

      The German Perl-community.de board (like perlmonks) runs on Perl and IIRC it was released on github.

      Cheers Rolf

      ( addicted to the Perl Programming Language)

Re: Perl: Why you no modern web framework?
by perlfan (Curate) on Jun 26, 2013 at 14:55 UTC
    CMS != Framework. Perl has modern web frameworks.

    My obversvations are: 1) PHP owns CMS and Forum software; 2) Ruby owns Sysadmin/Project Management type software; 3) Python owns..idk, I think it's losing its mojo (web framework pun intended), honestly.

    There are CMSes, Forums, and Project Management software written in Perl, but the others seem to more enthusiastically supported by the maintainers and communities they engender. This is also known as "why you no good blog, cms, forum software?"

      Thank you all. These are (mostly) intelligent answers! I probably should have specified CMS instead of framework. I was kind of looking at them as being hand-in-hand because _every_ framework has a purpose of handling _some_ type of content. Being extensible and flexible makes it a framework in my opinion. But I do see the distinction between, say, Catalyst and Galileo. However. I stand by my assessment. With both Drupal and Wordpress they do "just work" out of the box for the most part. As long as the host has PHP5 and MySQL it'll load right up. I've deployed 4 installations this month with Drupal and 2 with Wordpress and had no goofiness to deal with. Under Perl systems I've had to manually install modules for hours just to get "Hello, World!" on the bloody screen. It shouldn't be that way. Under Drupal 8 there's even a feature to install your modules via the interface. Paste the link and it does the job for you. Have had it fail on me once. The bottom line is that I personally think the success of the Perl language rests upon the ability to provide an entry into the blogging, forum, cms, social world currently occupied almost entirely by php. I like the idea of PHP but essentially it does the same thing as Mason et al by letting you jump back and forth between PHP and HTML code. As best I can figure, the core of Drupal is very straightforward. The way they put it together isn't bad either. But I think it could be faster, a tad more stable, and for us Perl guys, more customizable. Just my 2 cents. And yes, I might go write one.

        'Under Perl systems I've had to manually install modules for hours just to get "Hello, World!" on the bloody screen. It shouldn't be that way.'

        It isn't that way, and it's potentially misleading to others who don't know better to claim otherwise. first steps even has a video tutorial for those who are completley new to this.

        If by 'I've had to manually install modules for hours just to get "Hello, World!" on the bloody screen' you actually mean it took you more than an hour to get a "hello world!" perl generated web page then I'd have to question why it took so long.

Re: Perl: Why you no modern web framework?
by bitingduck (Friar) on Jul 30, 2013 at 04:39 UTC
    Running Catalyst under FCGI is a b*** on shared hosting!

    Not really a Perl issue so much as a customized site issue--if you're trying to do much more than what the hosting provider gives you as part of the package, shared hosting can be a big pain. If you're using Catalyst you're probably pushing beyond what most shared hosts support effectively. Virtual servers have gotten fairly inexpensive and you can get one where you have complete control over the configuration (right down to which BSD or Linux distro) that makes it much easier to manage something where you're doing anything special. You can be pretty sure with a VPS that nobody but you is going to upgrade some module to a new version and break all your stuff. You can also set up the server (Apache, Nginx, or whatever) to deal with requests how you want so you don't get the overhead of starting a whole new process for every hit. It sounds like a little more work on the front end, but it's less work than trying to squeeze what you want into someone elses non-optimized, inflexible setup, when you can probably find plenty of reliable recipes on how to set up something that really does what you need.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1040284]
Approved by Old_Gray_Bear
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-07-31 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (255 votes), past polls