Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by moritz (Cardinal)
on Apr 30, 2013 at 08:17 UTC ( #1031352=note: print w/ replies, xml ) Need Help??


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?
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-09-21 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls