Scott Bryce said:
I am coming to the same conclusion.
Dancer, and other similar frameworks seem to be intended for use to
develop apps that do one task or a group of related tasks and are fairly
stable once they are released. I maintain web sites made up of hundreds
of scripts that each do one very targeted task, and are continually
under development. It seems like it would be a pain to do this under
PSGI.
Minus a few procedural infelicities you observed, eg, the inability to
exchange just a small part of 'the combined application', that's just a
different way to structure 'an application' (here refering to the
total functionality of 'the web site'): You're accustomed to CGI which
means that you build 'the web site' as a set of independent,
(presumably) cooperating programs and don't waste time worrying about
'creating processes to run programs' and the overhead is really usually
negligent on systems (like Linux) where 'process creation' is 'fast'
(after all, people used this model to build complex applications used by
relatively large numbers of users running on hardware which would seem
very puny when compared with current smartphones).
But there's also the competing (and actually older since it is really
'classic mainframe programming') approach that 'The Computer' executes
'The Program' (which is only started once, hence, the amortized cost of
process creation and program execution is zero) and 'The Program'
provides all required functionality via 'sub-programs' which are
integral parts of it. Other benefits of that would be that 'sharing
infrastructure code' is easier this way (since everything is part of a
single program, any subroutine can invoke any other subroutine) and that
different parts of 'the program' can cooperate by using 'shared
variables' instead of 'some IPC mechanism' (be it only creating files on
the file system). It is also easier to deal with by (relatively)
inexperienced programmers because 'add some more code to the existing
program in order to provide yet another feature' is a more
straight-forward operation than 'write a new program to do that' (and
integrate it into the existing environment in a way which requires using
tools other than "The Programming Language" and libraries written in it
which are also part of 'The Program').
NB: I usually prefer the first approach, however, everything I've ever
done via CGI was 'rather simple', while the most complex web application
I'm dealing with is a single, large 'frameworked' Java program (I'm also
dealing with things other than web application and have built some
pretty complex things from relatively simple, indepdendent parts, but
this may not be comparable).