Change from the use of "part" to refer to each .pod file for the tutorial in favor...
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial.pod
CommitLineData
5e602627 1=head1 NAME
2
3Catalyst::Manual::Tutorial - Catalyst Tutorial: Overview
4
5=head1 DESCRIPTION
6
7The Catalyst framework is a flexible and comprehensive environment for
8quickly building high-functionality web applications. This tutorial is
9designed to provide a rapid introduction to its basics and its most
10commonly used features while focusing on real-world best practices.
11
12The tutorial is divided into the following sections:
13
1435672d 14B<NOTE: CLICK THESE LINKS TO JUMP TO CHAPTERS> (the index links above
5e602627 15only navigate inside this page).
16
17=over 4
18
3533daff 19=item 1
5e602627 20
21L<Introduction|Catalyst::Manual::Tutorial::Intro>
22
3533daff 23=item 2
5e602627 24
25L<Catalyst Basics|Catalyst::Manual::Tutorial::CatalystBasics>
26
3533daff 27=item 3
28
29L<More Catalyst Basics|Catalyst::Manual::Tutorial::MoreCatalystBasics>
30
31=item 4
5e602627 32
33L<Basic CRUD|Catalyst::Manual::Tutorial::BasicCRUD>
34
3533daff 35=item 5
5e602627 36
37L<Authentication|Catalyst::Manual::Tutorial::Authentication>
38
3533daff 39=item 6
5e602627 40
41L<Authorization|Catalyst::Manual::Tutorial::Authorization>
42
3533daff 43=item 7
5e602627 44
45L<Debugging|Catalyst::Manual::Tutorial::Debugging>
46
3533daff 47=item 8
5e602627 48
49L<Testing|Catalyst::Manual::Tutorial::Testing>
50
3533daff 51=item 9
5e602627 52
53L<Advanced CRUD|Catalyst::Manual::Tutorial::AdvancedCRUD>
54
3533daff 55=item 10
5e602627 56
57L<Appendices|Catalyst::Manual::Tutorial::Appendices>
58
59=back
60
4b4d3884 61Final code tarballs for each chapter of the tutorial are available at
028b4e1a 62L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/>.
5e602627 63
64
65=head1 Detailed Table of Contents
66
3533daff 67
4b4d3884 68=head2 L<Chapter 1: Intro|Catalyst::Manual::Tutorial::Intro>
69
70Note: Click on the heading in the previous line to jump to the actual
71chapter. Below is a "table of contents" for this chapter.
5e602627 72
73=over 4
74
75=item *
76
77VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL
78
79=item *
80
81CATALYST INSTALLATION
82
83=item *
84
85DATABASES
86
87=item *
88
89WHERE TO GET WORKING CODE
90
91=back
92
93
4b4d3884 94=head2 L<Chapter 2: Catalyst Basics|Catalyst::Manual::Tutorial::CatalystBasics>
95
96Note: Click on the heading in the previous line to jump to the actual
97chapter. Below is a "table of contents" for this chapter.
5e602627 98
99=over 4
100
101=item *
102
103CREATE A CATALYST PROJECT
104
105=item *
106
3533daff 107HELLO WORLD
108
109=over 4
5e602627 110
111=item *
112
3533daff 113The Simplest Way
5e602627 114
115=item *
116
3533daff 117Hello, World! Using a View and a Template
5e602627 118
3533daff 119=back
5e602627 120
121=item *
122
3533daff 123CREATE A SIMPLE CONTROLLER AND AN ACTION
124
125=back
5e602627 126
5e602627 127
4b4d3884 128=head2 L<Chapter 3: More Catalyst Basics|Catalyst::Manual::Tutorial::MoreCatalystBasics>
3533daff 129
4b4d3884 130Note: Click on the heading in the previous line to jump to the actual
131chapter. Below is a "table of contents" for this chapter.
3533daff 132
133=over 4
5e602627 134
135=item *
136
3533daff 137CREATE A NEW APPLICATION
5e602627 138
3533daff 139=item *
5e602627 140
3533daff 141EDIT THE LIST OF CATALYST PLUGINS
5e602627 142
143=item *
144
145CREATE A CATALYST CONTROLLER
146
147=item *
148
149CATALYST VIEWS
150
151
152=over 4
153
154=item *
155
156Create a Catalyst View Using TTSite
157
158=item *
159
3533daff 160Globally Customize Every View
5e602627 161
162=item *
163
3533daff 164Create a TT Template Page
165
166=back
5e602627 167
168=item *
169
3533daff 170CREATE A SQLITE DATABASE
171
172=item *
173
174DATABASE ACCESS WITH DBIx::Class
175
176=over 4
177
178=item *
179
180Create a Dynamic DBIC Model
5e602627 181
182=back
183
3533daff 184=item *
185
186RUN THE APPLICATION
187
188=item *
189
190A STATIC DATABASE MODEL WITH DBIx::Class
191
192=over 4
193
194=item *
195
196Create Static DBIC Schema Files
197
198=item *
199
200Updating the Generated DBIC Schema Files
201
202=back
5e602627 203
204=item *
205
206RUN THE APPLICATION
207
208=item *
209
3533daff 210RUNNING THE APPLICATION FROM THE COMMAND LINE
211
212=item *
213
214UPDATING THE VIEW
215
216=over 4
217
218=item *
219
220Using RenderView for the Default View
221
222=item *
223
224Using The Default Template Name
225
226=item *
227
228Return To A Manually-Specified Template
229
230=back
5e602627 231
232=back
233
3533daff 234
4b4d3884 235=head2 L<Chapter 4: Basic CRUD|Catalyst::Manual::Tutorial::BasicCRUD>
236
237Note: Click on the heading in the previous line to jump to the actual
238chapter. Below is a "table of contents" for this chapter.
5e602627 239
240=over 4
241
242=item *
243
244FORMLESS SUBMISSION
245
246=over 4
247
248=item *
249
250Include a Create Action in the Books Controller
251
252=item *
253
254Include a Template for the url_create Action:
255
256=item *
257
258Try the url_create Feature
259
260=back
261
262=item *
263
264MANUALLY BUILDING A CREATE FORM
265
266=over 4
267
268=item *
269
270Add a Method to Display the Form
271
272=item *
273
274Add a Template for the Form
275
276=item *
277
278Add Method to Process Form Values and Update Database
279
280=item *
281
282Test Out the Form
283
284=back
285
286=item *
287
288A SIMPLE DELETE FEATURE
289
290=over 4
291
292=item *
293
294Include a Delete Link in the List
295
296=item *
297
298Add a Delete Action to the Controller
299
300=item *
301
302Try the Delete Feature
303
3533daff 304=item *
305
306Fixing a Dangerous URL
307
308=item *
309
310Try the Delete and Redirect Logic
311
312=item *
313
314Using uri_for to Pass Query Parameters
315
316=item *
317
318Try the Delete and Redirect With Query Param Logic
319
5e602627 320=back
321
322=back
323
3533daff 324
4b4d3884 325=head2 L<Chapter 5: Authentication|Catalyst::Manual::Tutorial::Authentication>
326
327Note: Click on the heading in the previous line to jump to the actual
328chapter. Below is a "table of contents" for this chapter.
5e602627 329
330=over 4
331
332=item *
333
334BASIC AUTHENTICATION
335
336=over 4
337
338=item *
339
340Add Users and Roles to the Database
341
342=item *
343
344Add User and Role Information to DBIC Schema
345
346=item *
347
5e602627 348Sanity-Check Reload of Development Server
349
350=item *
351
352Include Authentication and Session Plugins
353
354=item *
355
356Configure Authentication
357
358=item *
359
360Add Login and Logout Controllers
361
362=item *
363
364Add a Login Form TT Template Page
365
366=item *
367
368Add Valid User Check
369
370=item *
371
372Displaying Content Only to Authenticated Users
373
374=item *
375
376Try Out Authentication
377
378=back
379
380=item *
381
382USING PASSWORD HASHES
383
384=over 4
385
386=item *
387
388Get a SHA-1 Hash for the Password
389
390=item *
391
392Switch to SHA-1 Password Hashes in the Database
393
394=item *
395
396Enable SHA-1 Hash Passwords in Catalyst::Plugin::Authentication::Store::DBIC
397
398=item *
399
400Try Out the Hashed Passwords
401
402=back
403
3533daff 404=item *
405
406USING THE SESSION FOR FLASH
407
408=over 4
409
410=item *
411
412Try Out Flash
413
414=item *
415
416Switch To Flash-To-Stash
417
5e602627 418=back
419
3533daff 420=back
421
422
4b4d3884 423=head2 L<Chapter 6: Authorization|Catalyst::Manual::Tutorial::Authorization>
424
425Note: Click on the heading in the previous line to jump to the actual
426chapter. Below is a "table of contents" for this chapter.
5e602627 427
428=over 4
429
430=item *
431
432BASIC AUTHORIZATION
433
434=over 4
435
436=item *
437
438Update Plugins to Include Support for Authorization
439
440=item *
441
442Add Config Information for Authorization
443
444=item *
445
446Add Role-Specific Logic to the ``Book List'' Template
447
448=item *
449
450Limit Books::add to admin Users
451
452=item *
453
454Try Out Authentication And Authorization
455
456=back
457
458=item *
459
460ENABLE ACL-BASED AUTHORIZATION
461
462=over 4
463
464=item *
465
466Add the Catalyst::Plugin::Authorization::ACL Plugin
467
468=item *
469
470Add ACL Rules to the Application Class
471
472=item *
473
474Add a Method to Handle Access Violations
475
476=back
477
478=back
479
3533daff 480
4b4d3884 481=head2 L<Chapter 7: Debugging|Catalyst::Manual::Tutorial::Debugging>
482
483Note: Click on the heading in the previous line to jump to the actual
484chapter. Below is a "table of contents" for this chapter.
5e602627 485
486=over 4
487
488=item *
489
490LOG STATEMENTS
491
492=item *
493
494RUNNING CATALYST UNDER THE PERL DEBUGGER
495
496=item *
497
498DEBUGGING MODULES FROM CPAN
499
500=back
501
3533daff 502
4b4d3884 503=head2 L<Chapter 8: Testing|Catalyst::Manual::Tutorial::Testing>
504
505Note: Click on the heading in the previous line to jump to the actual
506chapter. Below is a "table of contents" for this chapter.
5e602627 507
508=over 4
509
510=item *
511
512RUNNING THE "CANNED" CATALYST TESTS
513
514=item *
515
516RUNNING A SINGLE TEST
517
518=item *
519
520ADDING YOUR OWN TEST SCRIPT
521
522=item *
523
524SUPPORTING BOTH PRODUCTION AND TEST DATABASES
525
526=back
527
5e602627 528
4b4d3884 529=head2 L<Chapter 9: Advanced CRUD|Catalyst::Manual::Tutorial::AdvancedCRUD>
530
531Note: Click on the heading in the previous line to jump to the actual
532chapter. Below is a "table of contents" for this chapter.
5e602627 533
534=over 4
535
536=item *
537
3533daff 538ADVANCED CRUD OPTIONS
5e602627 539
540=back
541
5e602627 542
4b4d3884 543=head2 L<Chapter 10: Appendices|Catalyst::Manual::Tutorial::Appendices>
544
545Note: Click on the heading in the previous line to jump to the actual
546chapter. Below is a "table of contents" for this chapter.
5e602627 547
548=over 4
549
550=item *
551
552APPENDIX 1: CUT AND PASTE FOR POD-BASED EXAMPLES
553
554=over 4
555
556=item *
557
558"Un-indenting" with Vi/Vim
559
560=item *
561
562"Un-indenting" with Emacs
563
564=back
565
566=item *
567
568APPENDIX 2: USING MYSQL AND POSTGRESQL
569
570=over 4
571
572=item *
573
574MySQL
575
576=item *
577
578PostgreSQL
579
580=back
581
582=item *
583
584APPENDIX 3: IMPROVED HASHING SCRIPT
585
586=back
587
588
589=head1 THANKS
590
591This tutorial would not have been possible without the input of many
592different people in the Catalyst community. In particular, the
593primary author would like to thank:
594
595=over 4
596
597=item *
598
599Sebastian Riedel for founding the Catalyst project.
600
601=item *
602
603The members of the Catalyst Core Team for their tireless efforts to
604advance the Catalyst project. Although all of the Core Team members
605have played a key role in this tutorial, it would have never been
606possible without the critical contributions of: Matt Trout, for his
607unfathomable knowledge of all things Perl and Catalyst (and his
608willingness to answer lots of my questions); Jesse Sheidlower, for his
609incredible skill with the written word and dedication to improving the
610Catalyst documentation; and Yuval Kogman, for his work on the Catalyst
611"Auth & Authz" plugins (the original focus of the tutorial) and other
612key Catalyst modules.
613
614=item *
615
616Other Catalyst documentation folks like Kieren Diment, Gavin Henry,
617and Jess Robinson (including their work on the original Catalyst
3533daff 618tutorial).
619
620=item *
621
474c24ba 622Kieren Diment for his oversite of Catalyst-related documentation.
5e602627 623
624=item *
625
626Everyone on #catalyst and #catalyst-dev.
627
628=item *
629
3533daff 630Louis Moore (who thanks Marcello Romani and Tom Lanyon) for the
631PostgreSQL content in the Appendix.
632
633=item *
634
5e602627 635People who have emailed me with corrections and suggestions on the
1435672d 636tutorial. As of the most recent release, this include: Florian
637Ragwitz, Mauro Andreolini, Jim Howard, Giovanni Gigante, William
638Moreno, Bryan Roach, Ashley Berlin, David Kamholz, Kevin Old, Henning
639Sprang, Jeremy Jones, David Kurtz, Ingo Wichmann, Shlomi Fish, Murray
640Walker. Also, thanks to Devin Austin for coming up with an initial
641version of a non-TTSite wrapper page. I'm sure I am missing some
642names here... apologies for that (please let me know if you name
643should be here).
5e602627 644
645=back
646
647=head1 AUTHOR
648
649Kennedy Clark, C<hkclark@gmail.com>
650
651Please report any errors, issues or suggestions to the author. The
652most recent version of the Catalyst Tutorial can be found at
51e85db7 653L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/>.
5e602627 654
45c7830f 655Copyright 2006-2008, Kennedy Clark, under Creative Commons License
5e602627 656(L<http://creativecommons.org/licenses/by-nc-sa/2.5/>).