Book Image

Catalyst

By : Jonathan Rockway
Book Image

Catalyst

By: Jonathan Rockway

Overview of this book

<p>Many web applications are implemented in a way that makes developing them painful 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 />Everything that your web application needs to do is only written once; you connect to the database in one place, have configuration in one place, etc. 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 so you can worry about writing your application.<br /><br />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.<br /><br />Most importantly, Catalyst has a thriving community. You can ask a question on the IRC channel and get a response at almost any time of the day.<br />&nbsp;<br />This book embodies Catalyst's philosophies of Do It Yourself and Don't Repeat Yourself.</p>
Table of Contents (14 chapters)

RSS


The final topic that we'll examine is RSS feeds. An RSS feed is an XML format designed to let users subscribe to website and receive notification whenever a new article (or other piece of content) is posted. It works best for news sites or blogs.

RSS is beginning to be phased out in favor of Atom, which serves the same purpose but is an actual IETF standard. Users use RSS and Atom interchangeably and most RSS readers support Atom feeds. We'll be using the XML::Feed CPAN module to generate the RSS feed, which can generate Atom and legacy RSS from the same code.

To demonstrate the concept of RSS, we'll add an RSS feed to our mini-blog program from Chapter 6. To start, let's create a Controller to generate RSS feeds. As the RSS feed is specific to one piece of data and no templating system is used to generate the Feed, we're going to do everything inside a controller. If your application has multiple sources of data that you want to create a View that converts the stash to an RSS feed, instead...