Bigtop

 view release on metacpan or  search on metacpan

lib/Bigtop/Docs/TentTut.pod  view on Meta::CPAN


Ask your browser for a full page refresh (hold shift and press the refresh
button.  Then, click on the 'App Body' tab.  Then click on edit
for the C<address> table.  Go back to the Field Quick Edit box and begin
checking the optional box for all the fields which should be optional.
Or, as a better alternative in this case, click the optional box in title
row of the quick edit table.  This will make all the fields optional.
Then, uncheck the required fields.  In our case, that should only be
'name.'

The other changes are reminscent of the field name changes and additions
we did earlier.  To make them, edit the new bday table.  Then change
the names of the ident and description fields to 'name' and 'bdate.'
Make sure that bdate's SQL type is date.

=head2 Regeneration

Now press 'Save As:' (the name should already be correct).
Then, at a command line in the build directory (the one with
Build.PL) type:

    bigtop docs/contact.bigtop all

Now we have a bit of work to do on the actual database.  We have two choices:
(1) destroy the original database or (2) alter the original database
to match the new model.  In this case, I'll opt for number 1 since we
haven't put any real data into the database yet.  This is convenient, since
Bigtop does not help with table alterations and my version of SQLite doesn't
support them.

These are the steps for sqlite:

    rm contact
    sqlite contact < docs/schema.sqlite

For PostgreSQL or MySQL it takes a bit more work:

    remove the old contact database
    create a new contact database
    use the database command line tool to populate the database

Once the database is ready, you can restart the server:

    ./app.server

Go to the address page and click on 'Add' and see that most fields are
now optional.  Then go to the bday page and 'Add' a birthday.  Note the
pull down list of families we could associate with this birthday person.
Also note the 'Date Select' link which pops up a calendar for easy date
picking.

You can continue to develop and regenerate as the model changes.  The
only piece that is difficult to manage is the database once it is built.

=head1 Further Reading

See C<Bigtop::Docs::TentRef> for more details on what tentmaker can control.
For more command line options, including firing up tentmaker to build an
app based on an existing PostgreSQL 8 database, see
C<Bigtop::ScriptHelp::Style::Pg8Live>.
Try C<Bigtop::Docs::Cookbook> for small problems and answers,
C<Bigtop::Docs::Tutorial> for a more complete example, with discussion,
C<Bigtop::Docs::AutoKeywords> for details on all bigtop keywords
and C<Bigtop::Docs::Sytnax> for an explanation of bigtop file structure.
If you need to write your own backends, see C<Bigtop::Docs::Modules>.

All of the doc modules are described briefly in C<Bigtop::Docs::TOC>.

=head1 Author

Phil Crow

=cut



( run in 0.837 second using v1.01-cache-2.11-cpan-5837b0d9d2c )