10 Mojolicious Models in 10 Days
Aside from the aforementioned learning goals, I’m also going for the following:
- Despite the name “Mojo Models”, I’ll be writing the models in such a way as they can be made standalone as possible, preferring to either use them directly in a Mojolicious::Controller, or interact with them through an adaptor class that pulls them in via Mojo::Base. That way, I can pull these models out when I want, say, to do a Dancer-based practice project instead of Mojo ;)
- Practice good design as much as possible. Not only in code, but also on visual/print design as well. HTML5/CSS3 offers a richer set of possibilities for web designs than ever before; make sure I get to use it!
To run this webapp, you need Mojolicious as well as a bunch of modules listed in the Makefile.PL; install them as needed.
You may run the webapp using Mojo::Server::Morbo with the following command:
$ morbo script/mojoten Server available at http://127.0.0.1:3000
RandomQuote: get a random quote (or all quotes) from a <DATA>-base
MoonPhase: show phase-of-moon and illumination