=back
-If you're unfamiliar with MVC and design patterns, you may want to check out the
-original book on the subject, I<Design Patterns>, by Gamma, Helm, Johson and
-Vlissides, also known as the Gang of Four (GoF). You can also just google it.
-Many, many web application frameworks are based on MVC, including all those
-listed above.
+If you're unfamiliar with MVC and design patterns, you may want to check
+out the original book on the subject, I<Design Patterns>, by Gamma,
+Helm, Johnson, and Vlissides, also known as the Gang of Four (GoF). You
+can also just Google it. Many, many web application frameworks are
+based on MVC, including all those listed above.
=head3 Flexibility
script/myapp_create.pl view TT TT
-where the first C<TT> tells the script to create a Template Toolkit
-view, and the second tells the script that its name should be C<TT>.)
+where the first C<TT> tells the script that the name of the view should
+be C<TT>, and the second that it should be a Template Toolkit view.)
This gives us a process() method and we can now just do
$c->forward('MyApp::V::TT') to render our templates. The base class makes
But by using a Model that is part of your Catalyst application, you gain
several things: you don't have to C<use> each component, Catalyst will
find and load it automatically at compile-time; you can C<forward> to
-the module, which can only be done to Catalyst componenents; and only
+the module, which can only be done to Catalyst components; and only
Catalyst components can be fetched with
C<$c-E<gt>comp('MyApp::M::SomeModel')>.
package MyApp::C::Login;
- sign-in : Local { }
- new-password : Local { }
- sign-out : Local { }
+ sub sign-in : Local { }
+ sub new-password : Local { }
+ sub sign-out : Local { }
package MyApp::C::Catalog;