Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Understanding benefits of Plack

by unlinker (Monk)
on May 08, 2011 at 12:07 UTC ( #903639=note: print w/ replies, xml ) Need Help??


in reply to Understanding benefits of Plack

While I do not understand Plack/PSGI completely, let me risk a response in the hope that I will be corrected: PSGI is a specification for Perl applications to work with a variety of Webservers. In other words, if you write your application in a manner consistent with PSGI, then you will enjoy the benefit of running your application in a whole variety of Web Server Infrastructures

Technically, if you are an application developer, (as opposed to somebody who creates web frameworks for app developers) you dont really have to deal with or understand Plack. This is the stated belief of Plack/PSGI's main creator Miyagawa. On the other hand, if you are a framework creator/writer, then you need to understand PSGI and write your framework consistent with it.

As app developers, all we need to do is to choose a framework that plays with PSGI: There are legacy frameworks (BP - Before Plack) like CGI::Application that provide a "driver" that talks PSGI and there are modern frameworks (AP?) that are built with PSGI from ground up like Dancer. All we application developers need to do really is to choose the right framework that suits us and do what we do best. Create great perl apps!

You can however write your application that bypasses the framework layer and talks PSGI directly. Much like you are currently doing with mod_perl — use mod_perl calls to create the web environment in which your application runs. But if you were to distrubute such an application, your potential users will have to do much before the app can be run.

In the age of BP, deploying solid perl web applications was significantly harder than say deploying PHP applications. AP, however, has taken perl applications far far ahead of PHP at least as far as ease of deployment is concerned. In some cases, all it takes is to say "./app.pl" and your web app is ready. That to me is the greatest benefit of Plack


Comment on Re: Understanding benefits of Plack

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2014-10-23 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls