/[cvs]/nfo/perl/libs/Data/Storage.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Oct 25 11:40:37 2002 UTC revision 1.4 by joko, Sun Oct 27 18:35:07 2002 UTC
# Line 1  Line 1 
1  #################################  # $Id$
2    #
3    # Copyright (c) 2002  Andreas Motl <andreas.motl@ilo.de>
4  #  #
5  #  $Id$  # See COPYRIGHT section in pod text below for usage and distribution rights.
6    #
7    #################################
8  #  #
9  #  $Log$  #  $Log$
10    #  Revision 1.4  2002/10/27 18:35:07  joko
11    #  + added pod
12    #
13  #  Revision 1.3  2002/10/25 11:40:37  joko  #  Revision 1.3  2002/10/25 11:40:37  joko
14  #  + enhanced robustness  #  + enhanced robustness
15  #  + more logging for debug-levels  #  + more logging for debug-levels
# Line 16  Line 23 
23  #  Revision 1.1  2002/10/10 03:43:12  cvsjoko  #  Revision 1.1  2002/10/10 03:43:12  cvsjoko
24  #  + new  #  + new
25  #  #
 #  
26  #################################  #################################
27    
28  # aim_V1: should encapsulate Tangram, DBI, DBD::CSV and LWP:: to access them in an unordinary way ;)  # aim_V1: should encapsulate Tangram, DBI, DBD::CSV and LWP:: to access them in an unordinary way ;)
29  # aim_V2: introduce a generic layered structure, refactor *SUBLAYER*-stuff, make (e.g.) this possible:  # aim_V2: introduce a generic layered structure, refactor *SUBLAYER*-stuff, make (e.g.) this possible:
30  #               - Perl Data::Storage[DBD::CSV]  ->  Perl LWP::  ->  Internet HTTP/FTP/*  ->  Host Daemon  ->  csv-file  #               - Perl Data::Storage[DBD::CSV]  ->  Perl LWP::  ->  Internet HTTP/FTP/*  ->  Host Daemon  ->  csv-file
31    
32    BEGIN {
33    $Data::Storage::VERSION = 0.01;
34    }
35    
36    =head1 NAME
37    
38    Data::Storage - Interface for accessing various Storage implementations for Perl in an independent way
39    
40    =head1 SYNOPSIS
41    
42      ... the basic way:
43    
44    
45      ... via inheritance:
46      
47        use Data::Storage;
48        my $proxyObj = new HttpProxy;
49        $proxyObj->{url} = $url;
50        $proxyObj->{payload} = $content;
51        $self->{storage}->insert($proxyObj);
52        
53        use Data::Storage;
54        my $proxyObj = HttpProxy->new(
55          url => $url,
56          payload => $content,
57        );
58        $self->{storage}->insert($proxyObj);
59    
60    
61    =head2 NOTE
62    
63    This module heavily relies on DBI and Tangram, but adds a lot of additional bugs and quirks.
64    Please look at their documentation and this code for additional information.
65    
66    
67    =cut
68    
69    # The POD text continues at the end of the file.
70    
71    
72  package Data::Storage;  package Data::Storage;
73    
74  use strict;  use strict;
# Line 262  sub isConnected { Line 308  sub isConnected {
308    return 1 if $self->{STORAGEHANDLE};    return 1 if $self->{STORAGEHANDLE};
309  }  }
310    
 1;  
