[Jifty-commit] r6373 - in jifty/trunk: .
jifty-commit at lists.jifty.org
Fri Feb 20 18:32:20 EST 2009
Date: Fri Feb 20 18:32:20 2009
New Revision: 6373
jifty/trunk/ (props changed)
r80305 at onn: sartak | 2009-02-20 18:32:02 -0500
Update explanation of the directories "jifty app --name MyWeblog" creates
--- jifty/trunk/lib/Jifty/Manual/Tutorial.pod (original)
+++ jifty/trunk/lib/Jifty/Manual/Tutorial.pod Fri Feb 20 18:32:20 2009
@@ -67,28 +67,33 @@
# jifty app --name MyWeblog
Creating new application MyWeblog
- Creating directory lib
- Creating directory lib/MyWeblog
- Creating directory bin
- Creating directory etc
- Creating directory doc
- Creating directory log
- Creating directory var
- Creating directory var/mason
- Creating directory share
- Creating directory share/po
- Creating directory share/web
- Creating directory share/web/templates
- Creating directory share/web/static
- Creating directory lib/MyWeblog/Model
- Creating directory lib/MyWeblog/Action
- Creating directory t
+ Creating directory MyWeblog/lib
+ Creating directory MyWeblog/lib/MyWeblog
+ Creating directory MyWeblog/bin
+ Creating directory MyWeblog/etc
+ Creating directory MyWeblog/doc
+ Creating directory MyWeblog/log
+ Creating directory MyWeblog/var
+ Creating directory MyWeblog/var/mason
+ Creating directory MyWeblog/share
+ Creating directory MyWeblog/share/po
+ Creating directory MyWeblog/share/web
+ Creating directory MyWeblog/share/web/templates
+ Creating directory MyWeblog/share/web/static
+ Creating directory MyWeblog/lib/MyWeblog/Model
+ Creating directory MyWeblog/lib/MyWeblog/Action
+ Creating directory MyWeblog/t
Creating configuration file MyWeblog/etc/config.yml
Let's take those one by one.
+Inside F<lib/> is where all of your application code goes. Your application
+generally consists of a set of classes.
Inside F<bin/> is F<jifty>, the Jifty command dispatcher. Some
@@ -100,8 +105,8 @@
-Configuration files live in F<etc/>, though if you don't have a config
-file, Jifty will supply some sane defaults.
+Configuration files live in F<etc/>. Jifty creates a basic config
+file for your application.
@@ -113,22 +118,33 @@
Jifty uses L<Log::Log4perl> to configure its logging. By default, it
dumps logs named F<server.log> and F<error.log> into the F<log> directory.
+Jifty stores cache files here while the server is running. You shouldn't ever
+have to touch this directory.
+Jifty supports internationalization. F<share/web/po/> is where your
+translations will go.
-Jifty uses L<HTML::Mason> as its primary templating system. Put
-your application's templates into F<share/web/templates/>. Out of
-the box, Jifty comes with an application I<skeleton> that it installs
-in F<share/web/templates/>. This default application is a convenient
-way to get a basic application up and running quickly, but probably
-needs some customization as you build a more advanced application.
+Though modern Jifty applications are encouraged to use L<Template::Declare>
+for templating, we also support L<HTML::Mason> templates. Put your
+application's Mason templates into F<share/web/templates/>. Out of the
+box, Jifty comes with an application I<skeleton> that it installs in
+F<share/web/templates/>. This default application is a convenient way to
+get a basic application up and running quickly, but probably needs some
+customization as you build a more advanced application.
You can find where Perl stuck Jifty's default templates with:
- perl -MJifty::Util -e 'print Jifty::Util->share_root'
+ perl -MJifty::Util -le 'print Jifty::Util->share_root'
-Some nontrivial percentage of the I<stuff> your web application serves
+Some nontrivial percentage of the content your web application serves
out doesn't need to (or I<shouldn't>) pass through your templating
@@ -141,19 +157,19 @@
-For a full treatment of the Jifty object model see
To build a basic Jifty application, you only need to worry about two
sorts of classes, B<Models> and B<Actions>.
The real base of your application lives in
-C<lib/B<ApplicationName>/Model>. Classes here define your application's data
+C<lib/MyWeblog/Model>. Classes here define your application's data
structures and how they relate to each other. Jifty will use your model
classes to set up and upgrade your database's schema when it needs to.
+For a full treatment of the Jifty object model see
When we said you only need to worry about B<Models> and B<Actions>,
@@ -163,15 +179,10 @@
-Jifty starts off your application with a basic harness, but can't yet write
+Jifty starts off your application with a basic harness, but can't yet write
all your tests for you. (It does, however, build simple tests for model
classes you generate.)
-Jifty stores cache files here while the server is running. You shouldn't ever
-have to touch this directory.
=head2 Building your data model
More information about the Jifty-commit