[Biophp-dev] Task oriented design approach (was: comments on CVS, XML, and other TLA's)

biophp-dev@bioinformatics.org biophp-dev@bioinformatics.org
Sun, 13 Apr 2003 13:55:42 -0600

On Friday 11 April 2003 03:20 am, Greg Tyrelle wrote:
> *** mail-lists+biophpdev@dogphilosophy.net wrote:
>   |My continued chanting of "task oriented" just refers to my thought that
>   |when deciding what to write and how to design it, one should ALWAYS
>   |(at least for this project) start with a "real-world" task, RATHER THAN
>   |a "capability.
> I would argue instead for building "task" based modules on top of
> modules that provide "generic capabilities".
> But from a user point of view "tasks" make more sense. I'll try and
> elaborate...
> Hmm...
> You need to have certain generic capabilities to build up useful "real
> task features".  I'll assume that you point with "real task features"
> is to make the modules as "useful as possible" out of the box for the
> end user ? If this is the case then the following example (obvious
> given my recent efforts) might illustrate what I'm getting at:
> When using the "PubMed" module the details of parsing, querying,
> caching of the EUtils interfaces are hidden. If I'm understanding you
> correctly then the final outcome here is "task oriented" ?
[...some code...]

Yes - I suspect that I am reactionarily indulging in necro-equine flagellation
as I talk about focussing on "tasks".

Put simply, all I REALLY mean is that we should be deciding how the
"generic functionality" is designed with a "real-world" task already
in mind, rather than starting immediately from abstract function.

This is mainly a matter of avoiding having to go back and re-write when
the abstract class written in isolation turns out to be difficult to use
in practice, and to try to 'focus' efforts in such a way as to reach
"useable code" as quickly as possible.

It ALSO comes from a personal streak of contempt that I've developed
for "excessively abstracted/contrived" approaches to problems that years of US
Public High School mathematics teaching gave me so long ago...(I blame broken
mathematics teaching for the painful delay in my science education - funny how
easy mathematics seemed to me once I returned to college and started taking
classes with application in the real world...)

But that bit of melodrama from my life isn't otherwise relevant here...

Essentially, it's something I feel very strongly about, but am not sure
if I SHOULD, so I'm waving it around where everyone can attack it if
it's stupid :-)

> Of course it doesn't have to be OO (a wrapper class maybe ?) and the
> final PubMed interface could directly return abstracts etc.
> $abstracts = $pubmed->search_abstracts("bioinformatics");
> Can this logic be applied to other "capabilities" and "tasks" in
> BioPHP or does this fall down in certain circumstances ?

No, that pretty much fits what I meant - in this example, your focus isn't
"writing an interface to ESearch" but "being able to retrieve PubMed
abstracts", which means the the generic functionality is written right
from the start with actual use in the real world in mind...

>   |I have thus far not concerned myself with looking TOO deep at other
>   | BioXXXX project's capabilities (other than to get a general "feel" for
>   | what they can /are designed to do), because I don't consider 'do the
>   | same thing as BioPerl/Python/Lisp/Ruby/Java' to be a valid "task". :-)
> Sure, but learning from others mistakes is generally considered
> wise. As is not reinventing the wheel :)

Now, that LATTER statement I will disagree with - there is, in my opinion, 
no finer way to learn about wheels than to invent one yourself :-)

Plus, then you end up with a wheel that fits your "vehicle" as perfectly
as possible, rather than an "off-the-shelf" wheel that "can be made to fit"...

> Projects and the underlying ideas behind them evolve. So I expect to
> have my design ideas challenged (with rational argument) when
> interacting with other people. It is part of the development process
> and what makes it interesting :)

Not to mention educational, which is probably my main reason for 
undertaking this project.  I figure not only will I end up with
tools that I can personally use for the subset of bioinformatics
that I've worked with, but I'll pick up a broader understanding of
real-world uses of bioinformatics AND certain related technologies
that apply (e.g. XML and Java, which I find I keep harping on 
for some unknown reason buried deep inside my twisted mind...)

Today's project for me will be XML.  I think I've just about
got my brain wrapped around the way I want to approach it.  Now
I just need to determine if it's possible to do the equivalent
of pointers to functions in PHP...