Hi,
I'm writing a fairly large Mojolicious app and I'd like some advice on
where to place the logic of the display or view. My model queries a
database and returns a data stucture with the results. Then my
templates pull the data from the structure and format it. I think
this is all fairly norm
>
> The problem is that some of the display logic is fairly complicated:
> one of my templates has a 30 line <% %> block before anything can be
> displayed. It strikes me that these 30 lines (and others) are better
> off in a subroutine or method. But where? MyApp::View? How would I
> call it
I probably do it backwards, i dont use dbix::class just mojo::pg and like
you my app is a big one. I think the Plugin route is a good way to do it
but I didnt go that way. I'm using Mojo::Base for my model classes.
I made a models folder so lib/Models/mymodelclass.pm
my controllers handle the view
On Wed, 29 Jul 2020 10:17:05 -0700 (PDT)
Sebastian Riedel wrote:
> >
> > The problem is that some of the display logic is fairly
> > complicated: one of my templates has a 30 line <% %> block before
> > anything can be displayed. It strikes me that these 30 lines (and
> > others) are better off i