| 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 |
# |
# |
| 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 |
| 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 |
|
|
| 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 |
|
|
| 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(); |
| 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 |
} |
} |
| 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 |
| 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/ |
| 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 |
|