Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by moritz (Cardinal)
on Apr 30, 2013 at 08:17 UTC ( [id://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?

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found