Hi all, I have a doubt on how to organize everything in a Mojolicious app
Right now my app is Mojolicious::Lite. It has a lib folder with two modules: a Reporter and a Formatter. The app has only one route: 'reporter/FunctionName'. It decodes the input param from JSON, calls $Response = Reporter->FunctionName(param). If no format is chosen, it codes response to JSON and renders it. If a format is chosen (e.g. PDF or XLS), $FormattedData = Formatter->Format($Response) and renders $FormattedData. The Reporter gathers data and calculates things. Returns a hashref with data. The Formatter grabs this hashref, fills a template with it and returns the data with proper content_disposition and content_type.
If I'd was to turn this app to Mojolicious, the current app would be the controller, the reporter would be the model and the formatter would be the view? Or app would be the controller and both reporter and formatter would be models? Or app would disappear, Reporter would be the controller and its auxiliaries and formatter would be the model?
I'm really a mess right now. Kind regards, Juan -- 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.
