Re: [Plastic-devs] Select or show colums message
Brought to you by:
johndavidtaylor,
thomasboch
|
From: John T. <jd...@ro...> - 2006-07-19 23:55:33
|
Thinking again about this, I have an idea that might allow us to combine the increased "pluggability" of having a generic message with the control implied by a more specific one and thus keep both you and Richard happy. If we think of a generic selectCols(id, cols[]) message as just implying "here are a bunch of columns, do with them what you will", then we need a way of the recipient stating what it is able to do with the message, and the sender choosing amongst the options. We could do this by decorating the message with the extra information. URI fragments are a natural way to do this, since (IIRC) the fragment is intended to be interpreted by the client (the recipient of the message in this case). To take a specific example. Topcat could do one of two things with a bunch of columns: create a new subset based on them, or create a plot (2D or 3D depending on the number of columns). It would register as understanding ivo://votech.org/votable/selectCols#plot ivo://votech.org/votable/selectCols#new_subset The fragment string is completely defined by Topcat - no other agreement is needed with any other application, and no other application needs to understand what it means. Instead, the sending application (e.g. Weka) strips off the fragments and uses them to populate its UI. Thus it might offer the user the following options for the selected columns: send cols -> topcat -> plot -> new_subset -> tabview-> highlight -> Anomaly Detector [assuming tabview has registered with selectCols#highlight, and Anomaly Detector has registered just with selectCols] The appropriate fragment is then tacked on to any sent messages. If Topcat should receive a message without a fragment then it could a) ignore it (not so good for backwards compatibility) b) do some default behaviour c) prompt the user The nice thing about this is that behaviour is extendible without further agreement amongst application vendors. Should astronomers ask Mark to offer the ability to differentiate between overwriting an existing plot, or creating a new one, it's easy to do: simply register with ivo://votech.org/votable/selectCols#create_plot ivo://votech.org/votable/selectCols#overwrite_plot ivo://votech.org/votable/selectCols#new_subset and all compliant apps pick up the new option automatically. This is _almost_ implementable without breaking any existing apps. Since there's no selectCols message yet, there's no reason why we can't define selectCols#plot and selectCols#new_subset as distinct messages under the current version of Plastic. Changing the hub to route messages while ignoring the fragment is, of course, a change to the spec, but I don't think it breaks anything since no currently defined messages use the "#" symbol. Comments? John B Walshe wrote: > Hi, > > Bob, John and myself were discussing the showCols message this morning > and we decided that it would make sense to have a general message > message for selecting columns as well as more specific messages such as > for plotting graphs based on those columns. > > Personally I see the general purpose message as being passive; i.e. it > can be used to tell other applications which columns the user is > currently interested in, but it doesn't say what to do with them. This > can be useful when dealing with tables with large numbers of columns > where there is insufficient space on the screen to display their names > properly and/or they are in a different order. > > Plot messages, on the other hand, actually tell the application to do > something with the data. While it would be easy enough to send the > showCols message and then have the user manually click on a "visualise" > button in the other application, what happens if the user does not want > to change which columns they had selected just to do a quick plot? On > the flip side: for applications that take a lot of time and resources > to generate a graph it would make sense that they only do so when they > receive messages that specifically ask for a plot. > > > Sound, > Brian > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Plastic-devs mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/plastic-devs > > -- ------------------------------------------------------------------------ AstroGrid/VOTech & Institute for Astronomy, Edinburgh Skype:johndavidtaylor <skype:johndavidtaylor?chat> ------------------------------------------------------------------------ |