Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
show expected directory structures in growing guide
  • Loading branch information
kraih committed Sep 15, 2014
1 parent 65f83b5 commit ab00033
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.42 2014-09-15
5.42 2014-09-16

5.41 2014-09-13
- Deprecated Mojolicious::Controller::render_static in favor of
Expand Down
44 changes: 38 additions & 6 deletions lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -512,8 +512,19 @@ this.
<body><%= content %></body>
</html>

A list of all built-in helpers can be found in
L<Mojolicious::Plugin::DefaultHelpers> and L<Mojolicious::Plugin::TagHelpers>.
And our directory structure should be looking like this now.

myapp
|- myapp.pl
|- lib
| +- MyApp
| +- Model
| +- Users.pm
+- t
+- login.t

Our templates are using quite a few renderer features,
L<Mojolicious::Guides::Rendering> explains them all in great detail.

=head1 WELL STRUCTURED APPLICATION

Expand Down Expand Up @@ -678,8 +689,8 @@ information.

1;

L<Mojolicious::Routes> allows many route variations, choose whatever you like
most.
The router allows many different route variations,
L<Mojolicious::Guides::Routing> explains them all in great detail.

=head2 Templates

Expand Down Expand Up @@ -716,8 +727,8 @@ without breaking updated dual-life modules.

=head2 Simplified tests

Normal L<Mojolicious> applications are a little easier to test, so
C<t/login.t> can be simplified.
Full L<Mojolicious> applications are a little easier to test, so C<t/login.t>
can be simplified.

use Test::More;
use Test::Mojo;
Expand All @@ -744,6 +755,27 @@ C<t/login.t> can be simplified.

done_testing();

And our final directory structure should be looking like this.

myapp
|- script
| +- myapp
|- lib
| |- MyApp.pm
| +- MyApp
| |- Controller
| | +- Login.pm
| +- Model
| +- Users.pm
|- t
| +- login.t
+- templates
|- layouts
| +- default.html.ep
+- login
|- index.html.ep
+- protected.html.ep

Test-driven development takes a little getting used to, but can be a very
powerful tool.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Lite.pm
Expand Up @@ -87,7 +87,7 @@ L<Mojolicious>.
=head1 TUTORIAL
A quick example driven introduction to the wonders of L<Mojolicious::Lite>.
Most of what you'll learn here also applies to normal L<Mojolicious>
Most of what you'll learn here also applies to full L<Mojolicious>
applications.
=head2 Hello World
Expand Down

0 comments on commit ab00033

Please sign in to comment.