Book Image

Catalyst 5.8: the Perl MVC Framework

By : Antano Solar John
Book Image

Catalyst 5.8: the Perl MVC Framework

By: Antano Solar John

Overview of this book

<p>Many web applications are implemented in a way that makes developing them difficult and repetitive. Catalyst is an open source Perl-based Model-View-Controller framework that aims to solve this problem by reorganizing your web application to design and implement it in a natural, maintainable, and testable manner, making web development fun, fast, and rewarding.<br /><br />This book teaches you how to use Catalyst to weave the various components involved in a web application, using methods and tools you personally prefer along with recommendations and details on the most popularly used objects like the DBIX ORM, TT2 Template, and Moose.<br /><br />This book will take you from how the MVC pattern simplifies creating quality applications to how Catalyst allows you to tap this power instantly. It explains advanced design patterns and concludes with the improvements that Moose brings to all this. It also incorporates valuable suggestions and feedback received from the community members and our customers. By the end of the book, you will be able to build clean, scalable, and extendable web applications. This book embodies Catalyst's philosophies of Do It Yourself and Don't Repeat Yourself.</p>
Table of Contents (16 chapters)
Catalyst 5.8
Credits
About the Author
About the Reviewer
Preface
7
Hot Web Topics
Index

Summary


Many web applications are implemented in a way that makes developing them painful and repetitive. Catalyst, an MVC framework for Perl, lets you design and implement a web application in a natural, maintainable, and testable manner. Everything that your web application needs to do is written only once. You connect to the database in one place, have configuration in one place, and so on. Then, you just write actions for each URL that your application needs, without worrying about the database connections or HTML to produce. Catalyst will handle the details for you. So, you don't need to worry about writing your applications. Thanks to Catalyst's plugin system, it can do more than just dispatch requests—it can manage sessions and users for you, as well as handle many other common tasks. Catalyst is designed to be reliable. There are hundreds of production applications and thousands of users. The code is well tested and new releases almost always maintain compatibility with applications written for older versions. You don't have to worry about Catalyst breaking your application and slowing down your development. It just works!

Most importantly, Catalyst (and Perl) has a thriving community. You can ask a question on the IRC channel and get a response at almost any time of the day. There are also resources on the web for learning more, blogs from developers and users, recipes on the advent calendar, and a wealth of questions answered on the mailing list.

Although this book does a fairly good job of teaching you how to use Catalyst, to truly be able to continually improve and learn to use Catalyst better, you have to learn from the roots. It is important to realize that Catalyst is just a dispatcher that calls the right ORM, Controller, and View. Each of these is merely Perl modules that are well written. So, to understand the flexibility of Catalyst and to leverage its power, you must understand the various options you have in selecting the Model, View, and Controller methods. In this book, we have outlined a few of the commonly used modules. However, it will be beyond the scope of this book to cover every feature for any of the thought modules. It is merely not possible as these components are continuously being improved. Hence, I recommend that you identify the key Perl module/package being thought/used in each chapter and make the effort to learn it independently outside of Catalyst! For example, TT, DBIx::Class, and FormBuider work with any Perl application. It is important that you understand them that way. Catalyst merely makes your life easier by connecting them for you! So, if I were to have a query on models, I would search for documentation on DBIx::Class mostly on cpan instead of searching for documents on Catalyst. Template Toolkit has a dedicated site with a guide that takes no longer than 15 minutes to get started with. So does FormBuilder. If there is one thing that can make a difference to you from this book, it is this concept that each component that you use in Catalyst has to be learnt and mastered individually outside Catalyst. Even if Catalyst allows you to create an orchestra, you still have to learn the individual instruments—keyboard, violin, and guitar—independently outside the orchestra context.