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


in reply to What does Mojolicious do exactly and is it right for me?

The difference between a library (like CGI.pm) and a framework (like Mojolicious) is that you call library functions, but a framework calls your functions. That's called "inversion of control".

If you write a CGI script, you do things like checking the URL, and if it fits certain criteria, you do stuff. If you write a web application with Mojolicious, you tell that it shall call a certain function when a certain URL is fetched.

The idea is that this saves you from repetitive tasks like checking URLs, parameters, HTTP method (GET, POST, ...) etc.

Basically, is it right for what I am doing?

Probably. Follow the examples from Mojolicious::Lite, it should be quite simple.

  • Comment on Re: What does Mojolicious do exactly and is it right for me?

Replies are listed 'Best First'.
Re^2: What does Mojolicious do exactly and is it right for me?
by walkingthecow (Friar) on Apr 30, 2013 at 09:28 UTC

    This is exactly what I was looking for! Thank you. I wasn't sure if the learning curve was worth it, but your post has clarified things for me and given me the motivation to continue reading the documentation and stick with Mojolicious. Thanks again.

    Just to add: After reading your post, the documentation now makes a lot more sense to me. I guess I was viewing this from a CGI viewpoint and needed a bit of a smack in my paradigm. Thanks for the smack.

      Just curious at your progress with Mojolicious 1 year on. Done anything good with it? What advise would you give "old school" CGI developers migrating to Mojolicious? Thank