/[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.4 by joko, Sun Oct 27 18:35:07 2002 UTC revision 1.6 by joko, Sat Nov 9 01:04:58 2002 UTC
# Line 7  Line 7 
7  #################################  #################################
8  #  #
9  #  $Log$  #  $Log$
10    #  Revision 1.6  2002/11/09 01:04:58  joko
11    #  + updated pod
12    #
13    #  Revision 1.5  2002/10/29 19:24:18  joko
14    #  - reduced logging
15    #  + added some pod
16    #
17  #  Revision 1.4  2002/10/27 18:35:07  joko  #  Revision 1.4  2002/10/27 18:35:07  joko
18  #  + added pod  #  + added pod
19  #  #
# Line 33  BEGIN { Line 40  BEGIN {
40  $Data::Storage::VERSION = 0.01;  $Data::Storage::VERSION = 0.01;
41  }  }
42    
43    
44  =head1 NAME  =head1 NAME
45    
46  Data::Storage - Interface for accessing various Storage implementations for Perl in an independent way  Data::Storage - Interface for accessing various Storage implementations for Perl in an independent way
# Line 61  Data::Storage - Interface for accessing Line 69  Data::Storage - Interface for accessing
69  =head2 NOTE  =head2 NOTE
70    
71  This module heavily relies on DBI and Tangram, but adds a lot of additional bugs and quirks.  This module heavily relies on DBI and Tangram, but adds a lot of additional bugs and quirks.
72  Please look at their documentation and this code for additional information.  Please look at their documentation and/or this code for additional information.
73    
74    
75    =head1 REQUIREMENTS
76    
77    For full functionality:
78      DBI              from CPAN
79      Tangram          from CPAN
80      Class::Tangram   from CPAN
81      MySQL::Diff      from http://adamspiers.org/computing/mysqldiff/
82      ... and all their dependencies
83    
84  =cut  =cut
85    
# Line 76  use warnings; Line 93  use warnings;
93    
94  use Data::Storage::Locator;  use Data::Storage::Locator;
95    
96    # TODO: actually implement level (integrate with Log::Dispatch)
97    my $TRACELEVEL = 0;
98    
99  # get logger instance  # get logger instance
100  my $logger = Log::Dispatch::Config->instance;  my $logger = Log::Dispatch::Config->instance;
101    
# Line 111  sub AUTOLOAD { Line 131  sub AUTOLOAD {
131    my $method = $AUTOLOAD;    my $method = $AUTOLOAD;
132    $method =~ s/^.*:://;    $method =~ s/^.*:://;
133    
134    # advanced logging of AUTOLOAD calls    # advanced logging of AUTOLOAD calls ...
135      my $logstring = "";    # ... nice but do it only when TRACING (TODO) is enabled
136      $logstring .= __PACKAGE__ . "[$self->{locator}->{type}]" . "->" . $method;      if ($TRACELEVEL) {
137      #print "count: ", $#_, "\n";        my $logstring = "";
138      #$logstring .= Dumper(@_) if ($#_ != -1);        $logstring .= __PACKAGE__ . "[$self->{locator}->{type}]" . "->" . $method;
139      my $tabcount = int( (80 - length($logstring)) / 10 );        #print "count: ", $#_, "\n";
140      $logstring .= "\t" x $tabcount . "(AUTOLOAD)";        #$logstring .= Dumper(@_) if ($#_ != -1);
141      # TODO: only ok if logstring doesn't contain        my $tabcount = int( (80 - length($logstring)) / 10 );
142      #            e.g. "Data::Storage[Tangram]->insert(SystemEvent=HASH(0x5c0034c))          (AUTOLOAD)"        $logstring .= "\t" x $tabcount . "(AUTOLOAD)";
143      # but that would be way too specific as long as we don't have an abstract handler for this  ;)        # TODO: only ok if logstring doesn't contain
144      $logger->debug( $logstring );        #            e.g. "Data::Storage[Tangram]->insert(SystemEvent=HASH(0x5c0034c))          (AUTOLOAD)"
145          # but that would be way too specific as long as we don't have an abstract handler for this  ;)
146          $logger->debug( $logstring );
147        }
148        
149    # filtering AUTOLOAD calls    # filtering AUTOLOAD calls
150    if ($self->_filter_AUTOLOAD($method)) {    if ($self->_filter_AUTOLOAD($method)) {
151      $self->_accessStorage();      $self->_accessStorage();
# Line 155  sub normalizeArgs { Line 178  sub normalizeArgs {
178  sub _accessStorage {  sub _accessStorage {
179    my $self = shift;    my $self = shift;
180    # TODO: to some tracelevel!    # TODO: to some tracelevel!
181    $logger->debug( __PACKAGE__ .  "[$self->{locator}->{type}]" . "->_accessStorage()" );    if ($TRACELEVEL) {
182        $logger->debug( __PACKAGE__ .  "[$self->{locator}->{type}]" . "->_accessStorage()" );
183      }
184    if (!$self->{STORAGEHANDLE}) {    if (!$self->{STORAGEHANDLE}) {
185      $self->_createStorageHandle();      $self->_createStorageHandle();
186    }    }
# Line 329  License or the Artistic License, as spec Line 354  License or the Artistic License, as spec
354    
355  =head1 ACKNOWLEDGEMENTS  =head1 ACKNOWLEDGEMENTS
356    
357  Larry Wall and the C<perl5-porters> for Perl,  Larry Wall for Perl, Tim Bunce for DBI, Jean-Louis Leroy for Tangram and Set::Object,
358  Tim Bunce for DBI, Jean-Louis Leroy for Tangram and Set::Object,  Sam Vilain for Class::Tangram, Adam Spiers for MySQL::Diff and all contributors.
 Sam Vilain for Class::Tangram.  
359    
360    
361  =head1 SUPPORT / WARRANTY  =head1 SUPPORT / WARRANTY
# Line 373  Data::Storage is free software. IT COMES Line 397  Data::Storage is free software. IT COMES
397      R retrieve  ->  no, not subject of this aspect since it is about deployment only      R retrieve  ->  no, not subject of this aspect since it is about deployment only
398      U update    ->  yes, just by user-interaction; maybe automatically if it can be determined that data wouldn't be lost      U update    ->  yes, just by user-interaction; maybe automatically if it can be determined that data wouldn't be lost
399      D delete    ->  yes, just by user-interaction      D delete    ->  yes, just by user-interaction
400    It's all about not to be able to loose data simply while this is in alpha stage.    
401      It's all about not to be able to loose data simply while this is in pre-alpha stage.
402      And loosing data by being able to modify and redeploy schemas easily is definitely quite easy.
403      
404      As we can see, creations of Classes and new Class variables is handled
405      automatically and this is believed to be the most common case under normal circumstances.
406    
407    
408  =head2 Introduce some features:  =head2 Introduce some features:
409    
410    Get this stuff together with UML (Unified Modeling Language) and/or standards from ODMG.    - Get this stuff together with UML (Unified Modeling Language) and/or standards from ODMG.
411    Make it possible to load/save schemas in XMI (XML Metadata Interchange),    - Make it possible to load/save schemas in XMI (XML Metadata Interchange),
412    which seems to be most commonly used today, perhaps handle objects with OIFML.      which seems to be most commonly used today, perhaps handle objects with OIFML.
413    Integrate/bundle this with a web-/html-based UML modeling tool or      Integrate/bundle this with a web-/html-based UML modeling tool or
414    some other interesting stuff like the "Co-operative UML Editor" from Uni Darmstadt. (web-/java-based)      some other interesting stuff like the "Co-operative UML Editor" from Uni Darmstadt. (web-/java-based)
415    Enable Round Trip Engineering. Keep code and diagrams in sync. Don't annoy/bother the programmer.    - Enable Round Trip Engineering. Keep code and diagrams in sync. Don't annoy/bother the programmers.
416      - Add some more handlers:
417        - look at DBD::CSV, Text::CSV, XML::CSV, XML::Excel
418      - Add some more locations/locators:
419        - PerlDAV: http://www.webdav.org/perldav/
420      - Move to t3, use InCASE
421    
422    
423  =head3 Links:  =head3 Links:
424    
425      Specs:
426      UML 1.3 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-06-08.pdf      UML 1.3 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-06-08.pdf
427      XMI 1.1 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-10-02.pdf      XMI 1.1 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-10-02.pdf
428      XMI 2.0 Spec: http://cgi.omg.org/docs/ad/01-06-12.pdf      XMI 2.0 Spec: http://cgi.omg.org/docs/ad/01-06-12.pdf
429      ODMG: http://odmg.org/      ODMG: http://odmg.org/
430      OIFML: http://odmg.org/library/readingroom/oifml.pdf      OIFML: http://odmg.org/library/readingroom/oifml.pdf
     Co-operative UML Editor: http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html  
431    
432    further readings:    CASE Tools:
433        Rational Rose (commercial): http://www.rational.com/products/rose/
434        Together (commercial): http://www.oi.com/products/controlcenter/index.jsp
435        InCASE - Tangram-based Universal Object Editor
436        Sybase PowerDesigner: http://www.sybase.com/powerdesigner
437      
438      UML Editors:
439        Fujaba (free, university): http://www.fujaba.de/
440        ArgoUML (free): http://argouml.tigris.org/
441        Poseidon (commercial): http://www.gentleware.com/products/poseidonDE.php3
442        Co-operative UML Editor (research): http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html
443        Metamill (commercial): http://www.metamill.com/
444        Violet (university, research, education): http://www.horstmann.com/violet/
445        PyUt (free): http://pyut.sourceforge.net/
446        (Dia (free): http://www.lysator.liu.se/~alla/dia/)
447        UMLet (free, university): http://www.swt.tuwien.ac.at/umlet/index.html
448        Voodoo (free): http://voodoo.sourceforge.net/
449        Umbrello UML Modeller: http://uml.sourceforge.net/
450    
451      UML Tools:
452        http://www.objectsbydesign.com/tools/umltools_byPrice.html
453    
454      Further readings:
455      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.google.com/search?q=web+based+uml+editor&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N
456      http://www.fernuni-hagen.de/DVT/Aktuelles/01FHHeidelberg.pdf      http://www.fernuni-hagen.de/DVT/Aktuelles/01FHHeidelberg.pdf
457      http://www.enhyper.com/src/documentation/      http://www.enhyper.com/src/documentation/
# Line 403  Data::Storage is free software. IT COMES Line 459  Data::Storage is free software. IT COMES
459      http://citeseer.nj.nec.com/vilain00diagrammatic.html      http://citeseer.nj.nec.com/vilain00diagrammatic.html
460      http://archive.devx.com/uml/articles/Smith01/Smith01-3.asp      http://archive.devx.com/uml/articles/Smith01/Smith01-3.asp
461    
   maybe useful for / to be integrated with:  
     ArapXML: http://xml.coverpages.org/ni2001-09-24-b.html  

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

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