|
Hi Juan,
It really sounds like your Reporter is your model, i.e, you can test it and use it without a web app. The anon sub a Mojolicious::Lite route calls becomes a method (action) of a controller class. The controller generally handles decoding the input, calls model methods in response, and formats the output. The "view" is usually just the template, and a template is usually associated with a controller method (aka action). It sounds like your Formatter is either part of the controller or a helper that the controller can call to render parts of the template. Setting up the response (i.e, the content-type headers) is usually a controller responsibility. Finally, the app just handles setup - things that need to run at startup: reading config files, setting up routes, loading plugins or helpers, etc. - Dotan On 04/30/2015 03:01 PM, Juan Clavero wrote: Hi all, -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout. |
- [Mojolicious] Doubt about controller and view Juan Clavero
- Re: [Mojolicious] Doubt about controller and view Dotan Dimet
