From: Chris W. <la...@us...> - 2005-02-26 05:04:59
|
Update of /cvsroot/openinteract/OpenInteract2/doc/Manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17454 Modified Files: Tutorial.pod Log Message: mostly small fixes, but mainly get rid of the 'source_dir' discussion Index: Tutorial.pod =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/Tutorial.pod,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Tutorial.pod 30 Nov 2004 03:04:04 -0000 1.26 --- Tutorial.pod 26 Feb 2005 05:04:50 -0000 1.27 *************** *** 18,31 **** come back when you're done. - =head2 Install OI2 - - Not only must OI2 be installed, but you also need to either have - access to the distribution source B<or> your friendly local sysadmin - needs to create a source directory. This is as simple as: - - $ oi2_manage create_source_dir \ - --distribution_dir=/private/path/to/OpenInteract-2.00 \ - --source_dir=/public/path/to/oi_source - =head2 Create a website --- 18,21 ---- *************** *** 51,54 **** --- 41,61 ---- data about a book. + =head2 Looking for shortcuts? + + If you want to get something running in the fastest manner possible we + can generate a simple CRUDS application for you. (CRUDS: CReate Update + Delete Search) Just run something like the following: + + $ oi2_manage easy_app --package=book --table=book \ + --dsn=DBI:Pg:dbname=mylibrary --username=foo --password=bar + + This will create a simple application built off a table 'book' with + templates and objects for searching, creating, updating and removing + objects. (More at + L<OpenInteract2::Manage::Package::CreatePackageFromTable>.) + + Since this is a tutorial we'll assume you want to read to learn, so on + we go. + =head2 Generating the skeleton *************** *** 59,65 **** to the directory under which the package will be created: ! $ oi2_manage create_package \ ! --source_dir=/public/path/to/oi_source \ ! --package=book And here's what you'll see: --- 66,70 ---- to the directory under which the package will be created: ! $ oi2_manage create_package --package=book And here's what you'll see: *************** *** 138,144 **** We'll just make this very easy to start out with. Unlike the venerable intro database shipped with Sybase products, we're not defining ! separate tables for authors, publishers, book artists, etc. We'll just ! define a single table and make some assumptions. Here's the table that ! we'll save to C<book/struct/book.sql>: CREATE TABLE book ( --- 143,150 ---- We'll just make this very easy to start out with. Unlike the venerable intro database shipped with Sybase products, we're not defining ! separate tables for authors, publishers, book artists, etc. (See ! L<OpenInteract2::Manual::TutorialAdvanced> for some of that...) We'll ! just define a single table and make some assumptions. Here's the table ! that we'll save to C<book/struct/book.sql>: CREATE TABLE book ( *************** *** 670,691 **** 71: 72: 1; ! 73: ! 74: __END__ ! 75: ! 76: =head1 NAME ! 77: ! 78: OpenInteract2::Action::Book - Handler for this package ! 79: ! 80: =head1 SYNOPSIS ! 81: ! 82: =head1 DESCRIPTION ! 83: ! 84: =head1 BUGS ! 85: ! 86: =head1 TO DO ! 87: ! 88: =head1 SEE ALSO ! 89: ! 90: =head1 AUTHORS Excellent. We'll just leave the 'hello()' method as-is for right now, --- 676,680 ---- 71: 72: 1; ! 73: ... documentation below here... Excellent. We'll just leave the 'hello()' method as-is for right now, *************** *** 1281,1288 **** package. First edit the C<book/package.conf> file to reflect the new version number and add an entry to the top of the 'Changes' ! file. Next, export it and install the distribution to your website: ! $ oi2_manage export_package ! $ oi2_manage install_package --package_file=book-0.02.zip Restart the server and try to run an empty search again. There's the --- 1270,1277 ---- package. First edit the C<book/package.conf> file to reflect the new version number and add an entry to the top of the 'Changes' ! file. Next, export it and install the distribution to your website ! with a single command: ! $ oi2_manage package_all Restart the server and try to run an empty search again. There's the *************** *** 1433,1438 **** C<book/package.conf>.) ! $ oi2_manage export_package ! $ oi2_manage install_package --package_file=book-0.03.zip Restart the server and type in the '/book' URL again. Looks the same, --- 1422,1426 ---- C<book/package.conf>.) ! $ oi2_manage package_all Restart the server and type in the '/book' URL again. Looks the same, *************** *** 1501,1508 **** L<OpenInteract2::Action::CommonSearch|OpenInteract2::Action::CommonSearch> provides another parameter to the template, 'total_hits', which we can ! use to display how many entries we found. (Note that 'total_hits' is ! only provided when you're using paged results, but since that's the ! default and we didn't change the setting we can use the parameter. See ! the docs for more.) Finally, on line 25 we had to modify our 'FOREACH' loop into a 'WHILE' --- 1489,1493 ---- L<OpenInteract2::Action::CommonSearch|OpenInteract2::Action::CommonSearch> provides another parameter to the template, 'total_hits', which we can ! use to display how many entries we found. Finally, on line 25 we had to modify our 'FOREACH' loop into a 'WHILE' *************** *** 1669,1674 **** reflect the updates, bundle the package up and install it: ! $ oi2_manage export_package ! $ oi2_manage install_package --package_file=book-0.05.zip Restart your server and run a search, then click on a title. There's --- 1654,1658 ---- reflect the updates, bundle the package up and install it: ! $ oi2_manage package_all Restart your server and run a search, then click on a title. There's *************** *** 1839,1844 **** reflect the updates, bundle the package up and install it: ! $ oi2_manage export_package ! $ oi2_manage install_package --package_file=book-0.06.zip Restart your server, run a search, and drill down to an object. You --- 1823,1827 ---- reflect the updates, bundle the package up and install it: ! $ oi2_manage package_all Restart your server, run a search, and drill down to an object. You *************** *** 1931,1936 **** then put your new package in the website: ! $ oi2_manage export_package ! $ oi2_manage install_package --package_file=book-0.07.zip Now try to add a new object then do a search, display and edit on it. --- 1914,1918 ---- then put your new package in the website: ! $ oi2_manage package_all Now try to add a new object then do a search, display and edit on it. *************** *** 1984,1988 **** $ oi2_manage export_package - $ oi2_manage install_package --package_file=book-0.08.zip See how it works! --- 1966,1969 ---- |