aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortimbunce <timbunce@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-03-25 15:55:49 +0000
committertimbunce <timbunce@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-03-25 15:55:49 +0000
commit139b74f7882fe2610d26c39e3cd42a478fc93c6c (patch)
tree8e5b09ded0ae58ac10947566c46cfba40e318eef
parentb8e3c4f1b29515b522333de3c3139c474c2e5884 (diff)
downloadreaction-139b74f7882fe2610d26c39e3cd42a478fc93c6c.tar.gz
reaction-139b74f7882fe2610d26c39e3cd42a478fc93c6c.zip
Make life simpler for those following the tutoria:
Add mkdir command to pre-create the directories Add C<lib/MyApp/....pm> to those sections that didn't have it (for copy-n-paste)
-rw-r--r--lib/Reaction/Manual/Tutorial.pod16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Reaction/Manual/Tutorial.pod b/lib/Reaction/Manual/Tutorial.pod
index 1753577..384c77e 100644
--- a/lib/Reaction/Manual/Tutorial.pod
+++ b/lib/Reaction/Manual/Tutorial.pod
@@ -17,6 +17,12 @@ script as we would for any other Catalyst application:
There is nothing to change in the application class file.
+As you work through this tutorial you'll be creating several new files in
+various directories. You can save some time by creating the directories now,
+like this:
+
+ mkdir -p share/skin/myapp/layout lib/MyApp/View/Site/Widget lib/MyApp/Schema lib/MyApp/InterfaceModel
+
=head1 THE VIEW
Since we are not just rendering templates with Reaction, but layouts and widgets,
@@ -239,7 +245,7 @@ takes this one step further by introducing so called interface models. The inter
defines the layer between your application and your domain model (in this case, the L<DBIx::Class>
schema).
-The first thing we will need is a schema class:
+The first thing we will need is a schema class in C<lib/MyApp/Schema.pm>:
package MyApp::Schema;
use strict;
@@ -267,7 +273,7 @@ called C<example.sqlite>:
$
The result class for this table combines the usual style of L<DBIx::Class> with L<Moose> meta
-data additions:
+data additions in C<lib/MyApp/Schema/Foo.pm>:
package MyApp::Schema::Foo;
use Moose;
@@ -325,7 +331,8 @@ inspect many-to-many relations later on.
The interface model should be separated from the application and the schema, since it
will tie both together. In this case, we will use a reflector to set up the usual interface
-model actions for our schema (C<Create>, C<Update>, C<Delete>, C<DeleteAll>):
+model actions for our schema (C<Create>, C<Update>, C<Delete>, C<DeleteAll>) in
+C<lib/MyApp/InterfaceModel/DBIC.pm>:
package MyApp::InterfaceModel::DBIC;
@@ -382,7 +389,8 @@ via your application config file under the C<Model::DBIC> key.
=head1 BUILDING A SIMPLE CRUD CONTROLLER
Now, since we have defined our interface model as well as our domain model including meta
-data, it isn't very hard (at least not for us) to build a basic (but extendable) CRUD controller:
+data, it isn't very hard (at least not for us) to build a basic (but extendable)
+CRUD controller in C<lib/MyApp/Controller/Foo.pm>:
package MyApp::Controller::Foo;
use strict;