One of the most common misconceptions about Mojolicious is that there is a large difference between the declarative "Lite" apps that we have seen so far and large-scale structured "Full" apps. Nothing could be further from the truth. Mojolicious::Lite is a very tiny wrapper around the so-called "Full" app architecture, giving it the approachable keyword syntax.

Because it is much nicer to have concise single-file examples for documentation most of Mojolicious' documentation uses Lite syntax most of the time. It is understandable that people worry about migrating (or as we call it "growing") even once their apps would benefit from Object-Oriented structure; after all the docs seem geared towards Lite apps. However, let those fears go, the transition is easy. And once you understand it, the documentatation examples are trivial to translate.

Plus, Mojolicious comes with two forms of help when transitioning. The first is the Growing Guide which covers everything this post will but from the perspective of porting an existing application (which I won't duplicate here). The second is the inflate command which can even start you on the process by moving your templates from the data section and into their own files.

That said, in order to futher demystify things, I'm going to cover some of the differences and pull back the curtain on the Lite syntax itself.

Continue reading Day 4: Don't Fear the Full App...