--- nfo/perl/libs/Data/Storage.pm 2002/10/25 11:40:37 1.3 +++ nfo/perl/libs/Data/Storage.pm 2002/10/27 18:35:07 1.4 @@ -1,8 +1,15 @@ -################################# +# $Id: Storage.pm,v 1.4 2002/10/27 18:35:07 joko Exp $ +# +# Copyright (c) 2002 Andreas Motl # -# $Id: Storage.pm,v 1.3 2002/10/25 11:40:37 joko Exp $ +# See COPYRIGHT section in pod text below for usage and distribution rights. +# +################################# # # $Log: Storage.pm,v $ +# Revision 1.4 2002/10/27 18:35:07 joko +# + added pod +# # Revision 1.3 2002/10/25 11:40:37 joko # + enhanced robustness # + more logging for debug-levels @@ -16,13 +23,52 @@ # Revision 1.1 2002/10/10 03:43:12 cvsjoko # + new # -# ################################# # aim_V1: should encapsulate Tangram, DBI, DBD::CSV and LWP:: to access them in an unordinary way ;) # aim_V2: introduce a generic layered structure, refactor *SUBLAYER*-stuff, make (e.g.) this possible: # - Perl Data::Storage[DBD::CSV] -> Perl LWP:: -> Internet HTTP/FTP/* -> Host Daemon -> csv-file +BEGIN { +$Data::Storage::VERSION = 0.01; +} + +=head1 NAME + +Data::Storage - Interface for accessing various Storage implementations for Perl in an independent way + +=head1 SYNOPSIS + + ... the basic way: + + + ... via inheritance: + + use Data::Storage; + my $proxyObj = new HttpProxy; + $proxyObj->{url} = $url; + $proxyObj->{payload} = $content; + $self->{storage}->insert($proxyObj); + + use Data::Storage; + my $proxyObj = HttpProxy->new( + url => $url, + payload => $content, + ); + $self->{storage}->insert($proxyObj); + + +=head2 NOTE + +This module heavily relies on DBI and Tangram, but adds a lot of additional bugs and quirks. +Please look at their documentation and this code for additional information. + + +=cut + +# The POD text continues at the end of the file. + + package Data::Storage; use strict; @@ -262,4 +308,100 @@ return 1 if $self->{STORAGEHANDLE}; } -1; \ No newline at end of file +1; +__END__ + + +=head1 DESCRIPTION + +Data::Storage is module for a accessing various "data structures" stored inside +various "data containers". It sits on top of DBI and/or Tangram. + + +=head1 AUTHORS / COPYRIGHT + +The Data::Storage module is Copyright (c) 2002 Andreas Motl. +All rights reserved. + +You may distribute it under the terms of either the GNU General Public +License or the Artistic License, as specified in the Perl README file. + + +=head1 ACKNOWLEDGEMENTS + +Larry Wall and the C for Perl, +Tim Bunce for DBI, Jean-Louis Leroy for Tangram and Set::Object, +Sam Vilain for Class::Tangram. + + +=head1 SUPPORT / WARRANTY + +Data::Storage is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. + + +=head1 TODO + + +=head2 Handle the following errors/cases: + +=head3 "DBI-Error [Tangram]: DBD::mysql::st execute failed: Unknown column 't1.requestdump' in 'field list'" + + ... occours when operating on object-attributes not introduced yet: + this should be detected and appended/replaced through: + "Schema-Error detected, maybe (just) an inconsistency. + Please check if your declaration in schema-module "a" matches structure in database "b" or try to run" + db_setup.pl --dbkey=import --action=deploy + +=head3 Compare schema (structure diff) with database ... + + ... when issuing "db_setup.pl --dbkey=import --action=deploy" + on a database with an already deployed schema, use an additional "--update" then + to lift the schema inside the database to the current declared schema. + You will have to approve removals and changes on field-level while + new objects and new fields are introduced silently without any interaction needed. + In future versions there may be additional options to control silent processing of + removals and changes. + See this CRUD-table applying to the actions occouring on Classes and Class variables when deploying schemas, + don't mix this up with CRUD-actions on Objects, these are already handled by (e.g.) Tangram itself. + Classes: + C create -> yes, handled automatically + R retrieve -> no, not subject of this aspect since it is about deployment only + U update -> yes, automatically for Class meta-attributes, yes/no for Class variables (look at the rules down here) + D delete -> yes, just by user-interaction + Class variables: + C create -> yes, handled automatically + R retrieve -> no, not subject of this aspect since it is about deployment only + U update -> yes, just by user-interaction; maybe automatically if it can be determined that data wouldn't be lost + D delete -> yes, just by user-interaction + It's all about not to be able to loose data simply while this is in alpha stage. + + +=head2 Introduce some features: + + Get this stuff together with UML (Unified Modeling Language) and/or standards from ODMG. + Make it possible to load/save schemas in XMI (XML Metadata Interchange), + which seems to be most commonly used today, perhaps handle objects with OIFML. + Integrate/bundle this with a web-/html-based UML modeling tool or + some other interesting stuff like the "Co-operative UML Editor" from Uni Darmstadt. (web-/java-based) + Enable Round Trip Engineering. Keep code and diagrams in sync. Don't annoy/bother the programmer. + + +=head3 Links: + + UML 1.3 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-06-08.pdf + XMI 1.1 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-10-02.pdf + XMI 2.0 Spec: http://cgi.omg.org/docs/ad/01-06-12.pdf + ODMG: http://odmg.org/ + OIFML: http://odmg.org/library/readingroom/oifml.pdf + Co-operative UML Editor: http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html + + further readings: + http://www.google.com/search?q=web+based+uml+editor&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N + http://www.fernuni-hagen.de/DVT/Aktuelles/01FHHeidelberg.pdf + http://www.enhyper.com/src/documentation/ + http://cis.cs.tu-berlin.de/Dokumente/Diplomarbeiten/2001/skinner.pdf + http://citeseer.nj.nec.com/vilain00diagrammatic.html + http://archive.devx.com/uml/articles/Smith01/Smith01-3.asp + + maybe useful for / to be integrated with: + ArapXML: http://xml.coverpages.org/ni2001-09-24-b.html