Rose::DB::Object::Tutorial

Rose::DB::Object::Tutorial is a guided tour of the basics of Rose::DB::Object.
Download

Rose::DB::Object::Tutorial Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • John C. Siracusa
  • Publisher web site:
  • http://search.cpan.org/~jsiracusa/

Rose::DB::Object::Tutorial Tags


Rose::DB::Object::Tutorial Description

Rose::DB::Object::Tutorial is a guided tour of the basics of Rose::DB::Object. Rose::DB::Object::Tutorial is a guided tour of the basics of Rose::DB::Object.INTRODUCTIONThis document provides a step-by-step introduction to the Rose::DB::Object module distribution. It demonstrates all of the important features using a semi-realistic example database. This tutorial does not replace the actual documentation for each module, however. The "reference" documentation found in each ".pm" file is still essential, and contains some good examples of its own.This tutorial provides a gradual introduction to Rose::DB::Object. It also describes "best practices" for using Rose::DB::Object in the most robust, maintainable manner. If you're just trying to get a feel for what's possible, you can skip to the end and take a look at the completed example database and associated Perl code. But I recommend reading the tutorial from start to finish at least once.The examples will start simple and get progressively more complex. You, the developer, have to decide which level of complexity or abstraction is appropriate for your particular task.CONVENTIONSSome of the examples in this tutorial will use the fictional My:: namespace prefix. Some will use no prefix at all. Your code should use whatever namespace you deem appropriate. Usually, it will be something like MyCorp::MyProject:: (i.e., your corporation, organization, and/or project). I've chosen to use My:: or to omit the prefix entirely simply because this produces shorter class names, which will help this tutorial stay within an 80-column width.For the sake of brevity, the use strict directive and associated "my" declarations have also been omitted from the example code. Needless to say, you should always use strict in your actual code.Similarly, the traditional "1;" true value used at the end of each ".pm" file has been omitted from the examples. Don't forget to add this to the end of your actual Perl module files.Although most of the examples in this tutorial use the base.pm module to set up inheritance, directly modifying the @ISA package variable usually works just as well. In situations where there are circular relationships between classes, the use base ... form may be preferable because it runs at compile-time, whereas @ISA modification happens at run-time. In either case, it's a good idea to set up inheritance as early as possible in each module. package Product; # Set up inheritance first use base qw(Rose::DB::Object); # Then do other stuff... ... Requirements: · Perl


Rose::DB::Object::Tutorial Related Software