| 1 |
joko |
1.1 |
NAME |
| 2 |
|
|
Data::Storage - Interface for accessing various Storage implementations |
| 3 |
|
|
for Perl in an independent way |
| 4 |
|
|
|
| 5 |
|
|
SYNOPSIS |
| 6 |
|
|
... the basic way: |
| 7 |
|
|
|
| 8 |
|
|
... via inheritance: |
| 9 |
|
|
|
| 10 |
|
|
use Data::Storage; |
| 11 |
|
|
my $proxyObj = new HttpProxy; |
| 12 |
|
|
$proxyObj->{url} = $url; |
| 13 |
|
|
$proxyObj->{payload} = $content; |
| 14 |
|
|
$self->{storage}->insert($proxyObj); |
| 15 |
|
|
|
| 16 |
|
|
use Data::Storage; |
| 17 |
|
|
my $proxyObj = HttpProxy->new( |
| 18 |
|
|
url => $url, |
| 19 |
|
|
payload => $content, |
| 20 |
|
|
); |
| 21 |
|
|
$self->{storage}->insert($proxyObj); |
| 22 |
|
|
|
| 23 |
|
|
NOTE |
| 24 |
|
|
|
| 25 |
|
|
This module heavily relies on DBI and Tangram, but adds a lot of |
| 26 |
|
|
additional bugs and quirks. Please look at their documentation and this |
| 27 |
|
|
code for additional information. |
| 28 |
|
|
|
| 29 |
|
|
DESCRIPTION |
| 30 |
|
|
Data::Storage is module for a accessing various "data structures" stored |
| 31 |
|
|
inside various "data containers". It sits on top of DBI and/or Tangram. |
| 32 |
|
|
|
| 33 |
|
|
AUTHORS / COPYRIGHT |
| 34 |
|
|
The Data::Storage module is Copyright (c) 2002 Andreas Motl. All rights |
| 35 |
|
|
reserved. |
| 36 |
|
|
|
| 37 |
|
|
You may distribute it under the terms of either the GNU General Public |
| 38 |
|
|
License or the Artistic License, as specified in the Perl README file. |
| 39 |
|
|
|
| 40 |
|
|
ACKNOWLEDGEMENTS |
| 41 |
|
|
Larry Wall and the "perl5-porters" for Perl, Tim Bunce for DBI, |
| 42 |
|
|
Jean-Louis Leroy for Tangram and Set::Object, Sam Vilain for |
| 43 |
|
|
Class::Tangram. |
| 44 |
|
|
|
| 45 |
|
|
SUPPORT / WARRANTY |
| 46 |
|
|
Data::Storage is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. |
| 47 |
|
|
|
| 48 |
|
|
TODO |
| 49 |
|
|
Handle the following errors/cases: |
| 50 |
|
|
|
| 51 |
|
|
"DBI-Error [Tangram]: DBD::mysql::st execute failed: Unknown column 't1.requestdump' in 'field list'" |
| 52 |
|
|
|
| 53 |
|
|
... occours when operating on object-attributes not introduced yet: |
| 54 |
|
|
this should be detected and appended/replaced through: |
| 55 |
|
|
"Schema-Error detected, maybe (just) an inconsistency. |
| 56 |
|
|
Please check if your declaration in schema-module "a" matches structure in database "b" or try to run" |
| 57 |
|
|
db_setup.pl --dbkey=import --action=deploy |
| 58 |
|
|
|
| 59 |
|
|
Compare schema (structure diff) with database ... |
| 60 |
|
|
|
| 61 |
|
|
... when issuing "db_setup.pl --dbkey=import --action=deploy" |
| 62 |
|
|
on a database with an already deployed schema, use an additional "--update" then |
| 63 |
|
|
to lift the schema inside the database to the current declared schema. |
| 64 |
|
|
You will have to approve removals and changes on field-level while |
| 65 |
|
|
new objects and new fields are introduced silently without any interaction needed. |
| 66 |
|
|
In future versions there may be additional options to control silent processing of |
| 67 |
|
|
removals and changes. |
| 68 |
|
|
See this CRUD-table applying to the actions occouring on Classes and Class variables when deploying schemas, |
| 69 |
|
|
don't mix this up with CRUD-actions on Objects, these are already handled by (e.g.) Tangram itself. |
| 70 |
|
|
Classes: |
| 71 |
|
|
C create -> yes, handled automatically |
| 72 |
|
|
R retrieve -> no, not subject of this aspect since it is about deployment only |
| 73 |
|
|
U update -> yes, automatically for Class meta-attributes, yes/no for Class variables (look at the rules down here) |
| 74 |
|
|
D delete -> yes, just by user-interaction |
| 75 |
|
|
Class variables: |
| 76 |
|
|
C create -> yes, handled automatically |
| 77 |
|
|
R retrieve -> no, not subject of this aspect since it is about deployment only |
| 78 |
|
|
U update -> yes, just by user-interaction; maybe automatically if it can be determined that data wouldn't be lost |
| 79 |
|
|
D delete -> yes, just by user-interaction |
| 80 |
|
|
It's all about not to be able to loose data simply while this is in alpha stage. |
| 81 |
|
|
|
| 82 |
|
|
Introduce some features: |
| 83 |
|
|
|
| 84 |
|
|
Get this stuff together with UML (Unified Modeling Language) and/or standards from ODMG. |
| 85 |
|
|
Make it possible to load/save schemas in XMI (XML Metadata Interchange), |
| 86 |
|
|
which seems to be most commonly used today, perhaps handle objects with OIFML. |
| 87 |
|
|
Integrate/bundle this with a web-/html-based UML modeling tool or |
| 88 |
|
|
some other interesting stuff like the "Co-operative UML Editor" from Uni Darmstadt. (web-/java-based) |
| 89 |
|
|
Enable Round Trip Engineering. Keep code and diagrams in sync. Don't annoy/bother the programmer. |
| 90 |
|
|
|
| 91 |
|
|
Links: |
| 92 |
|
|
|
| 93 |
|
|
UML 1.3 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-06-08.pdf |
| 94 |
|
|
XMI 1.1 Spec: http://cgi.omg.org/cgi-bin/doc?ad/99-10-02.pdf |
| 95 |
|
|
XMI 2.0 Spec: http://cgi.omg.org/docs/ad/01-06-12.pdf |
| 96 |
|
|
ODMG: http://odmg.org/ |
| 97 |
|
|
OIFML: http://odmg.org/library/readingroom/oifml.pdf |
| 98 |
|
|
Co-operative UML Editor: http://www.darmstadt.gmd.de/concert/activities/internal/umledit.html |
| 99 |
|
|
|
| 100 |
|
|
further readings: |
| 101 |
|
|
http://www.google.com/search?q=web+based+uml+editor&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N |
| 102 |
|
|
http://www.fernuni-hagen.de/DVT/Aktuelles/01FHHeidelberg.pdf |
| 103 |
|
|
http://www.enhyper.com/src/documentation/ |
| 104 |
|
|
http://cis.cs.tu-berlin.de/Dokumente/Diplomarbeiten/2001/skinner.pdf |
| 105 |
|
|
http://citeseer.nj.nec.com/vilain00diagrammatic.html |
| 106 |
|
|
http://archive.devx.com/uml/articles/Smith01/Smith01-3.asp |
| 107 |
|
|
|
| 108 |
|
|
maybe useful for / to be integrated with: |
| 109 |
|
|
ArapXML: http://xml.coverpages.org/ni2001-09-24-b.html |