311    1;
312    __END__
313    
314    
315    =head1 DESCRIPTION
316    
317    Data::Storage is module for a accessing various "data structures" stored inside
318    various "data containers". It sits on top of DBI and/or Tangram.
319    
320    
321    =head1 AUTHORS / COPYRIGHT
322    
323    The Data::Storage module is Copyright (c) 2002 Andreas Motl.
324    All rights reserved.
325    
326    You may distribute it under the terms of either the GNU General Public
327    License or the Artistic License, as specified in the Perl README file.
328    
329    
330    =head1 ACKNOWLEDGEMENTS
331    
332    Larry Wall and the C<perl5-porters> for Perl,
333    Tim Bunce for DBI, Jean-Louis Leroy for Tangram and Set::Object,
334    Sam Vilain for Class::Tangram.
335    
336    
337    =head1 SUPPORT / WARRANTY
338    
339    Data::Storage is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
340    
341    
342    =head1 TODO
343    
344    
345    =head2 Handle the following errors/cases:
346    
347    =head3 "DBI-Error [Tangram]: DBD::mysql::st execute failed: Unknown column 't1.requestdump' in 'field list'"
348    
349        ... occours when operating on object-attributes not introduced yet:
350        this should be detected and appended/replaced through:
351        "Schema-Error detected, maybe (just) an inconsistency.
352        Please check if your declaration in schema-module "a" matches structure in database "b" or try to run"
353        db_setup.pl --dbkey=import --action=deploy
354    
355    =head3 Compare schema (structure diff) with database ...
356    
357      ... when issuing "db_setup.pl --dbkey=import --action=deploy"
358      on a database with an already deployed schema, use an additional "--update" then
359      to lift the schema inside the database to the current declared schema.
360      You will have to approve removals and changes on field-level while
361      new objects and new fields are introduced silently without any interaction needed.
362      In future versions there may be additional options to control silent processing of
363      removals and changes.
364      See this CRUD-table applying to the actions occouring on Classes and Class variables when deploying schemas,
365      don't mix this up with CRUD-actions on Objects, these are already handled by (e.g.) Tangram itself.
366      Classes:
367        C create    ->  yes, handled automatically
368        R retrieve  ->  no, not subject of this aspect since it is about deployment only
369        U update    ->  yes, automatically for Class meta-attributes, yes/no for Class variables (look at the rules down here)
370        D delete    ->  yes, just by user-interaction
371      Class variables:
372        C create    ->  yes, handled automatically
373        R retrieve  ->  no, not subject of this aspect since it is about deployment only
374        U update    ->  yes, just by user-interaction; maybe automatically if it can be determined that data wouldn't be lost
375        D delete    ->  yes, just by user-interaction
376      It's all about not to be able to loose data simply while this is in alpha stage.
377    
378    
379    =head2 Introduce some features:
380    
381      Get this stuff together with UML (Unified Modeling Language) and/or standards from ODMG.
382      Make it possible to load/save schemas in XMI (XML Metadata Interchange),
383      which seems to be most commonly used today, perhaps handle objects with OIFML.
384      Integrate/bundle this with a web-/html-based UML modeling tool or
385      some other interesting stuff like the "Co-operative UML Editor" from Uni Darmstadt. (web-/java-based)
386      Enable Round Trip Engineering. Keep code and diagrams in sync. Don't annoy/bother the programmer.
387    
388    
389    =head3 Links:
390    
391        UML 1.3 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-06-08.pdf
392        XMI 1.1 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-10-02.pdf
393        XMI 2.0 Spec: http://cgi.omg.org/docs/ad/01-06-12.pdf
394        ODMG: http://odmg.org/
395        OIFML: http://odmg.org/library/readingroom/oifml.pdf
396        Co-operative UML Editor: http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html
397    
398      further readings:
399        http://www.google.com/search?q=web+based+uml+editor&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N
400        http://www.fernuni-hagen.de/DVT/Aktuelles/01FHHeidelberg.pdf
401        http://www.enhyper.com/src/documentation/
402        http://cis.cs.tu-berlin.de/Dokumente/Diplomarbeiten/2001/skinner.pdf
403        http://citeseer.nj.nec.com/vilain00diagrammatic.html
404        http://archive.devx.com/uml/articles/Smith01/Smith01-3.asp
405    
406      maybe useful for / to be integrated with:
407        ArapXML: http://xml.coverpages.org/ni2001-09-24-b.html

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed