The following module was proposed for inclusion in the Module List:
modid: Gtk2::Ex::DbLinker
DSLIP: adpOp
description: Use sql or orm objects to build a gtk2 Gui
userid: RAPPAZF (François Rappaz)
chapterid: 7 (Database_Interfaces)
communities:
gtk-perl mailing list <[email protected]>
similar:
Gtk2::Ex::DBI; Gtk2::Ex::Datasheet::DBI
rationale:
NAME Gtk2::Ex::DbLinker - Use sql or an object-relational mapper to
get data from a database and build a gtk2 Gui using a glade file
SYNOPSIS
use My::Form; use Rdb::MyTable::Manager; use
Gtk2::Ex::DbLinker::RdbDataManager use Gtk2 -init; use
Gtk2::GladeXML;
my $builder = Gtk2::Builder->new();
$builder->add_from_file($path_to_glade_file);
my $data = Rdb::MyTable::Manager->get_mytable(query => [primary_key
=> {eq => $self->{pk}}]); my $dman =
Gtk2::Ex::Linker::RdbDataManager->new({data=> $data, meta =>
Rdb::MyTable->meta });
$self->{form_for_my_table} = Gtk2::Ex::DbLinker::Form->new({
data_manager => $dman, builder => $builder, .... });
DESCRIPTION
The aim of this module is to automate the process of tying data
from a database to widgets on a Glade-generated window. All that is
required is that you name your widgets the same as the fields in
your data source. Step for use:
1) Instanciate a xxxDataManager object that access the database and
contains the rows to display to the Form or Datasheet modules.
Currently there are three way to access the database: plain sql +
DBI, Rose::DB::Object, and DBIx::Class
2) Instanciate a Gtk2::GladeXML object 3) Instanciate a
Gtk2::Ex::Linker::Form object or a Gtk2::EX::Linker::Datasheet that
displays the data from the DataManager using the glade file.
You would then typically connect the buttons to the methods below
to handle common actions such as inserting, moving, deleting, etc.
This module is the same as Gtk2::Ex::DBI and
Gtk2::Ex::Datasheet::DBI except that database access can be made
using plain SQL or the ORM mentioned above. Other ORM could be added
if needed. The developer of Gtk2::Ex::DBI is not interested + has no
time + no needs for including these change in the original modules
unfortunately.
enteredby: RAPPAZF (François Rappaz)
enteredon: Thu May 22 13:54:59 2014 UTC
The resulting entry would be:
Gtk2::Ex::
::DbLinker adpOp Use sql or orm objects to build a gtk2 Gui RAPPAZF
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=87010000_b51c25ade2cd32ea&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=87010000_b51c25ade2cd32ea&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Gtk2%3A%3AEx%3A%3ADbLinker