Main > Free Download Search >

Free uml in a nutshell software for linux

uml in a nutshell

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 168
P-UMLaut 1.2

P-UMLaut 1.2


The P-UMLaut tool allows the user to transform UML 2.0 Sequence Diagrams to semantically equivalent Petri Nets. more>>
The P-UMLaut tool allows the user to transform UML 2.0 Sequence Diagrams to semantically equivalent Petri Nets.
These Petri Nets may then be simulated using the supplied PN simulator (of PEP descent) or operated on with any tool that can work with high level Petri Nets.
By plugging different Realms into the simulation by way of an event filter, the modeled world may then be displayed and interacted with in various fashions. A 3D animation module is supplied as well as two examples utilizing the complete toolchain.
Enhancements:
- A new Petrinet Simulator was implemented in Java which features Highlevel-PN to Lowlevel-PN unfolding and Timed-PN simulation.
- Filtering was enhanced. Irrlicht 0.12 is used.
<<less
Download (15.9MB)
Added: 2005-09-27 License: GPL (GNU General Public License) Price:
1488 downloads
UMLMON 1.0.3

UMLMON 1.0.3


UMLMON is a complete run time environment for User Mode Linux. more>>
UMLMON is a complete run time environment for User Mode Linux. There is a separate monitor daemon for every VM.
UMLMON project creates the run time environment and starts the VM by executing the UML kernel. The daemon also determines the arguments that are passed to the UML kernel, and includes special support to set up arguments for memory size, virtual disks, virtual network interfaces, and console channels in a convenient way.
UMLMON also includes routines to do certain administration tasks like the creation of disks.
The team UMLMON + UML can be applied in the following areas:
- Server consolidation: Improve the utilization of server hardware, and ease the operation of servers.
- Virtual security zones: Instead of building demilitarized zones (DMZ) with real hardware, it is a cost-effective alternative to set up purely virtual DMZs on a single host.
- Virtual hosting: A cheap version of server hosting is virtual hosting; instead of leasing real computers to customers, virtual machines are used.
- Laboratory nets: By using virtual machines it is possible to build cheap laboratory nets, e.g. to test software in real network environments.
- Training environments: One can use virtual machines for Linux trainings where participants can get true administrators priviledges without any risks.
Enhancements:
- This release no longer call the problematic glibc function getgrouplist, which is often broken (symptom: segmentation fault immediately after starting umlmon).
<<less
Download (3.2MB)
Added: 2006-01-08 License: GPL (GNU General Public License) Price:
1384 downloads
UMLGraph 4.8

UMLGraph 4.8


UMLGraph facilitates the declarative specification and drawing of UML class and sequence diagrams. more>>
UMLGraph facilitates the declarative specification and drawing of UML class and sequence diagrams.
One can specify a class design using the Java syntax complemented by Javadoc tags.
Running the UmlGraph doclet on the specification generates a Graphviz diagram specification that can be automatically processed to create Postscript, GIF, SVG, JPEG, fig, or Framemaker drawings.
Similarly, sequence diagrams are specified using declarative pic macros and compiled with the GNU plotutils pic2plot program into a PNG, PNM, (pseudo) GIF, SVG, AI, Postscript, CGM, FIG, PCL, HPGL, Regis, or TEK drawing.
Enhancements:
- This version improves its invocation interface so that it can be run directly as a jar file.
- It has support for sending results to the standard output for direct piping into dot.
- The distribution includes an example shell script and batch file for invoking UMLGraph.
<<less
Download (0.057MB)
Added: 2007-05-10 License: BSD License Price:
900 downloads
UMLSpeed 0.19

UMLSpeed 0.19


