--- nfo/perl/libs/Data/Storage.pm 2002/10/27 18:35:07 1.4 +++ nfo/perl/libs/Data/Storage.pm 2002/10/29 19:24:18 1.5 @@ -1,4 +1,4 @@ -# $Id: Storage.pm,v 1.4 2002/10/27 18:35:07 joko Exp $ +# $Id: Storage.pm,v 1.5 2002/10/29 19:24:18 joko Exp $ # # Copyright (c) 2002 Andreas Motl # @@ -7,6 +7,10 @@ ################################# # # $Log: Storage.pm,v $ +# Revision 1.5 2002/10/29 19:24:18 joko +# - reduced logging +# + added some pod +# # Revision 1.4 2002/10/27 18:35:07 joko # + added pod # @@ -33,6 +37,7 @@ $Data::Storage::VERSION = 0.01; } + =head1 NAME Data::Storage - Interface for accessing various Storage implementations for Perl in an independent way @@ -76,6 +81,8 @@ use Data::Storage::Locator; +my $TRACELEVEL = 0; + # get logger instance my $logger = Log::Dispatch::Config->instance; @@ -111,18 +118,21 @@ my $method = $AUTOLOAD; $method =~ s/^.*:://; - # advanced logging of AUTOLOAD calls - my $logstring = ""; - $logstring .= __PACKAGE__ . "[$self->{locator}->{type}]" . "->" . $method; - #print "count: ", $#_, "\n"; - #$logstring .= Dumper(@_) if ($#_ != -1); - my $tabcount = int( (80 - length($logstring)) / 10 ); - $logstring .= "\t" x $tabcount . "(AUTOLOAD)"; - # TODO: only ok if logstring doesn't contain - # e.g. "Data::Storage[Tangram]->insert(SystemEvent=HASH(0x5c0034c)) (AUTOLOAD)" - # but that would be way too specific as long as we don't have an abstract handler for this ;) - $logger->debug( $logstring ); - + # advanced logging of AUTOLOAD calls ... + # ... nice but do it only when TRACING (TODO) is enabled + if ($TRACELEVEL) { + my $logstring = ""; + $logstring .= __PACKAGE__ . "[$self->{locator}->{type}]" . "->" . $method; + #print "count: ", $#_, "\n"; + #$logstring .= Dumper(@_) if ($#_ != -1); + my $tabcount = int( (80 - length($logstring)) / 10 ); + $logstring .= "\t" x $tabcount . "(AUTOLOAD)"; + # TODO: only ok if logstring doesn't contain + # e.g. "Data::Storage[Tangram]->insert(SystemEvent=HASH(0x5c0034c)) (AUTOLOAD)" + # but that would be way too specific as long as we don't have an abstract handler for this ;) + $logger->debug( $logstring ); + } + # filtering AUTOLOAD calls if ($self->_filter_AUTOLOAD($method)) { $self->_accessStorage(); @@ -155,7 +165,9 @@ sub _accessStorage { my $self = shift; # TODO: to some tracelevel! - $logger->debug( __PACKAGE__ . "[$self->{locator}->{type}]" . "->_accessStorage()" ); + if ($TRACELEVEL) { + $logger->debug( __PACKAGE__ . "[$self->{locator}->{type}]" . "->_accessStorage()" ); + } if (!$self->{STORAGEHANDLE}) { $self->_createStorageHandle(); } @@ -373,29 +385,60 @@ 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. + + It's all about not to be able to loose data simply while this is in pre-alpha stage. + And loosing data by being able to modify and redeploy schemas easily is definitely quite easy. + + As we can see, creations of Classes and new Class variables is handled + automatically and this is believed to be the most common case under normal circumstances. =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. + - 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 programmers. + - Add some more handlers: + - look at DBD::CSV, Text::CSV, XML::CSV, XML::Excel + - Add some more locations/locators: + - PerlDAV: http://www.webdav.org/perldav/ + - Move to t3, use InCASE =head3 Links: + Specs: 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: + CASE Tools: + Rational Rose (commercial): http://www.rational.com/products/rose/ + Together (commercial): http://www.oi.com/products/controlcenter/index.jsp + InCASE - Tangram-based Universal Object Editor + Sybase PowerDesigner: http://www.sybase.com/powerdesigner + + UML Editors: + Fujaba (free, university): http://www.fujaba.de/ + ArgoUML (free): http://argouml.tigris.org/ + Poseidon (commercial): http://www.gentleware.com/products/poseidonDE.php3 + Co-operative UML Editor (research): http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html + Metamill (commercial): http://www.metamill.com/ + Violet (university, research, education): http://www.horstmann.com/violet/ + PyUt (free): http://pyut.sourceforge.net/ + (Dia (free): http://www.lysator.liu.se/~alla/dia/) + UMLet (free, university): http://www.swt.tuwien.ac.at/umlet/index.html + Voodoo (free): http://voodoo.sourceforge.net/ + + UML Tools: + http://www.objectsbydesign.com/tools/umltools_byPrice.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/ @@ -403,5 +446,3 @@ 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