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...> - 2003-06-07 01:06:24
|
Greg Fenton wrote: > --- Chris Winters <ch...@cw...> wrote: >>>maybe one of these? >> >>cool! oi2.gif looks good to me, but I might not have the best eye... > > Where? Where??!?! :-) Whoops -- since Chris cc'd me directly I got the images but I guess the list server stripped them for everyone else. I've created a page with all the logos: http://openinteract.sourceforge.net/logos/ If you've got ideas email them to me and I'll post them as well. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Greg F. <gre...@ya...> - 2003-06-07 00:52:43
|
--- Chris Winters <ch...@cw...> wrote: > > > > maybe one of these? > > cool! oi2.gif looks good to me, but I might not have the best eye... > Where? Where??!?! :-) greg_fenton. ===== Greg Fenton gre...@ya... __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |
From: Chris W. <ch...@cw...> - 2003-06-06 20:13:29
|
Chris McDaniel wrote: > maybe one of these? cool! oi2.gif looks good to me, but I might not have the best eye... Chris |
From: Chris W. <ch...@cw...> - 2003-06-06 19:24:36
|
It would be nifty to get an OI | powered button, with the 'OI' like in the logo, formatted like the collection on this page: http://gtmcknight.com/buttons/index.php Hey, POE and HTML::Mason have buttons, we should too! Chris |
From: Chris W. <ch...@cw...> - 2003-06-02 23:34:10
|
Greg Fenton wrote: > Maybe I just missed it, but where in the introduction or installation > docs is Bundle::OpenInteract mentioned for Win32? ... good question. It should probably be mentioned for all platforms. > I have spent, well, time trying to document all of the PPMs and CPAN > modules needed to be installed based on the docs I came across on > www.openinteract.org and openinteract.sourceforge.net. I still can't > find any reference to Bundle::OpenInteract. Sorry about that. These things slip through the cracks. > Would anyone mind if I enhance the Win32 TWiki to at least mention this > module? Absolutely! That's why it's a wiki :-) One suggestion: a OpenInteractInstallation page might be more effective Bundle::OI works everywhere. Later, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Greg F. <gre...@ya...> - 2003-06-02 20:48:15
|
Maybe I just missed it, but where in the introduction or installation docs is Bundle::OpenInteract mentioned for Win32? I have spent, well, time trying to document all of the PPMs and CPAN modules needed to be installed based on the docs I came across on www.openinteract.org and openinteract.sourceforge.net. I still can't find any reference to Bundle::OpenInteract. I stumbled onto it when searching for some more articles on OpenInteract... If it is in the docs, then bad on me. Would anyone mind if I enhance the Win32 TWiki to at least mention this module? http://openinteract.sourceforge.net/cgi-bin/twiki/view/OI/ActivePerlPackages Thanks! greg_fenton. ===== Greg Fenton gre...@ya... __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |
From: Chris W. <ch...@cw...> - 2003-06-01 16:56:31
|
Teemu wrote: > I would like to ask one question about the documentation in > oi_docs/configuration.html: > ... > From this I understood I could use the name of the object (theme) to define a > 'has-a' relationship between objects. Well, this doesn't seem to work? > Instead, I have to use OpenInteract::Theme. Is this an error in the > documentation? Same thing with links_to. (oi_docs/developer.html seems to be > ok) The 'configuration.html' docs are incorrect. You need to use a class name instead of an object name. The primary reference for SPOPS information is the SPOPS documentation -- see 'perldoc SPOPS::Manual::Relationships' or visit the online docs [1] for the definitive word. Sorry for the confusion. The docs have been updated -- thanks for the pointer! Chris [1] http://spops.sourceforge.net/doc/SPOPS/Manual/Relationships.shtml -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Teemu <te...@io...> - 2003-06-01 16:39:47
|
Hi, I would like to ask one question about the documentation in oi_docs/configuration.html: [QUOTE] has_a (\%) (optional) ... To retrieve an object that is using the same key field name, just refer to the name of the object. .... has_a => { theme => [ 'theme_id' ], }, [/QUOTE] From this I understood I could use the name of the object (theme) to define a 'has-a' relationship between objects. Well, this doesn't seem to work? Instead, I have to use OpenInteract::Theme. Is this an error in the documentation? Same thing with links_to. (oi_docs/developer.html seems to be ok) -- Sincerely, Teemu Arina http://www.mimerdesk.org |
From: Chris W. <ch...@cw...> - 2003-06-01 15:32:20
|
Greg Fenton wrote: > Does OI work on Apache 2/mod_perl 2? Unfortunately no, and it probably won't until a port for Apache::Request is done for mp2. It's highly dependent on it for getting the parameters. OpenInteract2, which I hope to have a beta for before YAPC::NA in a couple weeks, will support Apache2/mod_perl 2. It already supports Apache1/mod_perl 1, CGI and a standalone LWP web server. I haven't written the code to do the mp2 part yet but it's easy and pluggable. I'm also hoping to crib it from someone else to do the least amount of work possible :-) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Greg F. <gre...@ya...> - 2003-05-31 03:51:13
|
Does OI work on Apache 2/mod_perl 2? I just upgraded one of my machines to RH 8.0 which ships with Apache 2.0 and would like to try out OI on that machine. Thanks in advance, greg_fenton. ===== Greg Fenton gre...@ya... __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |
From: Teemu <te...@io...> - 2003-05-30 16:51:36
|
Thanks for the fast reply, Chris. Your explanation was right and now I understand a little bit more about OI. Never thought it would be a scoping issue. I'm using apache->handler now, moved the BLOCK to a file and I'm calling it with the package name specified. I'll be working with OI the next couple of months to build a dynamic application which heavily utilizes XHTML and CSS. If everything goes well and I feel comfortable with OI, I'm going to port MimerDesk (great functionality, crappy core. See link below) to work over OpenInteract (awesome core). Expect more questions later =) Thanks. > Well, this makes sense. The OI.comp() call is treated like a normal > subroutine -- it has no idea of the Template scope from which it was > called. (Technically it does, but not that you can use.) -- Sincerely, Teemu Arina http://www.mimerdesk.org |
From: Cornel G. <cg...@cs...> - 2003-05-30 11:07:54
|
Solved issue.. My mistake. /me > > > Hi there, > > I'm having problems for a several hours. When trying to install a new > package I get this: > > [root@green root]# oi_manage --base_dir /home/OpenInteract/ --package_file > /home/green/tmp/weblink-1.28.tar.gz install_package > Running install_package... > ========================= > > Segmentation fault (core dumped) > > In console I get this message: > May 30 13:35:40 green /kernel: pid 556 (perl), uid 0: exited on signal 11 > (core dumped) > > and i get a nice file: > [root@green root]# ls -l perl.core > -rw------- 1 root wheel 5857280 May 30 13:35 perl.core > > Untill today everything was fine. > Can you help me? > Tnx > > /me > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > openinteract-help mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openinteract-help > |
From: Cornel G. <cg...@cs...> - 2003-05-30 10:55:53
|
Hi there, I'm having problems for a several hours. When trying to install a new package I get this: [root@green root]# oi_manage --base_dir /home/OpenInteract/ --package_file /home/green/tmp/weblink-1.28.tar.gz install_package Running install_package... ========================= Segmentation fault (core dumped) In console I get this message: May 30 13:35:40 green /kernel: pid 556 (perl), uid 0: exited on signal 11 (core dumped) and i get a nice file: [root@green root]# ls -l perl.core -rw------- 1 root wheel 5857280 May 30 13:35 perl.core Untill today everything was fine. Can you help me? Tnx /me |
From: Chris W. <ch...@cw...> - 2003-05-29 20:48:24
|
Teemu wrote: > I spent quite some time today to figure out how to process a template for a > return value while calling an OI component. Sorry it took you so long. From what you describe it seems to be a scoping issue. > Basically, I try to create a OI component that returns the browser specific > CSS for every site. I have the following in base_main: > > [% OI.comp('ua_select_css') %] > > With this I will call an action called ua_select_css (in class > OpenInteract::Handler::UserAgent), which detects the client browser and feeds > the ua_select_css template with params {browser => $browser}. Okay, with you so far. > ... > link_rel is just an action that returns the generated CSS2 stylesheet with > correct content-type etc. If my browser is IE, the above TT code will produce > the following output: > > <link rel="stylesheet" type="text/css" href="/link_rel/?link=ie.css" /> > > Now my problem is how to retrieve ua_select_css (while in > OpenInteract::Handler::UserAgent->ua_select_css), process it and return the > processed output to base_main. Still with you. > I tried the following: > > sub ua_select_css { > .... > return $R->template->handler( {}, $params, > { name => 'my_base::ua_select_css' } ); > } > > But it didn't work. Some strange error ended up in error_log and OI ceased to > function: > > --EXITED WITH ERROR from main handler eval block > Error: Cannot process template!file error - Template with name [javascript] > not found. > > [javascript] should be a [% BLOCK javascript %] in my base_main, which makes > me wonder why it was not found... Well, this makes sense. The OI.comp() call is treated like a normal subroutine -- it has no idea of the Template scope from which it was called. (Technically it does, but not that you can use.) Your [% BLOCK javascript %] needs to be in scope of the template you're processing, in this case 'my_base::ua_select_css'. I'm not sure why you need it -- if the block is generating Javascript that your component will use, that's okay. Once OI is done calling components and rendering all your javascript will be in the generated page's scope and therefore callable. > Ok. I browsed the OpenInteract::Template::Process code for help and tried the > following (in place of template->handler): > > my $output; > my $template = $R->template->initialize; > $template->process( 'my_base::ua_select_css', $params, \$output ); > return $output; > > It worked! Now I ask, why didn't template->handler work through a component > call? Is the above method I used correct or is there a better way to do this? No, the above method is definitely not correct. When you call $R->template->handler() OI does a number of things for you to setup the template environment, and it also uses the same template object over and over. Using the same template object again and again ensures that we don't have to parse templates multiple times since they'll be in the cache. And $R->template->initialize() is only called at server/apache-child startup to initialize that single template object -- it also does work to ask each package if it has any TT plugins to initialize and some other tasks I can't remember right now. > Also, I noticed a problem in Pod documentation of > OpenInteract::Template::Process: > > initialize( \%config ) > ... I'll change this to emphasize that web developers should never call it for the reasons stated above. > ... %config could actually be > very nice for initialize if I could pass some parameters to Template->new() > through it. Something like: > > my $template = $R->template->initialize(TRIM => 1); > > Would enable TT to trim generated output. Is there currently a way to do this? Yes. You can define in your server config an initialization class/method that gets called at server/apache-child startup and passed the \%config which it can manipulate. So you can do something like this: [template_info] ... custom_init_class = MyTemplateStuff custom_init_method = initialize and put a class like this in @INC: package MyTemplateStuff; use strict; sub initialize { my ( $class, $tt_config ) = @_; $tt_config->{TRIM} = 1; } Hope that makes sense, and good luck! Chris |
From: Teemu <te...@io...> - 2003-05-29 19:35:11
|
Hi, I spent quite some time today to figure out how to process a template for a return value while calling an OI component. Basically, I try to create a OI component that returns the browser specific CSS for every site. I have the following in base_main: [% OI.comp('ua_select_css') %] With this I will call an action called ua_select_css (in class OpenInteract::Handler::UserAgent), which detects the client browser and feeds the ua_select_css template with params {browser => $browser}. ua_select_css looks something like this: [%- IF browser == 'ie' -%] [% PROCESS stylesheet style = '/link_rel/?link=ie.css' %] [%- ELSIF browser == 'moz' -%] [% PROCESS stylesheet style = '/link_rel/?link=moz.css' %] [%- ELSIF browser == 'opera' -%] [% PROCESS stylesheet style = '/link_rel/?link=opera.css' %] [%- END -%] link_rel is just an action that returns the generated CSS2 stylesheet with correct content-type etc. If my browser is IE, the above TT code will produce the following output: <link rel="stylesheet" type="text/css" href="/link_rel/?link=ie.css" /> Now my problem is how to retrieve ua_select_css (while in OpenInteract::Handler::UserAgent->ua_select_css), process it and return the processed output to base_main. I tried the following: sub ua_select_css { .... return $R->template->handler( {}, $params, { name => 'my_base::ua_select_css' } ); } But it didn't work. Some strange error ended up in error_log and OI ceased to function: --EXITED WITH ERROR from main handler eval block Error: Cannot process template!file error - Template with name [javascript] not found. [javascript] should be a [% BLOCK javascript %] in my base_main, which makes me wonder why it was not found... Ok. I browsed the OpenInteract::Template::Process code for help and tried the following (in place of template->handler): my $output; my $template = $R->template->initialize; $template->process( 'my_base::ua_select_css', $params, \$output ); return $output; It worked! Now I ask, why didn't template->handler work through a component call? Is the above method I used correct or is there a better way to do this? Also, I noticed a problem in Pod documentation of OpenInteract::Template::Process: initialize( \%config ) initialize method doesn't know anything about parameters, so I wonder why \%config is specified in the usage instructions. %config could actually be very nice for initialize if I could pass some parameters to Template->new() through it. Something like: my $template = $R->template->initialize(TRIM => 1); Would enable TT to trim generated output. Is there currently a way to do this? -- Sincerely, Teemu Arina http://www.mimerdesk.org |
From: Teemu <te...@io...> - 2003-05-28 19:32:20
|
Hi, I noticed a couple of errors in the OpenInteract::SQLInstall Pod documentation. In the documentation, there are a couple of $cleanup examples, for example: $cleanup = [ { sql_type => 'delete', sql_table => 'sys_group_user', where => "group_id = ? and user_id = ?" }, [ 1, 1 ] ]; Unfortunately this doesn't work. "where =>" should be "sql_where =>" and "field_order => [ qw(group_id user_id) ]" is totally missing. I don't know if this is necessary for SPOPS but atleast method OpenInteract::SQLInstall->transform_data() assumes you have field_order specified. -- Sincerely, Teemu Arina http://www.mimerdesk.org |
From: Chris W. <ch...@cw...> - 2003-05-27 15:12:21
|
Chris McDaniel wrote: > at seemingly random intervals, I get the Website down/technical > reasons/database problem page showing up on my site and hundreds of cannot > connect to db/angry mob of users emails in my mailbox. The problem seems to > be corrected temporarily when I stop/start the server. I've included below > a message from my error log and below that the datasource section of my > server.ini. Can anyone suggest a reason for this or a possible solution? > > This is OI version 1.56 > > OpenInteract::parse_uri (181) >> Original path: (/idex.html) > OpenInteract::parse_uri (189) >> Items in the path: idex.html > OpenInteract::parse_uri (202) >> Action found from URL: idex.html > OpenInteract::parse_uri (209) >> Original path/query string set to: > /idex.html > OpenInteract::Request::lookup_conductor (224) >> Find conductor for action > (idex.html) > OpenInteract::Request::lookup_action (253) >> Find action corresponding to > (idex.html) > OpenInteract::Request::lookup_action (264) >> Using 'notfound' action > OpenInteract::Request::lookup_action (274) >> Found action info for > (idex.html) > OpenInteract::find_action_handler (232) >> Found OpenInteract::UI::Main // > handler for conductor > Found item: HASH This last line should read: Found item: DBI::db And means that somehow we're not getting a database handle back. It might be that the handle has timed out and can't be used anymore. Are you using Apache::DBI? In the meantime I'll probably make a change so that when this happens we'll expire the Apache child so it doesn't hang around and keep answering requests with a stale db handle. Chris |
From: Chris M. <Chr...@te...> - 2003-05-27 14:40:37
|
Hello, at seemingly random intervals, I get the Website down/technical reasons/database problem page showing up on my site and hundreds of cannot connect to db/angry mob of users emails in my mailbox. The problem seems to be corrected temporarily when I stop/start the server. I've included below a message from my error log and below that the datasource section of my server.ini. Can anyone suggest a reason for this or a possible solution? This is OI version 1.56 OpenInteract::parse_uri (181) >> Original path: (/idex.html) OpenInteract::parse_uri (189) >> Items in the path: idex.html OpenInteract::parse_uri (202) >> Action found from URL: idex.html OpenInteract::parse_uri (209) >> Original path/query string set to: /idex.html OpenInteract::Request::lookup_conductor (224) >> Find conductor for action (idex.html) OpenInteract::Request::lookup_action (253) >> Find action corresponding to (idex.html) OpenInteract::Request::lookup_action (264) >> Using 'notfound' action OpenInteract::Request::lookup_action (274) >> Found action info for (idex.html) OpenInteract::find_action_handler (232) >> Found OpenInteract::UI::Main // handler for conductor Found item: HASH OpenInteract::Error::Main::catch (25) >> Action where the error was thrown from: <<n/a>> OpenInteract::Error::Main::catch (35) >> See if class <<OpenInteract::Error::System>> will take error >> Error: Cannot connect to db. Info: $VAR1 = undef; OpenInteract::Error::System::cannot_connect_db('commerce::ErrorObject=HASH(0 x131b870)') called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract/Error/Main.pm line 38 OpenInteract::Error::Main::catch('OpenInteract::Error::Main', 'commerce::ErrorObject=HASH(0x131b870)') called at (eval 444) line 39 commerce::ErrorObject::throw('commerce::ErrorObject', 'HASH(0x13135dc)') called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract/Error.pm line 94 OpenInteract::Error::throw('OpenInteract::Error', 'HASH(0x13135dc)') called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract/Request.pm line 123 OpenInteract::Request::throw('OpenInteract::Request=HASH(0xcfcf50)', 'HASH(0x13135dc)') called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract.pm line 247 OpenInteract::check_database('OpenInteract', 'OpenInteract::Request=HASH(0xcfcf50)') called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract.pm line 49 eval {...} called at /var/www/localperl/lib/site_perl/5.6.1/OpenInteract.pm line 44 OpenInteract::handler('OpenInteract', 'Apache=SCALAR(0x1094a14)') called at /dev/null line 0 eval {...} called at /dev/null line 0 etc... [db_info main] db_owner = username = xxxxxx password = xxxxxx dsn = database=commerceDB db_name = driver_name = mysql sql_install = long_read_len = 65536 long_trunc_ok = 0 [db_info sbs] db_owner = username = xxxxxx password = xxxxxx dsn = SBS db_name = driver_name = ODBC sql_install = long_read_len = 65536 long_trunc_ok = 0 [db_info uc] db_owner = username = xxxxxx password = xxxxxx dsn = database=UC_Contact db_name = driver_name = mysql sql_install = long_read_len = 65536 long_trunc_ok = 0 Thanks, Chris McDaniel |
From: Steve S. <sap...@gs...> - 2003-05-14 11:06:15
|
Chris Winters wrote: > Sorry for the delay in responding. This got put in my: "think about it > for a while" queue, which can take a little while to flush... At least yours is measured in days. Some of mine have been in the queue for years now. 8-) > In theory you can use SPOPS security without using anything else from > SPOPS. As long as you can identify your objects uniquely with a class > (or general object type) and a unique-to-that-class ID, you should be > able to get and set security levels. It's probably not the most > efficient means for doing this, but it would work. This is possible, so that's one option. I wrote: >> Just using implicit sequence numbers seems to fit. It's not clear to >> me how far up the need for an> ID bubbles though ... assigning my >> own would not give higher level users any universally known key (like >> a user name, etc.). What sort of usage impact does that have within the >> entire OI framework? Chris responded: > I'm not exactly sure what you're getting at. OI doesn't really care what > form your ID takes, just as long as it's unique. From the OI/SPOPS view > there's nothing technically wrong with having an ID of 'email' for a > 'users' table. And I'm 98% certain the ID you specify in SPOPS doesn't > even have to be the field the database recognizes as the primary key -- > if in that same 'users' table you had a sequenced ID field, SPOPS > wouldn't really care as long as it was self-maintaining (with a > trigger/sequence/generator or IDENTITY/auto-increment field) and you > told SPOPS never to insert any data for it. I guess the more pointed question is how much of the built-in OI capabilities require an ID. I see them used in the example configs. The fruit example, for instance. Are those IDs then required to get the data out to the page, or is that strictly dependent on how you define your TT templates (assuming TT since I'll be using that)? > The 'fetch_iterator()' does this fairly well, I think. And you can > standardize on using it in TT (or other views) since even when you have > a list of objects you can use SPOPS::Iterator::WrapList to present a > common interface. > > I feel like I'm missing the point of what you're really asking though. > Maybe you can present a small example? Yes, I guess that would help ... I'm going to abbreviate some of the class names, etc. but you should get the idea. How this all started was with a need to take data from various sources (mostly databases) and easily output it in different formats. An example of a simple SQL translation to Excel would look like this: use DataTranslate; my $map = [ DBQuery => {SQL => 'SELECT * FROM FOO', DB_NAME => 'ourdb'} => Excel => {FILE => '/tmp/foo.xls'} ]; my $x = DataTranslate->new(); $x->translate(MAP => $map); So under all this are factories, etc. to make this all work. Parsing is rather simple since we're using Perl list/array constructs. It does get more complicated since nesting and multiple inputs/outputs are allowed but that complexity is not needed to illustrate. There are 3 basic types of objects associated with each map: Input, Filter, Output. Each has a defined interface to "plug" into. A simple example of a filter added to the above would be: use DataTranslate; my $map = [ DBQuery => {SQL => 'SELECT * FROM FOO', DB_NAME => 'ourdb'} => StripHTML => {COLUMN => 'DESCRIPTION'} => Excel => {FILE => '/tmp/foo.xls'} ]; my $x = DataTranslate->new(); $x->translate(MAP => $map); So basically, each map is a bulk translation. But later, we found the need to use these in other ways so we added the ability to create a map and fetch from it a row at a time. To fetch, you either specify which "node" to fetch from (nodes can have IDs); or by default it fetches from the last. You can also have Null inputs/outputs to create maps that are balanced enough to parse unambiguously that you just want to fetch from -- without an input or output things become confusing, so Null is a no-op placeholder. To fetch from the above, I could do this: use DataTranslate; use Row; my $map = [ DBQuery => {SQL => 'SELECT * FROM FOO', DB_NAME => 'ourdb'} => StripHTML => {COLUMN => 'DESCRIPTION'} => Null => {} ]; my $x = DataTranslate->new(); my $row; $x->open(); while (defined($row = $x->next())) { # Do whatever with the row. } $x->close(); I could also fetch from the original map, in which case the Excel file would be created as I got my rows via the next() call. Rows are also objects. For bulk translations, you never need to see those since they're just passed along internally. For fetching, that's what you get back and you have to deal with it. Just to look a little further in, we can also put data into tables: use DataTranslate; my $map = [ CSV => {FILE => '/tmp/bulkdata.csv'} => StripHTML => {COLUMN => 'DESCRIPTION'} => DBTable => {SQL => 'INSERT INTO FOO ...'} ]; my $x = DataTranslate->new(); $x->translate(MAP => $map); You can map columns to placeholder positions, etc. The basic model is that each input coerces its data to a Row object. Once you have those rows you can do whatever. It's kind of neat since we've plugged in IO from/to databases, directories, mailboxes, and many different file formats. XML, for example, is coerced via a templating system that maps tagged data to row/column values. In all cases above, we've canned up any row level identifiers as part of the map. All a client sees is operations on that map as a whole. For web presentation, I'd like to pull from these. Since some data sets can be big, the right thing to do seems to be to fetch each row. Looking at SPOPS, it seems like a fit: I subclass it and my fetch maps my Row object into the SPOPS view of the world. The only thing is, I have no IDs to fetch by -- I always do a "fetch next." Security is needed: If I define a map that pulls sensitive financial data, I may want only certain people to see that. I can also see areas where I'd want to use OI out of the box with the SPOPS DB objects/interfaces it provides. So ideally, I fit these maps into the framework as just another thing OI can deal with. A layer above all these maps is a class hierarchy built around them. And that's not all maps. Each class there represents a specific higher level data object we deal with. e.g., if we export a specific set of data to a specific client, we'd set up a class for that client. Each of these higher level classes may have several actions associated with it; e.g., export data, send resulting files, generate reports, etc. Some of these actions may invoke translations of canned maps, others may not. It seems to me that I could map these higher level classes to OI packages. Those packages would be derived from SPOPS classes built around my maps instead of from the ones OI provides for databases. -- Steve Sapovits GSI Commerce, Inc. http://www.gsicommerce.com Email: sap...@gs... |
From: Chris W. <ch...@cw...> - 2003-05-14 03:34:57
|
Steve Sapovits wrote: > I brought this topic up a while ago here. Chris gave me some > starting pointers which I sat on while I caught up on my "real" > work. I recently had some time to get back to this. Here's my > current dilemma: Sorry for the delay in responding. This got put in my: "think about it for a while" queue, which can take a little while to flush... > We have a package that we use for data transforms that allows you > to configure a set of inputs/filters/outputs. Basically you build > a map defining all the steps. Once you have a map you can either > feed it to a translator, which runs the whole thing; or you can fetch > a row from an output node and do what you want with that row. There > are no row level IDs used here -- if you're fetching, you just fetch > the next row until there are no more. SPOPS, being more of a table > model, wants IDs for fetches. Is there a way around this? I'm not exactly clear on the inputs/filters/outputs implementation. If you're retrieving one row at a time then yes, you need to either fetch by ID or create a method to do the fetch for you. (There's a shortcut SPOPS gives you with the 'fetch_by' configuration directive, but that always returns an arrayref (unless you specify the 'return_single' parameter, but that's kind of ugly).) If the inputs/filters/outputs creates a query then 'fetch_group()' will retrieve a number of objects for you all at once, putting them in an arrayref. And, probably more appropriate, 'fetch_iterator()' takes the same parameters as 'fetch_group()' but returns a lazy-loading iterator from which you can kick out your objects one at a time. > Looking at > what we have, it's really more suitable as a template level tool maybe; > i.e., just give it a wrapper and expand the data sets using TT constructs. > But I'd like to utilize the security layer SPOPS offers for data access. In theory you can use SPOPS security without using anything else from SPOPS. As long as you can identify your objects uniquely with a class (or general object type) and a unique-to-that-class ID, you should be able to get and set security levels. It's probably not the most efficient means for doing this, but it would work. > And, since we do use this for canned data writes/updates, I want to keep > an eye on plugging this in more fully as a full data access layer. In all > cases where I'd be using this now (read only), I'd be fetching the entire > set of data the translation defines, although I will want to be able to > segment larger sets so they can be paged. In OI this is done with the 'results_manage' package. (It's not optimal, but it works everywhere.) > Just using implicit sequence > numbers seems to fit. It's not clear to me how far up the need for an > ID bubbles though ... assigning my own would not give higher level users > any universally known key (like a user name, etc.). What sort of usage > impact does that have within the entire OI framework? I'm not exactly sure what you're getting at. OI doesn't really care what form your ID takes, just as long as it's unique. From the OI/SPOPS view there's nothing technically wrong with having an ID of 'email' for a 'users' table. And I'm 98% certain the ID you specify in SPOPS doesn't even have to be the field the database recognizes as the primary key -- if in that same 'users' table you had a sequenced ID field, SPOPS wouldn't really care as long as it was self-maintaining (with a trigger/sequence/generator or IDENTITY/auto-increment field) and you told SPOPS never to insert any data for it. > Also, regarding the paging need, I'd want to not be required to load the > entire set in since some of these can be quite large. Load as needed is > mostly the model I'd want. The 'fetch_iterator()' does this fairly well, I think. And you can standardize on using it in TT (or other views) since even when you have a list of objects you can use SPOPS::Iterator::WrapList to present a common interface. I feel like I'm missing the point of what you're really asking though. Maybe you can present a small example? Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Chris W. <ch...@cw...> - 2003-05-13 17:46:59
|
Chris McDaniel wrote: > apologies if I'm missing something obvious, but what do I need to do to > enable editing of html files on the filesystem from within OI? The contents > get pulled up into the editor fine, but trying to save produces some odd > behavior - templating instructions show up on the page, etc. If you're editing from the browser, be sure 'Parse as template?' is checked. Otherwise it's not run through TT. Chris |
From: Chris M. <Chr...@te...> - 2003-05-13 17:36:05
|
Hello, apologies if I'm missing something obvious, but what do I need to do to enable editing of html files on the filesystem from within OI? The contents get pulled up into the editor fine, but trying to save produces some odd behavior - templating instructions show up on the page, etc. Thanks, Chris McDaniel |
From: Steve S. <sap...@gs...> - 2003-05-10 11:54:29
|
I brought this topic up a while ago here. Chris gave me some starting pointers which I sat on while I caught up on my "real" work. I recently had some time to get back to this. Here's my current dilemma: We have a package that we use for data transforms that allows you to configure a set of inputs/filters/outputs. Basically you build a map defining all the steps. Once you have a map you can either feed it to a translator, which runs the whole thing; or you can fetch a row from an output node and do what you want with that row. There are no row level IDs used here -- if you're fetching, you just fetch the next row until there are no more. SPOPS, being more of a table model, wants IDs for fetches. Is there a way around this? Looking at what we have, it's really more suitable as a template level tool maybe; i.e., just give it a wrapper and expand the data sets using TT constructs. But I'd like to utilize the security layer SPOPS offers for data access. And, since we do use this for canned data writes/updates, I want to keep an eye on plugging this in more fully as a full data access layer. In all cases where I'd be using this now (read only), I'd be fetching the entire set of data the translation defines, although I will want to be able to segment larger sets so they can be paged. Just using implicit sequence numbers seems to fit. It's not clear to me how far up the need for an ID bubbles though ... assigning my own would not give higher level users any universally known key (like a user name, etc.). What sort of usage impact does that have within the entire OI framework? Also, regarding the paging need, I'd want to not be required to load the entire set in since some of these can be quite large. Load as needed is mostly the model I'd want. -- Steve Sapovits GSI Commerce, Inc. http://www.gsicommerce.com Email: sap...@gs... |
From: Chris W. <ch...@cw...> - 2003-05-09 00:36:22
|
Peter Dragon wrote: > I=92d like to extend the template plugin functionality provided in=20 > OpenInteract/Template/Plugin.pm, which is called from templates with a=20 > OI.method() type syntax. Is it okay to create a new plugin name as opposed to putting it in=20 the OI plugin namespace? So you'd have 'OIHTML.button()' or whatnot. > For now I am calling $R->template->handler() and passing in a pointer t= o=20 > an object B, which is my equivalent of OI, and calling B.popup() in=20 > templates. I didn=92t want to change the provided OI plugin code in cas= e=20 > it is updated. Right, but then you have duplicated code everywhere... > What is the best way of integrating my library component ? A 'component' in OI terms is an action that returns content. It=20 typically needs information from the model (database, whatever)=20 and/or additional Perl processing to complete its task. Since these all seem to be display-oriented tasks rather than data=20 driven ones (like creating standard dropdown lists, etc.), then it's=20 best to use your own TT plugin. An email I sent about six weeks ago=20 to the -dev list may be of help: http://sourceforge.net/mailarchive/forum.php?thread_id=3D1869184&forum_id= =3D3222 My first response to damien discusses how to associate a TT plugin=20 with your package and have it available in your templates. > Also, for installation, I see oi_manage either installs a handler in an= =20 > area (e.g. oitest/pkg/fruit-0.15/oitest/Handler/Fruit.pm) or has a=20 > special case for OI components, for example to install=20 > base_theme/OpenInteract/Theme.pm one level about the Handler directory,= =20 > but I cannot install my own site-specific module. >=20 > Do I need to install components by hand or is there a better way ? Only packages in OpenInteract::Handler::* get relocated when they're=20 installed to a website. (BTW: this is going away with OI2, since you=20 won't have this base repository + website stuff.) Everything else=20 stays the same and is addressable normally -- when the website is=20 created we copy all the relevant noncore libraries from the=20 OpenInteract:: namespace into the temporary library directory=20 ($WEBSITE_DIR/tmplib). We also copy all the libraries from=20 <YOURSITE>::Handler there as well. Then we've only got one directory=20 to put on the @ISA. If you're creating a plugin then you'd want to install it to=20 OpenInteract::MyPlugin. That should get brought into your path ok. Later, Chris |
From: Peter D. <pet...@us...> - 2003-05-08 14:44:31
|
I=92d like to extend the template plugin functionality provided in OpenInteract/Template/Plugin.pm, which is called from templates with a OI.method() type syntax. I have my own perl object module with some functions to produce HTML for things like hyperlinks with javascript popu= p context menus. I guess in OI terminology this is a component. I use perl because the logic is too complex to fit into a template widget, and I mig= ht want to upgrade to a cross-browser javascript library like DOMAPI later. For now I am calling $R->template->handler() and passing in a pointer to = an object B, which is my equivalent of OI, and calling B.popup() in template= s. I didn=92t want to change the provided OI plugin code in case it is updat= ed. What is the best way of integrating my library component ? Also, for installation, I see oi_manage either installs a handler in an a= rea (e.g. oitest/pkg/fruit-0.15/oitest/Handler/Fruit.pm) or has a special cas= e for OI components, for example to install base_theme/OpenInteract/Theme.p= m one level about the Handler directory, but I cannot install my own site-specific module. Do I need to install components by hand or is there a better way ? Inspecting @ISA it looked like I could put my module in the oitest top le= vel directory which is where I put it for now. I did not want to put it in site_perl in case I use different versions in different customer areas. Although this works I have the repository tool grumbling it cannot find m= y module when it does a package check. Am I installing to the right place ? Thanks, Peter --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.478 / Virus Database: 275 - Release Date: 06/05/2003 |