[dancer-users] Why learn Dancer?

Andrew Solomon andrew at illywhacker.net
Thu Jul 3 17:07:08 BST 2014


Thanks John. From the point of view of the controller-model
relationship, pattern #3 in here

http://www.perlmonks.org/?node_id=915657

gives a nice example of creating a Catalyst model for wrapping a
non-web package or schema. It explains the benefit of having a DB
handle invisibly attached to the controller [I feel uncomfortable with
it as a kind of magic:)] but I think the equivalent can be done in
Dancer with Dancer::Plugin::DBIC http://advent.perldancer.org/2010/11
so I'm not really much clearer on the difference. Anyway, I'd like to
know peoples' views on whether this is a healthy approach to
developing maintainable web apps.

Another interpretation of a micro framework is Peregrin's description
of the difference between Catalyst and Dancer here which is more
focussed on the potential complexity of the controller

http://stackoverflow.com/questions/5080017/dancer-vs-catalyst-perl-web-frameworks

Andrew

On Thu, Jul 3, 2014 at 4:13 PM, John Ingram <john at rotogrinders.com> wrote:
> This is just my own understanding, but here it is:  Let's first get on the
> same page about web frameworks. To me, a web framework is basically giving
> you everything you need to get started with a database-driven website or web
> application.   Everything, that is, between the webserver software and the
> database software.  And in many cases the framework itself includes a
> webserver.  This is true of Dancer (which I'm not saying is a full
> framework) and Rails and most others, because the basics of a webserver are
> pretty simple.
>
> So when I say "everything you need to get started," that's generally going
> to include each of the MVC layers.  Some code that handles the Model, some
> code that handles the Controller, and some code that handles the View.
>
> Of course, there are lots of ways to deal with a database, and most of them
> have nothing specific to do with web frameworks.  In Perl, there's pure DBI,
> there's DBIx::Class, there's Rose::DB::Object, and I'm sure many others.
> There are also lots of ways to do templating.  Template Toolkit,
> HTML::Template, and many others.  There are also websites and web
> applications that are so simple that you don't even need those parts at all.
> For those reasons and others, there is an appetite for the "micro web
> framework."
>
> As far as I can tell, there's only one real requirement for a micro web
> framework.   And that is route handling.  When certain types of requests
> come in, how do we handle those requests?   Different HTTP methods,
> different URIs, different query parameters.  How do we parse the arguments?
> How do we handle error conditions?  File uploads.  Session data.   Etc.
> All of this is included in a full framework as well, as the Controller.  And
> they also contain code for the Model and View.  But the micro-framework does
> not.  You might think of a micro framework as simply a controller framework.
>
> Anyway, that's my impression.   I might be wrong.
>
>
> On Thu, Jul 3, 2014 at 9:40 AM, Andrew Solomon <andrew at illywhacker.net>
> wrote:
>>
>> Hi John
>>
>> I've read this and I still don't really know what a micro web framework is
>>
>>
>> http://stackoverflow.com/questions/6784007/what-does-it-mean-to-be-a-micro-framework
>>
>> but my gut feeling is simply that for a micro framework, a large
>> portion of functionality is acquired via plugins.
>>
>> Can you clarify the definition?
>>
>> Andrew
>>
>> On Thu, Jul 3, 2014 at 12:45 AM, John Ingram <john at rotogrinders.com>
>> wrote:
>> > While this is interesting, comparing Dancer with anything more than a
>> > micro-framework is not really accurate.
>> >
>> > On Ruby, that's Sinatra, for one.   Python has Bottle and Flask, perhaps
>> > others.   But to compare Dancer with either Django or Rails is something
>> > that I don't quite understand.
>> >
>> > The fact that Dancer is a micro-framework, and not a full framework, is
>> > why
>> > I love it.  I love Rose::DB::Object as n ORM, and Template Toolkit as a
>> > view
>> > layer.   What I was missing was Dancer.  Now I have what I need.
>> >
>> >
>> > On Wed, Jul 2, 2014 at 6:12 PM, fabioniguel3 at gmail.com
>> > <fabioniguel3 at gmail.com> wrote:
>> >>
>> >> Thanks for that Andrew.
>> >>
>> >>
>> >> On Thu, Jul 3, 2014 at 12:02 AM, Andrew Solomon
>> >> <andrew at illywhacker.net>
>> >> wrote:
>> >>>
>> >>> I've been conducting a series of interviews of my students to
>> >>> understand the motivation for learning Perl. This one I thought would
>> >>> be of particular interest to the Dancer community as I've asked an
>> >>> established Perl developer with a broad background in other languages
>> >>> and technologies why he learnt Dancer
>> >>>
>> >>> http://blog.geekuni.com/2014/07/why-learn-perl-interview-3-savio.html
>> >>>
>> >>> Hope you find it interesting!
>> >>>
>> >>> cheers
>> >>>
>> >>> Andrew
>> >>> _______________________________________________
>> >>> dancer-users mailing list
>> >>> dancer-users at dancer.pm
>> >>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> dancer-users mailing list
>> >> dancer-users at dancer.pm
>> >> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>> >>
>> >
>> >
>> > _______________________________________________
>> > dancer-users mailing list
>> > dancer-users at dancer.pm
>> > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>> >
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>


More information about the dancer-users mailing list