Cleaned up Tut files; no substantive changes
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Manual / Tutorial.pod
1 =head1 NAME
2
3 Catalyst::Manual::Tutorial - Catalyst Tutorial: Overview
4
5
6
7 =head1 DESCRIPTION
8
9 The Catalyst framework is a flexible and comprehensive environment for
10 quickly building high-functionality web applications.  This tutorial is
11 design to provide a rapid introduction to its basics and most commonly
12 used features while focusing on real-world best practices.
13
14 The tutorial is broken down into the following sections:
15
16 =over 4
17
18 =item *
19
20 L<Introduction|Catalyst::Manual::Tutorial_Intro>
21
22 =item * 
23
24 L<Catalyst Basics|Catalyst::Manual::Tutorial_CatalystBasics>
25
26 =item * 
27
28 L<CRUD|Catalyst::Manual::Tutorial_BasicCRUD>
29
30 =item * 
31
32 L<Authentication|Catalyst::Manual::Tutorial_Authentication>
33
34 =item * 
35
36 L<Authorization|Catalyst::Manual::Tutorial_Authorization>
37
38 =item * 
39
40 L<Debugging|Catalyst::Manual::Tutorial_Debugging>
41
42 =item * 
43
44 L<Testing|Catalyst::Manual::Tutorial_Testing>
45
46 =item * 
47
48 L<CRUD|Catalyst::Manual::Tutorial_AdvancedCRUD>
49
50 =item * 
51
52 L<Appendicies|Catalyst::Manual::Tutorial_Appendicies>
53
54 =back
55
56
57 Full source code is available for each section via the main Catalyst
58 Subversion repository at
59 L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/>.  See the
60 end of each section for the specifics on retrieving code for that
61 section.
62
63 A tarball of the final application is available at
64 C<to_be_compled_in_final_version>.
65
66 =head1 Detailed Table Of Contents
67
68 =head2 Part 1: Introduction
69
70 =over 4
71
72 =item *
73
74 VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL
75
76 =item *
77
78 CATALYST INSTALLATION
79
80 =item *
81
82 DATABASES
83
84 =item *
85
86 WHERE TO GET WORKING CODE
87
88 =back
89
90
91 =head2 Part 2: Catalyst Application Development Basics
92
93 =over 4
94
95 =item *
96
97 CREATE A CATALYST PROJECT
98
99 =item *
100
101 CREATE A SQLITE DATABASE
102
103 =item *
104
105 EDIT THE LIST OF CATALYST PLUGINS
106
107 =item *
108
109 DATABASE ACCESS WITH DBIx::Class
110
111 =over 4
112
113 =item *
114
115 Create a DBIC Schema File
116
117 =item *
118
119 Create the DBIC ``Result Source'' Files
120
121 =item *
122
123 Use Catalyst::Model::DBIC::Schema To Load The Model Class
124
125 =back
126
127 =item *
128
129 CREATE A CATALYST CONTROLLER
130
131 =item *
132
133 CATALYST VIEWS
134
135 =over 4
136
137 =item *
138
139 Create a Catalyst View Using TTSITE
140
141 =item *
142
143 Globally Customize Every View
144
145 =item *
146
147 Create a TT Template Page
148
149 =back
150
151 =item *
152
153 RUN THE APPLICATION
154
155 =back
156
157
158 =head2 Part 3: Basic CRUD
159
160 =over 4
161
162 =item *
163
164 FORMLESS SUBMISSION
165
166 =over 4
167
168 =item *
169
170 Include a Create Action in the Books Controller
171
172 =item *
173
174 Include a Template for the url_create Action:
175
176 =item *
177
178 Try the url_create Feature
179
180 =back
181
182 =item *
183
184 MANUALLY BUILDING A CREATE FORM
185
186 =over 4
187
188 =item *
189
190 Add Method to Display The Form
191
192 =item *
193
194 Add a Template for the Form
195
196 =item *
197
198 Add Method to Process Form Values and Update Database
199
200 =item *
201
202 Test Out The Form
203
204 =back
205
206 =item *
207
208 A SIMPLE DELETE FEATURE
209
210 =over 4
211
212 =item *
213
214 Include a Delete Link in the List
215
216 =item *
217
218 Add a Delete Action to the Controller
219
220 =item *
221
222 Try the Delete Feature
223
224 =back
225
226 =back
227
228
229 =head2 Part 4: Authentication
230
231 =over 4
232
233 =item *
234
235 BASIC AUTHENTICATION
236
237 =over 4
238
239 =item *
240
241 Add Users and Roles to the Database
242
243 =item *
244
245 Add User and Role Information to DBIC Schema
246
247 =item *
248
249 Create New ``Result Source Objects''
250
251 =item *
252
253 Sanity-Check Reload of Development Server
254
255 =item *
256
257 Include Authentication and Session Plugins
258
259 =item *
260
261 Configure Authentication
262
263 =item *
264
265 Add Login and Logout Controllers
266
267 =item *
268
269 Add a Login Form TT Template Page
270
271 =item *
272
273 Add Valid User Check
274
275 =item *
276
277 Displaying Content Only to Authenticated Users
278
279 =item *
280
281 Try Out Authentication
282
283 =back
284
285 =item *
286
287 USING PASSWORD HASHES
288
289 =over 4
290
291 =item *
292
293 Get a SHA-1 Hash for the Password
294
295 =item *
296
297 Switch to SHA-1 Password Hashes in the Database
298
299 =item *
300
301 Enable SHA-1 Hash Passwords in Catalyst::Plugin::Authentication::Store::DBIC
302
303 =item *
304
305 Try Out the Hashed Passwords
306
307 =back
308
309 =back
310
311
312 =head2 Part 5: Authorization
313
314 =over 4
315
316 =item *
317
318 BASIC AUTHORIZATION
319
320 =over 4
321
322 =item *
323
324 Update Plugins to Include Support  for Authorization
325
326 =item *
327
328 Add Config Information for Authorization
329
330 =item *
331
332 Add Role-Specific Logic to the ``Book List'' Template
333
334 =item *
335
336 Limit Books::add to admin Users
337
338 =item *
339
340 Try Out Authentication And Authorization
341
342 =back
343
344 =item *
345
346 ENABLE ACL-BASED AUTHORIZATION
347
348 =over 4
349
350 =item *
351
352 Add the Catalyst::Plugin::Authorization::ACL Plugin
353
354 =item *
355
356 Add ACL Rules to the Application Class
357
358 =item *
359
360 Add a Method to Handle Access Violations
361
362 =back
363
364 =back
365
366
367 =head2 Part 6: Debugging
368
369 =over 4
370
371 =item *
372
373 LOG STATEMENTS
374
375 =item *
376
377 RUNNING CATALYST UNDER THE PERL DEBUGGER
378
379 =back
380
381
382 =head2 Part 7: Testing
383
384 =over 4
385
386 =item *
387
388 RUNNING THE "CANNED" CATALYST TESTS
389
390 =item *
391
392 RUNNING A SINGLE TEST
393
394 =item *
395
396 ADDING YOUR OWN TEST SCRIPT
397
398 =item *
399
400 SUPPORTING BOTH PRODUCTION AND TEST DATABASES
401
402 =back
403
404
405 =head2 Part 8: Advanced CRUD
406
407 =over 4
408
409 =item *
410
411 HTML::WIDGET FORM CREATION
412
413 =over 4
414
415 =item *
416
417 Add the HTML::Widget Plugin
418
419 =item *
420
421 Add a Form Creation Helper Method
422
423 =item *
424
425 Add Actions to Display and Save the Form
426
427 =item *
428
429 Update the CSS
430
431 =item *
432
433 Create a Template Page To Display The Form
434
435 =item *
436
437 Add Links for Create and Update via HTML::Widget
438
439 =item *
440
441 Test The <HTML::Widget> Create Form
442
443 =back
444
445 =item *
446
447 HTML::WIDGET VALIDATION AND FILTERING
448
449 =over 4
450
451 =item *
452
453 Add Constraints and Filters to the Widget Creation Method
454
455 =item *
456
457 Rebuild the Form Submission Method to Include Validation
458
459 =item *
460
461 Try Out the Form
462
463 =back
464
465 =item *
466
467 Enable DBIx::Class::HTMLWidget Support
468
469 =over 4
470
471 =item *
472
473 Add DBIx::Class::HTMLWidget to DBIC Model
474
475 =item *
476
477 Use populate_from_widget in hw_create_do
478
479 =back
480
481 =back
482
483
484 =head2 Part 9: Appendices
485
486 =over 4
487
488 =item *
489
490 APPENDIX 1: CUT AND PASTE FOR POD-BASED EXAMPLES
491
492 =over 4
493
494 =item *
495
496 "Un-indenting" with Vi/Vim
497
498 =item *
499
500 "Un-indenting" with Emacs
501
502 =back
503
504 =item *
505
506 APPENDIX 2: USING MYSQL AND POSTGRESQL
507
508 =over 4
509
510 =item *
511
512 MySQL
513
514 =item *
515
516 PostgreSQL
517
518 =back
519
520 =back
521