UMLSpeed is a compiler for a simple, C-style language that allows declaration of UML entities and diagrams. more>>
UMLSpeed project is a compiler for a simple, C-style language that allows declaration of UML entities and diagrams. Diagrams can be compiled into SVG and the entities to XMI for use with other tools.
Why?
- Graphical UML tools in general suck - why should we, as programmers have to drag and drop stupid graphical things and use a mouse when we could express what we want 10 times faster with a text editor and a simple notation? - More importantly, why should we have to lay everything out when the computer could do it for us?
- Graphical UML tools are bloated, huge, memory and disk-hogging monsters.
- Graphical UML tools use either a binary data format or XML, which is not particularly friendly to source code control systems.
Main features:
- Written in GCJ-portable java and compiled natively. Its extremely fast even when dealing with thousands of entities and diagrams.
- Purely command-line driven and takes miniscule resources.
- Flexible enough with file imports that large UML projects can be broken up into separate files and only individual bits built at a time as required.
- C-style syntax means that the source language integrates well with source code control and diff tools.
- Standards compliant - produces interoperable SVG and XMI, as well as clean source code.
- Can integrate with automated build tools for regular diagram/xmi compilation.
Status
This is still alpha software. Dont hold me responsible if it kills your pets and blows your house up.
Implemented so far:
- Compiler/parser
- Namespaces, Class diagrams and related entities
- Use case diagrams and related entities
- Auto-link pathfinding
- XMI 1.3 output
- VIM syntax highlighting
- Code generation (Java and Python)
Still to do:
- Documentation output
- Code generation (Ruby, PHP, Perl, C++, C#)
- Diagram packages
- Diagram notes
- Alternative diagram layout managers
- Deployment diagrams
- Sequence diagrams
- Activity diagrams
Enhancements:
- Added facilities to store HTML of reports in a buffer for use by plugins and turn off file generation. Maven plugin now uses this when using Doxia for generation.
- Added $PROJECTNAME and $PROJECTVERSION HTML tokens, with CLI parameters to set them. Maven plugin will automatically set them.
- Added $PUBLISHDATE token
- Added $TOC key for generating links to bookmarks on the same page.
<<less
Download (0.47MB)
Added: 2007-07-21 License: GPL (GNU General Public License) Price:
826 downloads
UML::State 0.02

UML::State 0.02


UML::State is an object oriented module which draws simple state diagrams. more>>
UML::State is an object oriented module which draws simple state diagrams.

SYNOPSIS

use UML::State;

my $diagram = UML::State->new(
$node_array,
$start_list,
$accept_list,
$edges
);

# You may change these defaults (doing so may even work):
$UML::State::ROW_SPACING = 75; # all numbers are in pixels
$UML::State::LEFT_MARGIN = 20;
$UML::State::WIDTH = 800;
$UML::State::HEIGHT = 800;

print $diagram->draw();

ABSTRACT

Are you tired of pointing and clicking to make simple diagrams? Do your wrists hurt thinking about making the pretty UML your boss likes so well? Consider using UML::State and UML::Sequence to make your life easier.

UML::State together with drawstate.pl allows you to easily generate state diagrams. You enter them in something like a cross between ASCII art and school room algebra. They come out looking like something from a drawing program like Visio. See drawstate.pl in the distribution for details about the input format and the samples directory for some examples of input and output.

You will probably use this class by running drawstate.pl or drawstatexml.pl which are included in the distribution. But you can use this package directly to gain control over the appearance of your pictures.

The two methods you need are new and draw (see below). If you want, you may change the dimensions by setting the package global variables as shown in the SYNOPSIS. Obviously, no error checking is done, so be careful to use reasonable values (positive numbers are good). All numbers are in pixels (sorry by Beziers in SVG seem to require pixels). I have not tried changing the numbers, so I dont have any idea if doing so makes reasonable changes to the output.

<<less
Download (0.054MB)
Added: 2007-04-23 License: Perl Artistic License Price:
915 downloads
Umbrello UML Modeller 1.5.71

Umbrello UML Modeller 1.5.71


Umbrello UML Modeller is a Unified Modelling Language diagram programme for KDE. more>>
Umbrello UML Modeller is a Unified Modelling Language diagram programme for KDE.
Umbrello UML Modeller allows you to create diagrams of software and other systems in a standard format.
Our handbook gives a good introduction to Umbrello and UML modelling.
Enhancements:
- Bugs/wishes from http://bugs.kde.org:
- Preprocessor keywords ignored which causes endless loop in code import (119125)
- Code generator for D language (124805)
- Unstable saves and loads, class names become dirty (145709)
- Crash on deleting class in list view (145762)
- Class attribute documentation not generated for python (145916)
- Python code generator does not wrap lines properly (145918)
- Attribute documentation not generated for Export to XHTML (145972)
- Crash when moving a class in a Java UML diagram (146058)
- Arrowheads are not shown (146064)
- Crash when creating a class that refers to more than one other classes/datatypes (146367)
<<less
Download (2.3MB)
Added: 2007-06-08 License: GPL (GNU General Public License) Price:
886 downloads
Lia 0.0.2

Lia 0.0.2


Lia is a library for performing Large Integer Arithmetic. more>>
Lia is a library for performing Large Integer Arithmetic. It should not be used in a production environment. It will never be better than GNU MP.
It is, however, a nice clean library. The code is simple and easy to read and may be considered valuable to beginner to intermediate level C++ programmers. This is why it has been publicly released.
Lia is free software. In order to keep it that way, it is distributed under the terms of the GNU GPL. Yes, this means you are not permitted to link it against non-free software. But, as was mentioned earlier, why would you want to?
To install type in a nutshell: ./configure && make && make install
See the programs in the test directory for the "Programmers Guide".
See the installed header files in the PREFIX/include/lia directory for the
"Programmers Reference".
Keep in mind that Lia is distributed under the terms of the GNU GPL. That is,
it is free software and may only be linked against binaries compiled from other
free code.
Enhancements:
- Switched to a more libtool friendly versioning scheme.
- Added flexible string conversion routines to convert to and from character strings representing numbers in base 2 to base 256 encoded with programmer definable digits.
- Default string representation changed from hexadecimal to decimal.
- Removed the need for the InvalidParameterException thrown from most arithmetic functions.
- Added GCD function.
- Added ModularExponenet function.
- Renamed sqrttest to functest.
<<less
Download (0.11MB)
Added: 2006-07-17 License: GPL (GNU General Public License) Price:
1194 downloads
UMLet 7.1

UMLet 7.1


UMLet is a lightweight tool for rapidly drawing UML diagrams. more>>
UMLet project is an open-source Java tool for rapidly drawing UML diagrams with a pop-up-free, light-weight user interface.
UMLet lets you draw diagram sketches fast; export diagrams to eps, pdf, jpg, svg, and sys.
Add elements to a diagram with a double click. Edit elements using the lower-right text panel. Select multiple elements using Ctrl or lasso. Press C to copy diagram to the system clipboard
Main features:
- fast
- text-based sequence diagram
- call from command line.
<<less
Download (4.9MB)
Added: 2006-11-22 License: GPL (GNU General Public License) Price:
657 downloads
UML::Sequence 0.07

UML::Sequence 0.07


UML::Sequence is a Perl module to render UML sequence diagrams, often by running the code. more>>
UML::Sequence is a Perl module to render UML sequence diagrams, often by running the code.

SYNOPSIS

use UML::Sequence;

my $tree = UML::Sequence->new(@methods, @outline, &parse_method);
print $tree->build_xml_sequence(Title);

To use this package, or see how to use it, see genericseq.pl and seq2svg.pl.
This class helps produce UML sequence diagrams. build_xml_sequence returns a string (suitable for printing to a file) which the seq2svg.pl script converts into svg.

To control the appearance of the sequence diagram, pass to the constructor:
1 a reference to an array containing the signatures you want to hear about or a reference to a hash whose keys are the signatures you want 2 a reference to an array containing the lines in the outline of calls 3 a reference to a sub which takes signatures and returns class and method names

To build the array references and supply the code reference consult UML::Sequence::SimpleSeq, UML::Sequence::JavaSeq, or UML::Sequence::PerlSeq. To see one way to call these look in the supplied genericseq script.

<<less
Download (0.12MB)
Added: 2007-04-23 License: Perl Artistic License Price:
916 downloads
SMUSHcode 20030211

SMUSHcode 20030211


SMUSHcode project is a functional (as opposed to procedural) scripting language interpreter, written in Java. more>>
SMUSHcode project is a functional (as opposed to procedural) scripting language interpreter, written in Java. Completely documentated.

SMUSHcode started life in 1997 as a term project for a "Compilers and Translators" class. Originally written in C++, it was conceived as a functional (as opposed to procedural) scripting language. After the class was over, it was reimplemented in Java as a good way to learn a new language. It exists now as a solution without a problem -- it works great and is very extendable, it just isnt currently needed for anything.

Currently, the examples and the EBNF are a new SMUSHcode programmers only way to learn the language. The API documentation is amazingly thorough (a good way to learn javadoc, no?) but for some reason refers to the language as "SMUSHcode75". The reasons for the "75" are long lost in the misty past...

SMUSHcode is a functional scripting language that any LISP or Scheme hacker would have no problem picking up quickly (whether they would want to is a different issue). Most newer and/or self-taught programmers are not familiar with the idea of a functional language, so in a nutshell it is this: Everything is a function. Every function returns a value. Functional languages do not encourage the concept of "Do A. Do B unrelated to A. Do C unrelated to A or B." (that is procedural programming). Functional programming instead follows the model of "Do A, then use As result to do B, then use Bs result to do C.".

To give a better example, a procedural language might evaluate the Pythagorian theorem thus:

a_squared := a * a;
b_squared := b * b;
c_squared := a_squared + b_squared;
c := square_root(c_squared);
A functional language would evaluate it thus:
c := square_root((a * a) + (b * b));

Curiously, the author had never studied functional programming and only learned Scheme one semester after designing SMUSHcode. It seemed oddly familiar...

This projects GNUmakefile is also interesting; it was written before the Ant project was available. Using GNU make, it dynamically explores a package structure, rebuilds class files as necessary, runs javadoc and creates JAR files. It is documented and easy to customize.

<<less
Download (0.042MB)
Added: 2007-03-09 License: GPL (GNU General Public License) Price:
959 downloads
Lunar Linux 1.6.1 / 1.6.2 Beta 1

Lunar Linux 1.6.1 / 1.6.2 Beta 1


Lunar is a source based Linux distribution developed by a talented team of programmers from all over the world. more>>
Lunar is a source based Linux distribution developed by a talented team of programmers from all over the world, working together to extend the Linux technology into better-tailored and more optimized software for the end user.
Lunar uses and builds upon the Linux kernel, the software started by Linus Torvalds and supported by thousands of programmers worldwide, and offers a unique package management system which builds each software package, or module, from scratch for the machine in which it is being installed.
This is what sets Lunar apart. Lunar Linux makes customization a breeze-- you choose the compile options before a module is built, and install a lean and uncluttered system that has exactly what you need. Nothing more, or less.
Once installed, Lunar is remarkably fast, breaking new ground in flexibility and in the options it offers the individual user.
In a nutshell: Lunar installs a complete bootstrap development system on your machine. You then tell the Lunar package manager what tools you want, and it builds the entire system by downloading current source code and locally compiling an optimized system tailored toward your specific needs.
Lunars installer is fast and provides full control over the process of installation, including a wide variety of install and rescue tools. The installer provides the user with an interface to compile a custom kernel during installation.
Installing applications is remarkably simple-- type in "lin [package name]" and the system will install the application from the moonbase, our module repository. Dont want it after all? Type "lrm [package name]" and it is gone. Lunar has a unique shell-based Application Management System which handles the dependencies when installing software. There is no "dependency hell"-- if there are other things the system needs to install a particular application, the AMS will simply find them for you.
Updating lunar is a matter of one single command, lunar update. It fetches an updated moonbase, checks if there were any updated modules and builds those. The AMS is network aware and uses the network to acquire source code. The moonbase and core tools are updated every hour at Lunar-Linux.org.
The advantage for the end user is clear: a system that is both robust and stable, and easy to install and maintain without sacrificing variety and flexibility. Lunar has built in integrity checking and a robust self-repairing capability. It also enables system users to develop their own source-packages using the toolset.
Lunar is for everyone. Though it may be difficult for the beginner to administer, it provides you with all the possible features you could want from a Linux distribution. It is incredibly accessible to anyone who has played around with a UNIX system.
All of this presents a rich potential for a user who seeks speed, strong performance, and a system that "works smart".
Whats New in 1.6.1 Stable Release:
- With great pleasure we release Moose Drool, also known as the Lunar Linux 1.6.1 Installer ISO, to the public. This ISO is partially a refreshed installer for i686, but it is also our first stable ISO for x86_64. The x86_64 installer ISO thus marks the true final entry for Lunar Linux as a multi-arch distro. This ISO comes with GCC 3.4.6, glibc 2.3.6, Linux 2.6.20, Perl 5.8.8, and other rock solid base components. Allthough the x86_64 ISO is purely 64-bit only now, were working to enable multilib, so stay focused for more news on that. This will also be the last ISO with GCC 3.x. Future ISOs will move to GCC 4.x and an updated glibc.
Whats New in 1.6.2 Beta 1 Development Release:
- Were happy to announce the first beta release of a new series of Lunar linux installer ISOs. Our new ISOs will be as easy to install as 1.6.1, but pack an extra punch - this series of ISOs pre-installs a basic Xfce 4.4.1 desktop with X.Org 7.2, together with Firefox, Thunderbird, Pidgin, Audacious, GIMP and a few other basic desktop utilities. We hope to make it easy for everyone to both enjoy playing and learning from a true source distro environment and be productive quickly. The extra applications will give new users a fast start and should install easily on most (even brand new) hardware with the 2.6.22.1 kernel, but also give the user a welcome feeling on a freshly installed lunar-linux system.
<<less
Download (257MB)
Added: 2007-07-30 License: GPL (GNU General Public License) Price:
823 downloads
libping 1.15

libping 1.15


libping is a C library designed to allow a programmer to make ICMP_ECHO requests directly from a script or program. more>>
libping is a C library designed to allow a programmer to make ICMP_ECHO requests directly from a script or program. libpings functions return either boolean--is alive--or the round trip time in milliseconds.

The library also includes support for "pinging" the following tcp/ip services: echo, http, https, smtp and pop3. Versions 1.15 and better are threadsafe.

Installation:

In a nutshell, to install the application in the default directory, ( /usr/local ), run the following commands:

$ ./configure
$ make
$ make install

This will install the application ( ring ) in the default directory /usr/local/bin. If that directory is in your PATH, then to run ring and view the online help type:

$ ring --help

It will also install libping in /usr/local/lib and place the header file ping.h in /usr/local/include.

To learn more about ring, make sure /usr/local/man is in your MANPATH and type:

$ man ring

For information about the C library functions, type:

$ man pinghost

For more details, read on. Especially if you want to install libping in a directory other that /usr/local
<<less
Download (0.24MB)
Added: 2006-05-09 License: GPL (GNU General Public License) Price:
1267 downloads
ArgoUML 0.20

ArgoUML 0.20


ArgoUML is a pure Java open source UML CASE tool that provides cognitive support for object-oriented design. more>>
ArgoUML is a pure Java open source UML CASE tool that provides cognitive support for object-oriented design.
ArgoUML provides some of the same editing and code generation features of a commercial CASE tool, but it focuses on features that enhance usability and support the cognitive needs of designers. Uses XML file formats: XMI and PGML.
Main features:
- Click and Go! with Java Web Start
- Platform Independent: Java 1.4+
- Standard UML 1.3 Meta-Model
- 8 out of 9 Diagrams supported
- XMI-Support
- Export Diagrams as GIF, PS, EPS, PGML and SVG
- Internationalization EN, DE, ES, RU, FR, NB
- Advanced diagram editing and Zoom
- OCL Support
- Forward Engineering
- Reverse Engineering / Jar/class file Import
- Cognitive Support
- Reflection-in-action
- Design Critics
- Corrective Automations (partially implemented)
- "To Do" List
- User model (partially implemented)
- Opportunistic Design
- "To Do" List
- Checklists
- Comprehension and Problem Solving
- Explorer Perspectives
- Multiple, Overlapping Views
- Alternative Design Representations: Graphs, Text, or Table
Enhancements:
- This is the first release which easily generates Debian packages and installs the server cleanly.
- The Perl client works correctly when connecting to the server and allows all the basic operations to be carried out.
<<less
Download (9.2MB)
Added: 2006-02-20 License: BSD License Price:
1464 downloads
uml2svg 0.18

uml2svg 0.18


uml2svg is an XSLT-based tool for converting XMI-compliant UML Diagrams into SVG. more>>
uml2svg is an XSLT-based tool for converting XMI-compliant UML Diagrams into SVG.
We started the developing uml2svg with six main goals in mind:
- Standard conformance
- Good Documentation
- Modularity
- Extensibility
- Comprehensible SVG
- Multiple diagrams per XMI-file
SVG is a standard language for describing two-dimensional vector graphics in XML. As the open SVG standard gains in popularity and gradually replaces proprietary formats for vectorial graphics, the support provided by the Web browsers is getting better.
Plugins to display SVG exist for most browsers and it is most likely that the next generation of Web browser will provide built-in support for SVG. When that happens there will be no better way to distribute vector graphics on the web. Furthermore, not only web browsers can process SVG in a meaningful way; in fact that is just the tip of the iceberg. SVG can be easily read in, processed, and then transformed into many other formats, being well suited for both text and graphic tools as well as for web agents and screen readers.
UML diagrams are composed of lines, polygons, ellipses and text labels, so they are inherently vectorial. However, the SVG is not very well suited for direct use by UML tools. While some of them can in fact export UML diagrams directly to SVG, they do that by discarding all the information about structure, and converting everything into a shape. Moreover, some tools use the screen-capture function provided by their environment (such as java2d) and then they apply a filter to generate SVG out of the "screenshot".
What comes out of that is a pile of meaningless information, which by accident happens to draw a gorgeous diagram. How will a screen reader interpret such a file? How will a web crawler be able to index it? How will a web agent process it in a meaningful way? A program needs the semantic information that the humans can extract just by looking at a picture. For a machine, an obfuscated SVG file is not easier to process than a PNG file or any other image.
Although for humans it is better to be able to scale the image, for a program this is irrelevant. Programs need a way to "understand" the semantics of the UML models to be able to process and interchange them in a meaningfull way. This was the main idea behind the XML Metadata Interchange (XMI), an OMG specification for model interchange. And probably the best use that XMI has found so far is the exchange of UML models between different modeling tools. And while the XMI provides a standard way for tools to represent models as XML documents, it is still limited to the model elements only.
With the introduction of the UML 2.0 Diagram Interchange Specification as part of the upcoming UML 2.0 standard, it will become possible for tools to exchange the models together with the layout of the diagrams. We think that, once this specification appears, XMI will be used averywhere. Not only will the tools be able to exchange diagrams, but could even represent them internaly as DOM trees. Have you ever considered drawing your UML diagrams online, using only a web browser? This could be done even now by using a custom SVG syntax for the DOM tree, but a solution based on XMI could do even better and be a standard at the same time.
Therefore, we believe that with the advent of UML 2.0 and the increase in the use of SVG, the need for transformations between XMI and SVG will be great. Nevertheless when the uml2svg project was started, there was hardly any good open-source solution to convert XMI diagams into SVG.
The UML 2.0 Diagram Interchange Adopted Specification in its current incipient form references a set of XSL transformations. Although the standard draft covers them to a large extent, the link is actually broken (you can try for yourself). It has been broken for more than a year and most likely it will stay like that forever.
The personal webpage of Professor Mario Jeckle provides an online transformation service capable of dynamically generating SVG from XMI-compliant XML files. The XSL files accomplishing the transformations are also available on that website. These transformations are monolithic and not well documented (the only documentation is in the code, and it is generally written in German). With the tragic accident that took the life of Professor Jeckle, the transformations have no longer been maintained.
Finally, the STZ-IDA research center in Karlsruhe had to convert UML diagrams to SVG, as part of one of their projects. The XSLT stylesheet they created for this purpose was named xmi2svg and is available under the terms of the MIT license. At the time we started work on uml2svg the only type of diagrams supported was class diagrams.
Recently the package reached version 0.2 and it supports more diagram types, without major changes in the code (the opposite of what we were expecting). Andreas Junghans, the author of xmi2svg, provided us with a lot of insightful hints which helped us eliminate many glitches in uml2svg. It looks that the development of uml2svg and xmi2svg will continue in parallel, at least for a while. The good thing about this is that the two (quite different) implementations prove each others validity and the features tend to propagate freely from one side to the other. However, this comes with the prize of having to maintain two different code-trees and possibly confusing some users.
We did not like the two existing solutions because they were:
incomplete - just prototypes, not well suited for production environment
monolithic - hard to maintain and extend
not documented - hard to understand
At first sight, we thought we could find a way to improve one of the existing solutions and just add the features we needed. However, we slowly came to the conclusion that it would be better if we started anew. There are things one can fix in a project, but that does not include what we thought is was bad design. The fact that the two implementations presented above are open source helped us get quickly on the way with our own project.
Enhancements:
- Two annoying bugs were fixed.
- The site and documentation were updated.
<<less
Download (MB)
Added: 2007-02-18 License: LGPL (GNU Lesser General Public License) Price:
981 downloads
DBIx::DataModel 0.21

DBIx::DataModel 0.21


DBIx::DataModel is a Perl module with Classes and UML-style Associations on top of DBI. more>>
DBIx::DataModel is a Perl module with Classes and UML-style Associations on top of DBI.

SYNOPSIS

in file "MySchema.pm"

Declare the schema
use DBIx::DataModel;
DBIx::DataModel->Schema(MySchema); # MySchema is now a Perl package

Declare the tables with (Perl name, DB name, primary key column(s)). Each table then becomes a Perl package.

MySchema->Table(qw/Employee Employee emp_id/);
MySchema->Table(qw/Department Department dpt_id/);
MySchema->Table(qw/Activity Activity act_id/);
Declare associations in UML style ( [table1 role1 multiplicity1 join1], [table2...]).
MySchema->Association([qw/Activity activities * emp_id/],
[qw/Employee employee 1 emp_id/]);
MySchema->Association([qw/Activity activities * dpt_id/],
[qw/Department department 1 dpt_id/]);
Declare a n-to-n association, on top of the linking table
MySchema->Association([qw/Department departments * activities department/]);
[qw/Employee employees * activities employee/]);
Declare "column types" with some handlers ..
# date conversion between database (yyyy-mm-dd) and user (dd.mm.yyyy)
MySchema->ColumnType(Date =>
fromDB => sub {$_[0] =~ s/(dddd)-(dd)-(dd)/$3.$2.$1/},
toDB => sub {$_[0] =~ s/(dd).(dd).(dddd)/$3-$2-$1/},
validate => sub {$_[0] =~ m/(dd).(dd).(dddd)/});

# percent conversion between database (0.8) and user (80)
MySchema->ColumnType(Percent =>
fromDB => sub {$_[0] *= 100 if $_[0]},
toDB => sub {$_[0] /= 100 if $_[0]},
validate => sub {$_[0] =~ /1?d?d/});
.. and apply these "column types" to some of our columns
Employee->ColumnType(Date => qw/d_birth/);
Activity->ColumnType(Date => qw/d_begin d_end/);
Activity->ColumnType(Percent => qw/activity_rate/);
Declare a column that will be filled automatically at each update
MySchema->AutoUpdateColumns(last_modif =>
sub{$ENV{REMOTE_USER}.", ".scalar(localtime)});

For details that could not be expressed in a declarative way, just add a new method into the table class (but in that case, Schema and Table declarations should be in a BEGIN block, so that the table class is defined before you start adding methods to it).

package Activity;

sub activePeriod {
my $self = shift;
$self->{d_end} ? "from $self->{d_begin} to $self->{d_end}"
: "since $self->{d_begin}";
}

Declare how to automatically expand objects into data trees
Activity->AutoExpand(qw/employee department/);

<<less
Download (0.041MB)
Added: 2006-09-20 License: Perl Artistic License Price:
1130 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5