[Catalyst] Announce: Instant AJAX web front-end for DBIx::Class

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Wed Aug 20 14:58:15 BST 2008


Hi Oliver!

You're module is GREAT!
I've done something similar years ago in Embperl which takes a table name and discovers its columns and datatypes and uses a helper table for storing the relationships.
Last week I finally started porting it to Catalyst and though about doing something your module does, so it’s a massive time saver for me, thanks!

I've installed 0.25 some hours ago and got it working after using dumper to add the datatype informations to my dbic model classes (I started writing them at a time when there was no DBIx::Class::Schema::Loader, dbic was at 0.01) and was in no need for this metadata till now.

I've only stumbled across two problems at the moment:

1) the use of c.extjs2 in the template which needed changing to c.config.extjs2
2) [error] Caught exception in MyApp::Model::LFB::Metadata->process "Use of uninitialized value in exists at /usr/local/share/perl/5.8.8/CatalystX/ListFramework/Builder/Model/Metadata.pm line 137."
which I fixed by changing the line to:
$ti->{cols}->{$col}->{extjs_xtype} = $xtype_for{ $info->{data_type} }
            if (defined $info && exists $info->{data_type} && exists $xtype_for{ $info->{data_type} });

Feel free to mail me off-list for help or other things about your module!

-Alex

-----Original Message-----
From: Oliver Gorwits [mailto:oliver.gorwits at oucs.ox.ac.uk]
Sent: Wednesday, August 20, 2008 1:15 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Announce: Instant AJAX web front-end for DBIx::Class

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Moritz,

Moritz Onken wrote:
| Great goob! A few comments:
|
| * Is it possible to add this as a plugin to an existing catalyst
|  application (as an admin panel)?

I've just released a new version of LFB (0.25) to the CPAN, which
has much better support for relocation.

When it arrives on CPAN, read the documentation to see how to set a
path under which the LFB application will run. You can then use it
as a regular Catalyst "Plugin" to an application.

For now, you'll still have to set the DBIx::Class Model
configuration separately for LFB, which will mean some duplication
in your configuration. I'll look into fixing that later.

| * Why do you not use the filter
| abilities of extjs for the grid? they are much more convenient

The ExtJS filter works locally on data already retrieved by the
browser. What I am doing is sending search parameters to the web
server via AJAX, which is something different. Sorry if I've
misunderstood you.

| * Did you think about prodiving a
| different interface for selecting the items depending on the
| number of possible values?

I think there are a few different ideas, here, but essentially the
application doesn't know how many possible values there are when it
generates the user interface...

| What I'm saying: If you specify the
| color of a item (red, blue, and green) and would be great to have
| a radiogroup to select it.

LFB does not yet have support for enumerated types as you find in
some databases such as PostgreSQL - it's something I am considering
adding support for, though. That would address your red/green/blue
use case, I suppose.

| If there are many (>10) It would be
| great to have a select box. If there are even more (>1000) an
| autocomplete field would be great.

The combobox used for has_many relations will "autosuggest" if you
type in (I think) four characters, then wait a bit. In v0.25 I've
fixed this to be a case insensitive search. It's horribly
inefficient though, as it's filtering against all records in the
related table (specifically, their display_name or stringification).
But then LFB isn't designed for speed, but usefulness.


Many thanks indeed for the feedback :-)

regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIq1PW2NPq7pwWBt4RAiyyAKC8qnPfY04ZIemihFe9hgqxi+rlBACgpef2
DKwDa4ly6aVKJHCdLbB5AAM=
=r+sm
-----END PGP SIGNATURE-----

_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*




More information about the Catalyst mailing list