self-intro: Craig Sebenik
Craig
craig5 at pobox.com
Sat Jul 19 00:18:03 UTC 2008
Max Kanat-Alexander wrote:
> On Fri, 18 Jul 2008 15:14:26 -0700 Craig <craig5 at pobox.com> wrote:
>> - move all of data/params into the DB (???)
>
> I've thought about doing that. I think it has pros and cons,
> but it would probably be nice to have most of it in there. We could
> possibly have some way of specifying whether we use the file backend or
> the DB backend for certain params.
I was thinking that if combined with more CLI controls, then moving away
from static files becomes easier. After all, if you can still edit (and
view) the commands via the CLI, isn't that the same thing.
>> - move the help pages/data into the DB
>
> We generally don't want strings in the DB, it prevents
> localization.
Couldn't that *help* localization?
If you had a column that defined the language, then you could simply put
the necessary translation in a separate row. Assuming you had an admin
app, you could provide a simple table to show which things have been
translated.
For example, let's suppose you had the following in the DB:
field lang help_msg
----- ---- ------------
var1 en-us Some help thing
var2 en-us More help
var1 de (help in German)
var2 fr (help in French)
Then admin page would show something like
US English German French
---------- ------- -------
var1 OK OK MISSING
var2 OK MISSING OK
That would be a far amount of effort with questionable benefits. I think
it makes sense and provides more functionality, but the cost could very
well out-weight the benefits.
>> I have written semi-large apps (~10k lines) all in "OO perl".
>
> Sweet! That's what we do, so you've come to the right place. :-)
That brings up a question... In the past, most of my web apps have had
really simple CGIs and almost all of the logic in the perl modules. So,
my CGI would look something like:
#!/usr/bin/perl
use strict;
use warnings;
use Some::Package;
my $pkg = Some::Package->new().
$pkg->main();
Then, essentially, all of the logic is in one place. This also make it
easier to provide an API because you don't have to worry about
More information about the developers
mailing list