You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(35) |
Nov
(38) |
Dec
(112) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(20) |
Feb
(24) |
Mar
(47) |
Apr
(18) |
May
(28) |
Jun
(17) |
Jul
(15) |
Aug
(40) |
Sep
(14) |
Oct
(5) |
Nov
(26) |
Dec
(31) |
2003 |
Jan
(8) |
Feb
(14) |
Mar
(38) |
Apr
(34) |
May
(33) |
Jun
(32) |
Jul
(24) |
Aug
(9) |
Sep
|
Oct
(20) |
Nov
(43) |
Dec
(22) |
2004 |
Jan
(23) |
Feb
(25) |
Mar
(15) |
Apr
(3) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(3) |
Dec
(5) |
2005 |
Jan
|
Feb
|
Mar
(16) |
Apr
(24) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
(2) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris W. <ch...@cw...> - 2004-03-16 04:52:12
|
A month ago I asked the community for some help in obtaining infrastructure for a new openinteract.org|com website (plus some other stuff) and you responded. Thanks to the generous donations from: * HappyCool/National Auto Sport Association * John Sequeira I've been able to buy a new server and the necessary components to make it go. (It's running my website right now...) It's not a monster, but I expect this machine to be able to handle all the tasks we've laid out for it without too much strain. This weekend I plan to drive it down to Washington, DC to its new home on a rack at Atlantech Online, courtesy of Davison Associates who is offering us free hosting via space on their rack. The infrastructure changes will be phased in over the next few weeks. They will be: * Creating the new openinteract.org|com website This will include the relevant information from the old site plus incorporate the wiki, links to new infrastructure (demos, ViewCVS, issue tracking, mailing lists, etc.) I may need some graphical design help in this area, so if you're game drop me a line. * Using a new issue tracking system This will use JIRA (http://atlassian.com/software/jira/); it's in Java, not Perl, but it rocks and it's free-as-in-beer. (They're smart guys and offer free licenses to opensource projects) Plus I already know it very well :-) * Moving the wiki and other openinteract|spops.sf.net info off sourceforge No explanation needed. * Moving CVS off SourceForge I'll keep anonymous access and a ViewCVS window into the repository. * Moving the mailing lists off SourceForge This is the only part where I think there's a question. I plan on keeping the -announce and -commits mailing lists, but wonder if it might be a good idea to merge the -dev and -help mailing lists. Typically you split them if there's a lot of conflicting traffic. Since we don't have that it might just make sense to create a -users list from the two. What do you think? I'll keep you posted, Chris PS - Yes, we're still accepting donations. They'll initially go to offset some of my higher than expected costs; after that they'll go to hardware upgrades (more memory never killed anyone, nor did bigger hard drives or faster CPUs). -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-03-12 15:08:26
|
On Mar 12, 2004, at 7:28 AM, Alexey Baldov wrote: > I need to work with a database which heavily use stored procedures. As > far as I can understand OpenInteract docs, I should write my own > SPOS-class (something like SPOPS::DBI) to use DB stored procedures to > restore/save objects. Am I right? Is there any better way to do that > (use of DB stored procedures)? Actually you don't need to do this. You don't *have* to use SPOPS to represent your own data, OI just makes it very easy to do so for the standard use cases. You'd be much better served by creating your own class/mini-framework to do this: package My::SP::Object; use OpenInteract::Request; sub new { return bless( $_[1], $_[0] ) } sub fetch { my ( $class, $id ) = @_; my $R = OpenInteract::Request->instance; # If you're not using the default connection, use # my $dbh = $R->db( 'myconnection' ); my $dbh = $R->db; my ( $sth ); eval { $sth = $dbh->prepare( 'exec fetch_my_object ?' ); $sth->execute( $id ); }; if ( $@ ) { ... } my $data = $sth->fetchrow_hashref; $sth->finish; return $class->new( $data ); } Create similar mappings for your other use cases ('create', 'query', 'update', 'remove', etc.) and then just reference the class from your handler: package My::Handler::Foo; use My::SP::Object; use OpenInteract::Request; sub show { my ( $class, $p ) = @_; my $R = OpenInteract::Request->instance; my $id = $R->apache->param( 'id' ); my $object = My::SP::Object->fetch( $id ); return $R->template->handler( {}, { object -> $object }, { name => 'mypkg::mytemplate' } ); } Hope this helps, Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Alexey B. <gua...@fa...> - 2004-03-12 12:39:43
|
Hi! I need to work with a database which heavily use stored procedures. As far as I can understand OpenInteract docs, I should write my own SPOS-class (something like SPOPS::DBI) to use DB stored procedures to restore/save objects. Am I right? Is there any better way to do that (use of DB stored procedures)? -- WBR, Alexey |
From: <cwi...@cw...> - 2004-03-02 19:07:46
|
> Thanks, this patch resolved the problem. I had to modify it to use the > old logging system. I have attached my modified patch, in case anyone > is interested. Whoops! Yeah, forgot about those changes. Thanks for reposting it. Chris |
From: <rlr...@dc...> - 2004-03-02 18:41:40
|
Thanks, this patch resolved the problem. I had to modify it to use the old logging system. I have attached my modified patch, in case anyone is interested. Lee Revell DCANet On Tue, Mar 02, 2004 at 12:20:19PM -0500, Chris Winters wrote: > On Mar 2, 2004, at 11:42 AM, Lee Revell wrote: > >I ran some more tests, and it seems that this behavior only occurs for > >attributes fetched from the persistent store. Once you use the > >automatically generated mutator to change a value then foo_clear works > >as expected: > > You rock. I found the bug in SPOPS::AUTOLOAD and it will be in the next > release, once I take care of Simon's stuff. > > If you want to modify the dist yourself in the meantime a patch to > SPOPS.pm is attached. > > Later, > > Chris > > > -- > Chris Winters > Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-03-02 17:25:39
|
On Mar 2, 2004, at 11:42 AM, Lee Revell wrote: > I ran some more tests, and it seems that this behavior only occurs for > attributes fetched from the persistent store. Once you use the > automatically generated mutator to change a value then foo_clear works > as expected: You rock. I found the bug in SPOPS::AUTOLOAD and it will be in the next release, once I take care of Simon's stuff. If you want to modify the dist yourself in the meantime a patch to SPOPS.pm is attached. Later, Chris |
From: <rlr...@dc...> - 2004-03-02 16:47:28
|
I ran some more tests, and it seems that this behavior only occurs for attributes fetched from the persistent store. Once you use the automatically generated mutator to change a value then foo_clear works as expected: $user = DCA::User->fetch("rlrevell"); print $user->o DCANet $user = DCA::User->fetch("rlrevell"); $user->o_clear; print $user->o DCANet $user = DCA::User->fetch("rlrevell"); $user->o("Foo"); print $user->o Foo $user = DCA::User->fetch("rlrevell"); $user->o("Foo"); $user->o_clear; print $user->o <prints nothing> Hope this helps, Lee On Tue, Mar 02, 2004 at 11:03:40AM -0500, Lee Revell wrote: > On Tue, Mar 02, 2004 at 07:32:01AM -0500, Chris Winters wrote: > > On Mar 1, 2004, at 6:36 PM, Lee Revell wrote: > > >I have an SPOPS::LDAP subclass called DCA::User for which the > > >automatically generated $FIELD_clear() methods do not seem to > > >work. Here is an example (I have overridden as_string from > > >SPOPS to produce LDIF output): > > > > > >perl -MDCA::Users -e 'my $user = DCA::User->fetch("rlrevell"); > > >$user->_o_clear; print $user->as_string' > > > > A few thoughts: > > > > a) that should be '$user->o_clear', but it might be a copy-n-paste typo? > > > > This is actually a typo in the SPOPS documentation (from > SPOPS::Manual::Object): > > Instead call the '_clear' method associated with a fieldname: > > $user->_m_name_clear; > > This explicitly sets the value to undef. > > I have tried it both ways with negative results. > > > b) do you have anything else in your ISA that uses AUTOLOAD that might > > catch this first call to 'o_clear' (or 'foo_clear')? > > > > Not that I can tell. Here is a snippet of my SPOPS config: > class => 'DCA::User', > isa => [ qw/ DCA::LDAPConnect SPOPS::LDAP/ ], > rules_from => [ qw/ DCA::ValidateUser / ], > code_class => [ qw/ DCA::LDAPUser / ], > > DCA::LDAPConnect handles LDAP connection management and > DCA::ValidateUser is where my rulesets live. Currently there is just > one method in there that is run as a pre_save_handler and updates > dependent attributes (like the home directory and GECOS field) when > primary attributes, like o(rganization), change. > > DCA::LDAPUser just contains an as_string method that prints LDIF output. > > I have not defined an AUTOLOAD method of my own anywhere. > > > c) are you using SPOPS 0.80? > > > > Yes. > > > d) do all the tests n t/00_base.t pass (esp. tests 48-50)? > > > > As far as I can tell, yes: > > PERL_DL_NONLAZY=1 /local/bin/perl5.8.0 "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00_base.....................ok > t/01_tie......................ok > t/02_tie_strict...............ok > etc. > > > e) I assume that 'use'ing DCA::Users invokes SPOPS::Initialize? > > > > Yes. All other SPOPS functionality works fine; I can fetch a user, > update attributes, and save the user fine. It's just the foo_clear > methods that don't seem to work. > > > f) does '$user->{o} = undef' work as expected? > > > > Yes; the resulting object has the o set to undef. The problem is that > when I then go to call $user->save, it tries to save the user with the o > attribute set to undef, which causes a schema violation in the case that > the user is modified to an objectclass that does not allow the attribute > in question. > > The specific problem I am having is that when a user is modified from an > account type that has dialup access to one that does not, I have a > dcanethours field that needs to be deleted, as this field specifies the > number of hours per month a user is allowed to be dialed in. > > Thanks for your help; SPOPS has been invaluable to this project. > > > Chris > > > > -- > > Chris Winters > > Creating enterprise-capable snack systems since 1988 > > |
From: <rlr...@dc...> - 2004-03-02 16:08:42
|
On Tue, Mar 02, 2004 at 07:32:01AM -0500, Chris Winters wrote: > On Mar 1, 2004, at 6:36 PM, Lee Revell wrote: > >I have an SPOPS::LDAP subclass called DCA::User for which the > >automatically generated $FIELD_clear() methods do not seem to > >work. Here is an example (I have overridden as_string from > >SPOPS to produce LDIF output): > > > >perl -MDCA::Users -e 'my $user = DCA::User->fetch("rlrevell"); > >$user->_o_clear; print $user->as_string' > > A few thoughts: > > a) that should be '$user->o_clear', but it might be a copy-n-paste typo? > This is actually a typo in the SPOPS documentation (from SPOPS::Manual::Object): Instead call the '_clear' method associated with a fieldname: $user->_m_name_clear; This explicitly sets the value to undef. I have tried it both ways with negative results. > b) do you have anything else in your ISA that uses AUTOLOAD that might > catch this first call to 'o_clear' (or 'foo_clear')? > Not that I can tell. Here is a snippet of my SPOPS config: class => 'DCA::User', isa => [ qw/ DCA::LDAPConnect SPOPS::LDAP/ ], rules_from => [ qw/ DCA::ValidateUser / ], code_class => [ qw/ DCA::LDAPUser / ], DCA::LDAPConnect handles LDAP connection management and DCA::ValidateUser is where my rulesets live. Currently there is just one method in there that is run as a pre_save_handler and updates dependent attributes (like the home directory and GECOS field) when primary attributes, like o(rganization), change. DCA::LDAPUser just contains an as_string method that prints LDIF output. I have not defined an AUTOLOAD method of my own anywhere. > c) are you using SPOPS 0.80? > Yes. > d) do all the tests n t/00_base.t pass (esp. tests 48-50)? > As far as I can tell, yes: PERL_DL_NONLAZY=1 /local/bin/perl5.8.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00_base.....................ok t/01_tie......................ok t/02_tie_strict...............ok etc. > e) I assume that 'use'ing DCA::Users invokes SPOPS::Initialize? > Yes. All other SPOPS functionality works fine; I can fetch a user, update attributes, and save the user fine. It's just the foo_clear methods that don't seem to work. > f) does '$user->{o} = undef' work as expected? > Yes; the resulting object has the o set to undef. The problem is that when I then go to call $user->save, it tries to save the user with the o attribute set to undef, which causes a schema violation in the case that the user is modified to an objectclass that does not allow the attribute in question. The specific problem I am having is that when a user is modified from an account type that has dialup access to one that does not, I have a dcanethours field that needs to be deleted, as this field specifies the number of hours per month a user is allowed to be dialed in. Thanks for your help; SPOPS has been invaluable to this project. > Chris > > -- > Chris Winters > Creating enterprise-capable snack systems since 1988 > |
From: Chris W. <ch...@cw...> - 2004-03-02 12:37:08
|
On Mar 1, 2004, at 6:36 PM, Lee Revell wrote: > I have an SPOPS::LDAP subclass called DCA::User for which the > automatically generated $FIELD_clear() methods do not seem to > work. Here is an example (I have overridden as_string from > SPOPS to produce LDIF output): > > perl -MDCA::Users -e 'my $user = DCA::User->fetch("rlrevell"); > $user->_o_clear; print $user->as_string' A few thoughts: a) that should be '$user->o_clear', but it might be a copy-n-paste typo? b) do you have anything else in your ISA that uses AUTOLOAD that might catch this first call to 'o_clear' (or 'foo_clear')? c) are you using SPOPS 0.80? d) do all the tests n t/00_base.t pass (esp. tests 48-50)? e) I assume that 'use'ing DCA::Users invokes SPOPS::Initialize? f) does '$user->{o} = undef' work as expected? Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: <And...@Be...> - 2004-03-02 08:50:15
|
Hi, What is the DN of the object ? I do not think, that you can clear container objects from the user. Did = you try a plain attribute like sn ? Later, Andreas -----Urspr=FCngliche Nachricht----- Von: rlr...@dc... [mailto:rlr...@dc...]=20 Gesendet: Dienstag, 2. M=E4rz 2004 00:37 An: ope...@li... Cc: Phil Banh Betreff: [Openinteract-help] SPOPS::LDAP _clear not working Hello, I have an SPOPS::LDAP subclass called DCA::User for which the = automatically generated $FIELD_clear() methods do not seem to=20 work. Here is an example (I have overridden as_string from=20 SPOPS to produce LDIF output): perl -MDCA::Users -e 'my $user =3D DCA::User->fetch("rlrevell");=20 $user->_o_clear; print $user->as_string' uid: rlrevell userpassword: {crypt}********** dcanetuserclass: dcanet dcanetaccounttype: pppsh dcanethours: 0 cn: R. Lee Revell sn: Revell givenname: R. Lee mail: rlr...@dc... dcanetpasid: dcanetbillingid: DCAN001 o: DCANet seealso: objectclass: posixAccount objectclass: top objectclass: shadowAccount objectclass: dcanetShellAccount objectclass: person objectclass: organizationalPerson objectclass: radiusProfile objectclass: dcanetDialupAccount objectclass: dcanetAccount objectclass: dcanetPostofficeAccount objectclass: inetOrgPerson uidnumber: 11337 gidnumber: 5000 gecos: R. Lee Revell,DCANet,, homedirectory: /home/rlrevell loginshell: /local/bin/bash shadowlastchange: 11548 shadowmin: 0 shadowmax: 99999 shadowwarning: 7 shadowinactive: shadowexpire: shadowflag: The o: line should be blank, correct? I have also tried this with an SPOPS::DBI subclass; I am also unable to = delete an attribute from an object once I have set it. Lee Revell DCANet ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick _______________________________________________ openinteract-help mailing list ope...@li... https://lists.sourceforge.net/lists/listinfo/openinteract-help |
From: <rlr...@dc...> - 2004-03-01 23:41:33
|
Hello, I have an SPOPS::LDAP subclass called DCA::User for which the automatically generated $FIELD_clear() methods do not seem to work. Here is an example (I have overridden as_string from SPOPS to produce LDIF output): perl -MDCA::Users -e 'my $user = DCA::User->fetch("rlrevell"); $user->_o_clear; print $user->as_string' uid: rlrevell userpassword: {crypt}********** dcanetuserclass: dcanet dcanetaccounttype: pppsh dcanethours: 0 cn: R. Lee Revell sn: Revell givenname: R. Lee mail: rlr...@dc... dcanetpasid: dcanetbillingid: DCAN001 o: DCANet seealso: objectclass: posixAccount objectclass: top objectclass: shadowAccount objectclass: dcanetShellAccount objectclass: person objectclass: organizationalPerson objectclass: radiusProfile objectclass: dcanetDialupAccount objectclass: dcanetAccount objectclass: dcanetPostofficeAccount objectclass: inetOrgPerson uidnumber: 11337 gidnumber: 5000 gecos: R. Lee Revell,DCANet,, homedirectory: /home/rlrevell loginshell: /local/bin/bash shadowlastchange: 11548 shadowmin: 0 shadowmax: 99999 shadowwarning: 7 shadowinactive: shadowexpire: shadowflag: The o: line should be blank, correct? I have also tried this with an SPOPS::DBI subclass; I am also unable to delete an attribute from an object once I have set it. Lee Revell DCANet |
From: Ray Z. <rz...@co...> - 2004-02-18 14:56:40
|
On Feb 18, 2004, at 8:41 AM, Chris Winters wrote: > On Feb 16, 2004, at 6:32 PM, Vsevolod (Simon) Ilyushchenko wrote: >>> Actually, no. I used the three classes X, A and B just to define >>> some minimal notation that I could use to talk about all of the >>> above relationships. For simple one-to-one and one-to-many >>> relationships, just look at X and A (pretend you don't have B). See >>> the first 3 examples at the end of the first post. >> >> Gotcha. Chris, what do you think? With my current amount of free time >> I could expect to implement this by summer. > > I am so there. Working on OI and my day job leaves little time > (tuits!) to do SPOPS work except obvious bugfixes. So make it happen, > and if you need anything from me please let me know. > > Chris Of course, I'm happy to help out with refinements to the design and with testing as time allows. I expect there will be more discussion as Simon's implementation progresses ... should we move that to the dev list? Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 fax: (815) 377-3932 |
From: Chris W. <ch...@cw...> - 2004-02-18 13:46:26
|
On Feb 16, 2004, at 6:32 PM, Vsevolod (Simon) Ilyushchenko wrote: >> Actually, no. I used the three classes X, A and B just to define some >> minimal notation that I could use to talk about all of the above >> relationships. For simple one-to-one and one-to-many relationships, >> just look at X and A (pretend you don't have B). See the first 3 >> examples at the end of the first post. > > Gotcha. Chris, what do you think? With my current amount of free time > I could expect to implement this by summer. I am so there. Working on OI and my day job leaves little time (tuits!) to do SPOPS work except obvious bugfixes. So make it happen, and if you need anything from me please let me know. Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-02-17 03:10:44
|
As you may have noticed the openinteract.com|org sites have been down for some time now. They're currently hosted by a company I used to work for but they're apparently having some problems, and fixing it is understandably a very low priority for them. I really want to get things up and running again but not depend on anyone else -- SF is good (and free!) but has some lag/performance problems, plus I can't install mod_perl on it. So I've planned to buy a decent rackmount server and take advantage of an offer (from the current host) for free bandwidth. But my budgetary constraints have put these plans on hold for some time. Recently someone on the mailing list pinged me and said they'd be happy to help out with some cash toward a new server and I figured maybe some other folks would too. So here's your chance (or your company's chance) to help out OpenInteract! Anything you contribute will go directly toward buying a 1U rackmount server that will run: * OI.org/com websites * OI wiki * CVS for OI, OI2 and SPOPS and some other CPAN projects * OI2 demo site * Also some of my personal stuff (SMTP/IMAP/website) You wouldn't get any sort of administrative say over the server but if you're a CVS committer you'd probably get an account. And if you're active on the mailing list it would be easy to setup a simple email forwarding service if you need it (fo...@op... may look better than fo...@ya...). (That's just off the top of my head, I don't know how this stuff normally goes.) If you're interested just go to paypal.com and send money to 'ope...@cw...'. If you do let me know in the note if it's okay to put your name on a 'Thank You!' page I'll create. If there's any objection to paypal let me know and we can work something else out. Thanks! Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2004-02-16 23:36:40
|
> Obviously, I'm biased :-), but I would rather see effort put into movin= g=20 > to this more general structure rather than adding onto the existing mor= e=20 > limited one. I'm with you. I have already been bitten by the problem of manually=20 managing the order of saving members of composite objects (ie, has_a=20 members have to be saved before the parent object, but links_to members=20 have to be saved after it) - I'd rather specify it in the configuration. > Actually, no. I used the three classes X, A and B just to define some=20 > minimal notation that I could use to talk about all of the above=20 > relationships. For simple one-to-one and one-to-many relationships, jus= t=20 > look at X and A (pretend you don't have B). See the first 3 examples at= =20 > the end of the first post. Gotcha. Chris, what do you think? With my current amount of free time I could expect to implement this by summer. Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Ray Z. <rz...@co...> - 2004-02-16 22:14:09
|
On Feb 16, 2004, at 4:26 PM, Vsevolod (Simon) Ilyushchenko wrote: > >> At the time, Chris seemed pretty interested in eventually having some >> variation of this design included in SPOPS. I've implemented only >> small pieces of it for my own use and I suspect it just that on >> Chris's end it just came down to a shortage of tuits. > > [Sun Feb 16 16:20:37 2004] [error] [client 143.48.3.90] error parsing > "tuits". Word not in dictionary due to foreign classes in the > inheritance tree. :-) Right, sorry. I'm not totally sure of the history of that "term". You often hear someone say, they'll do something when they "get around to it", meaning when they find the time. I imagine someone, somewhere changed it to "get a round tuit" so they could blame their failure to complete some task on the lack of "round tuits". Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 fax: (815) 377-3932 |
From: Ray Z. <rz...@co...> - 2004-02-16 22:05:23
|
On Feb 16, 2004, at 4:26 PM, Vsevolod (Simon) Ilyushchenko wrote: >> If I interpret correctly what it is that you want, you're looking >> for the ability to define a relationship that would automatically >> generate methods in your "software project" object to fetch the >> corresponding list of bugs, for example. > > And vice versa, I want to be able to fetch the project object that a > bug object belongs to. Right, these are the forward and reverse direction fetching methods I talk about. I'd have to dig back into the details again, but I think my design assumes you want one or the other, but not both. That could probably be added. > Chris actually sent me those links a while ago. This approach may be > more than I bargained for, but if that's the right solution, I could > take a stab at it, provided Chris agrees. Obviously, I'm biased :-), but I would rather see effort put into moving to this more general structure rather than adding onto the existing more limited one. > However, after reading your posts it seems to me that you only talk > about a many-to-many relationship: you always have X between A and B. > I really want to have a system that can handle simple cases of > one-to-one and one-to-many relationships with only two tables/objects, > as having three tables is inconvenient from the DBA's point of view > and should be avoided when possible. Actually, no. I used the three classes X, A and B just to define some minimal notation that I could use to talk about all of the above relationships. For simple one-to-one and one-to-many relationships, just look at X and A (pretend you don't have B). See the first 3 examples at the end of the first post. The proposed structure just attempts to handle all of the relationships using a single generalized has-a configuration: * one-to-one: X has-a A, X is the main object with a method to fetch it's corresponding A * one-to-many: X has-a A, A is the main object, with a method to fetch it's many X's * many-to-many: X has-a and X has-B, X is a linking object between A and B, and A has a method to fetch all of the linked B's (or vice versa). I hope this helps. Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 fax: (815) 377-3932 |
From: Vsevolod (S. I. <si...@cs...> - 2004-02-16 21:30:37
|
Ray, > When you talk about a "has-many" relationship, I think you are just > looking at the other end of a has-a relationship, right? To use your=20 > example, a bug has-a project that it belongs to. If I interpret=20 > correctly what it is that you want, you're looking for the ability to=20 > define a relationship that would automatically generate methods in your= =20 > "software project" object to fetch the corresponding list of bugs, for=20 > example. And vice versa, I want to be able to fetch the project object that a bug=20 object belongs to. > If so, I invested some effort a few years ago in defining a generalized= =20 > relationship configuration syntax which handles this case (as well as=20 > the has-a and links-to). You can find my proposal in the=20 > openinteract-dev archives. The first one [1], posted on 7/3/01 is quite= =20 > long and spells things out in pretty much detail. The second [2] was=20 > posted in Jan 2002 and includes some additions and updates to the=20 > proposed design. Chris actually sent me those links a while ago. This approach may be=20 more than I bargained for, but if that's the right solution, I could=20 take a stab at it, provided Chris agrees. However, after reading your posts it seems to me that you only talk=20 about a many-to-many relationship: you always have X between A and B. I really want to have a system that can handle simple cases of=20 one-to-one and one-to-many relationships with only two tables/objects,=20 as having three tables is inconvenient from the DBA's point of view and=20 should be avoided when possible. > At the time, Chris seemed pretty interested in eventually having some=20 > variation of this design included in SPOPS. I've implemented only small= =20 > pieces of it for my own use and I suspect it just that on Chris's end i= t=20 > just came down to a shortage of tuits. [Sun Feb 16 16:20:37 2004] [error] [client 143.48.3.90] error parsing=20 "tuits". Word not in dictionary due to foreign classes in the=20 inheritance tree. Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Chris W. <ch...@cw...> - 2004-02-16 16:01:45
|
On Feb 16, 2004, at 8:31 AM, Teemu Arina wrote: >> Along with this discussion, I think it would be a good idea to include >> a 'translate' package with OI2 that allows web-based editing of the >> translation files. It might not be as slick as kbabel, but it will >> always be there and will hopefully take care of the most common tasks. > > Great idea. I think that would make the translation process very easy. > A new > translator could start immediatly still while the interest lasts. > ...and > doesn't even require downloading the sources or anything. Right. Plus they could do it from anywhere. > I was also thinking how one could translate programs while using it but > technically implementing it might be too much of work. Translation > process > usually requires the translator to see the context in order to come up > with a > correct translation. It's a small implementation detail, but one thing I planned on doing: create a new logging category 'OI2.TRANSLATE'. If set to 'DEBUG' then with every message printed out we prepend the message key. So when you ask for: MSG( 'user.welcome', user.full_name ) You get something like: [user.welcome] Welcome to my website Chris Winters! or even to be more explicit where the boundaries are: [user.welcome Welcome to my website Chris Winters!] Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Ray Z. <rz...@co...> - 2004-02-16 15:52:21
|
On Feb 15, 2004, at 8:45 PM, Vsevolod (Simon) Ilyushchenko wrote: > I was wondering if it's possible to implement in SPOPS "has_many" > relationship (in addition to "has_a" and "links_to"). Obviously, it > can be done through "links_to", but at the cost of an additional > database table which makes things more cumbersome. For things like a > bug database, where one software project references several bugs, but > no bugs belong to more than one software project, "links_to" is an > overkill. If the id of the owner is stored in a field of the owned > object, the implementation can be similar to the already existing code > for the other relationships. When you talk about a "has-many" relationship, I think you are just looking at the other end of a has-a relationship, right? To use your example, a bug has-a project that it belongs to. If I interpret correctly what it is that you want, you're looking for the ability to define a relationship that would automatically generate methods in your "software project" object to fetch the corresponding list of bugs, for example. If so, I invested some effort a few years ago in defining a generalized relationship configuration syntax which handles this case (as well as the has-a and links-to). You can find my proposal in the openinteract-dev archives. The first one [1], posted on 7/3/01 is quite long and spells things out in pretty much detail. The second [2] was posted in Jan 2002 and includes some additions and updates to the proposed design. At the time, Chris seemed pretty interested in eventually having some variation of this design included in SPOPS. I've implemented only small pieces of it for my own use and I suspect it just that on Chris's end it just came down to a shortage of tuits. Assuming I've interpreted correctly what you want, I would encourage you to have a look at what I proposed. It would be really wonderful if it addresses what you need and you actually have some time to implement it and get it incorporated officially into SPOPS. [1] http://www.geocrawler.com/archives/3/8393/2001/7/0/6095774/ [2] http://www.geocrawler.com/archives/3/8393/2002/1/0/7464826/ Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 fax: (815) 377-3932 |
From: Teemu A. <te...@io...> - 2004-02-16 13:44:50
|
> Along with this discussion, I think it would be a good idea to include > a 'translate' package with OI2 that allows web-based editing of the > translation files. It might not be as slick as kbabel, but it will > always be there and will hopefully take care of the most common tasks. Great idea. I think that would make the translation process very easy. A new translator could start immediatly still while the interest lasts. ...and doesn't even require downloading the sources or anything. I was also thinking how one could translate programs while using it but technically implementing it might be too much of work. Translation process usually requires the translator to see the context in order to come up with a correct translation. - Teemu |
From: Vsevolod (S. I. <il...@cs...> - 2004-02-16 01:48:53
|
Hi, I was wondering how people here manage relationships with multiple=20 girlfr... Oops, wrong mailing list. :) I was wondering if it's possible to implement in SPOPS "has_many"=20 relationship (in addition to "has_a" and "links_to"). Obviously, it can=20 be done through "links_to", but at the cost of an additional database=20 table which makes things more cumbersome. For things like a bug=20 database, where one software project references several bugs, but no=20 bugs belong to more than one software project, "links_to" is an=20 overkill. If the id of the owner is stored in a field of the owned=20 object, the implementation can be similar to the already existing code=20 for the other relationships. Chris, if you think it's a good idea, I could implement it. I would only=20 request from you pointers to all the places that should be modified. Thanks, Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Chris W. <ch...@cw...> - 2004-02-14 18:05:41
|
On Feb 13, 2004, at 6:30 PM, Teemu Arina wrote: ... > I for example find Kbabel brilliant for that job: > http://i18n.kde.org/tools/kbabel/ Along with this discussion, I think it would be a good idea to include a 'translate' package with OI2 that allows web-based editing of the translation files. It might not be as slick as kbabel, but it will always be there and will hopefully take care of the most common tasks. What do you think? Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-02-14 18:01:22
|
Okay, I've thought about this a little bit. Keep in mind that I'm still open to different approaches as you read this, and the rambling nature of the email reflects it. (Lots of thinking out loud...) On Feb 13, 2004, at 6:30 PM, Teemu Arina wrote: ... > because once you translated the string from english to some other > language, > you don't see the original english string anywhere unless you put it in > comments or look for it in the orginial english translation file. My > question > for opaque IDs is: how do you easily improve a translation if the keys > are > not based on the base language (comparing original to current, making > modifications...)? > > Another thing was the self-documenting aspects of having the base > language key > in the code. Consider for example: > > $lh->maketext( 'Hello [_1], today is [_2]', $username, $date ); > > vs: > > $lh->maketext( 'desktop.welcome', $username, $date ); I agree with your points, but my three main objections to using the base language as the key are: * What do you do with long strings? (One or more sentences) * What happens when you change the base language text? * Many of the base language keys will be quite long. For the first objection I guess you could just use the first part of it the long string. This kind of eliminates the benefit of using the base language as key, it's not used as often. The second objection seems like a big problem. How often does it happen? Not sure. But like I mention in the manual doc it seems very brittle. (Using your suggestion from later in the email -- syncing things up with a script -- seems like an interesting idea. But still work...) The third one seems like it would be very annoying for authors. You have more experience with this, granted. I'm really trying to make it easy to do the right thing for people who want to distribute their applications. > Now another point: It is very common that some projects just never > have 100% > complete translations and it is common that translation files lacking > latest > improvements have some required keys missing. In that case I would > suggest > the logic: > > 1. look for requested key from the requested translation (e.g. spanish) > 2. If not found, look for requested key from the default translation > (english) > 3. If not found, produce error Locale::Maketext takes care of this. In fact it will do language differentiation (or whatever the term is) as well. For instance if I'm creating customizations for Mexican Spanish I can create a file: mymessages-es_mx.msg Any messages not found there will look in: mymessages-es.msg And any messages not found there will look in the default language, which is normally English: mymessages-en.msg But you can also present to L::M a series of languages to try out. OI2 will pull the browser preferences ('Accept-Language' header) if they're available so if your preference is Spanish then Portuguese it will try those before the default. > If you consider using base language as keys, consider working around > the > global key problem (if I understood correctly, the keys have to be > unique, > even over package boundaries). For example, Maketext objects could be > initialized for each package, so that the key name-space is unique for > every > package. Very useful, in my opinion.. you never know what strings or > keys > some other project will use. This is true but... (thinking out loud here) Well, my initial impression is that this is getting too complicated. But perhaps not. If we think of a package as a distributable application then there's really no reason that a package would use the keys of another package, right? In fact we could probably assume that the only other keys a package needs are some global keys for text used all over the place (standard button text, copyright, disclaimers, etc.). Okay, I think I could go along with this. I would like the option of putting a package's keys in the global namespace for applications using multiple packages. But the default should be that when requesting a message key you only look in your package's space and the global space if it's not found there. The only tricky part with this is now we have to let OI2 know what package we're currently in. This isn't so hard for templates or even actions. But normal perl classes will probably be more difficult -- that is, if I want to emit an error message from my class OpenInteract2::User: return $lh->maketext( 'error.password_mismatch' ); Then how will OI know to look into the OI2::I18N::base_user package for the key? ... Maybe at server startup we can do a mapping of all keys to the package they were read from and in cases of ambiguity refer to it. We can also create a wrapper for the maketext call that would allow another parameter to nail down the right package. (This wrapper idea might come in handy to use different message storage schemes, more below...) >> these use a slightly modified Java message bundle syntax (easy to >> write!) > > In my opinion you should use gettext (PO files), because there are easy > translation project management tools available for programs using > gettext. > I for example find Kbabel brilliant for that job: > http://i18n.kde.org/tools/kbabel/ ... (lots more interesting stuff about kbabel clipped) This is a good idea -- I would like to make it possible to use tools like this. But I don't want to get rid of the benefits of using plaintext files as well. After a little investigation it looks like the Locale::Maketext::Lexicon module (from another superhero, Autrijus) solves this problem for us. (Hooray for CPAN!) It seems to allow you to read in .po/.mo files for the Locale::Maketext lexicon. It also looks like it would be no problem to adapt it to our OI2::I18N::mypackage naming scheme from above. (That is, keeping every package separate.) It seems to even translate the gettext functions %1 %2 to [_1] [_2] used by maketext. Sweet! > Another point why to use base language strings as keys here: you could > easily > write a script that goes through your script, extracts strings from > commands > like $lh->maketext( 'Hello [_1], today is [_2]', $username, $weekday ) > and > generate a translation file for you. This way you could just improve > the > english translation in your code and then generate an up to date > version of > the translation file. True, but I think most uses of the messages will be in templates where it's much more difficult to parse groups of text out into individual entries. > Also, gnu gettext utils also contain some really useful tools for > development > like msgfmt. It is helpful for checking translation file syntax, > produce some > statistics etc. msgcmp compares two .po files finding differencies like > missing msgid strings. Very useful. > Hope this helps, Immensely. Thanks for the great ideas and time it took to put them together. Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-02-14 01:07:26
|
On Feb 13, 2004, at 6:30 PM, Teemu Arina wrote: > I used to work for a project that had 20 translations. We first used > opaque > IDs for identifying the strings. We soon noticed it was hard to > translate, > because once you translated the string from english to some other > language, ... You've given me a lot to think about. Thanks a lot for the ideas and experience. Even if it means maybe undoing some work... :-) More soon... Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |