<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23543">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Another advantage of creating the app as a
standalone app (like a common CPAN package) is that you will be able to use with
another framework if Dancer will not be ready when it is ready, so you don't
need to invest effort in the web-related part until you'll know that the web
framework you want to use is good.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Plus that you will be able to create tests and you
will be able to add command line scripts easier if you need them.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV>--Octavian<BR></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=andrew@illywhacker.net href="mailto:andrew@illywhacker.net">Andrew
Solomon</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=dancer-users@dancer.pm
href="mailto:dancer-users@dancer.pm">Perl Dancer users mailing list</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 23, 2014 5:47
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [dancer-users] Confused
about types and globals</DIV>
<DIV><BR></DIV>
<DIV dir=ltr>
<DIV class=gmail_extra>
<DIV class=gmail_quote>On Thu, Jan 23, 2014 at 2:18 PM, Warren Young <SPAN
dir=ltr><<A href="mailto:warren@etr-usa.com"
target=_blank>warren@etr-usa.com</A>></SPAN> wrote:</DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><BR>Ideally, I want my top-level module to be as small as
possible, doing little more than set up the route handlers, delegating all
the real work to other modules. To do that, I need to know where these
objects come from, their exact data type, and which package's namespace they
live in. Then I'll know how to reference them or pass them around to
the modules that do the work in my app.<BR></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>When you say "the modules that do the work in my app" I'm assuming you
mean the model in an MVC architecture. If so, keep in mind that it's very
difficult to maintain the code if you pass the route handlers' objects into
the model's methods.</DIV>
<DIV><BR></DIV>
<DIV>An better approach is to implement the model separately from the Dancer
DSL, giving it a command-line interface and unit tests. Once that's complete,
call the model from the route handlers using data retrieved from the
controller using calls like "params". This will make it much easier to
identify bugs and make changes down the track - knowing that the impact is
limited to the layer in which you're making the change/identifying the
bug.</DIV>
<DIV><BR></DIV></DIV></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>dancer-users mailing
list<BR>dancer-users@dancer.pm<BR>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users<BR></BLOCKQUOTE></BODY></HTML>