- Half Baked

From: Bob Walkden <"Bob>
Date: Sat, 27 Jan 2007 10:06:11 -0000

----boundary-LibPST-iamunique-654040814_-_-
Content-type: text/plain

Unfortunately I don't think we're going to see a true cross-platform
version of Blackbox, and translating a few modules such as Host
probably won't be enough to guarantee the portability you're after.

Parnas explained the fundamental principles of writing portable code
in several papers which are available on the web and in the collection
"Software Fundamentals". They are very well worth rereading:

Designing Software for Ease of Extension and Contraction
On the Criteria to be Used in Decomposing Systems into Modules

and others.

The key principle is to identify and isolate those parts of your
software that are most likely to change.

It's quite difficult to do, and an email can't really do justice to
the idea or explain it properly. Some time ago I thought it would be
useful to prove the principle by writing several versions of one of
the classic model software problems (the library problem) and showing
how the resulting modules (perhaps written in entirely different
languages) can be interchanged easily. Parnas set a similar exercise
for one of his classes in the early days, and it proved very
successful.

However, as is usual with me, the project ran into the ground for lack
of time. But I will have a dig around and see if I have anything in a
good enough state to post as an example. I'm convinced there's a
worthwhile book to be written around this idea.

The most important thing is the module structure. It is vital to keep
to distinct layers with dependencies in one direction only. For
example, your user interface layer will depend on the abstract model
layer (your 'real world' classes), but you cannot under any
circumstances allow your model layer to depend on the user interface
layer. This is where Parnas's first paper cited above is outstanding.
It's very easy to make the abstract model layer portable between
environments.

You must also isolate your storage layer in a similar way. In fact,
the storage layer needs to consist of several distinct sub-layers. For
instance, you need to be able to switch between modules which use a
SQL database, and those which use, say, ISAM. Within the SQL-aware
modules you need to be able to switch easily between say Oracle and
SQL Server. The way I've done that is to keep the SQL itself in
resource files, loaded at run-time. This has the added benefit under
BB that I can test the SQL very easily from a console.

It's not very fashionable in these days of 'Extreme Programming', but
what is needed is Big Design Up Front.

--
Regards,
 Bob 
> >   
> I think the bottom line is "job security".  I would like to 
> be able to 
> move my
> BlackBox/Component Pascal knowledge to other platforms such as Linux
> and be able to produce code that others can use.  Yes I would like
the
> GUI interface to remain unchanged BUT that is not critical.  What is
> critical is that the interface be graphical with buttons and 
> sliders, etc.
> Half Baked refers to my idea of using Oberon V4.  I am simply
looking
> for a way to be able to pick up and drop the BlackBox environment
onto
> other OS's (again for job security). I know that all of the 
> "Host" code
> would need to be rewritten to make BB portable.  If it were to V4
then
> each function would need to be represented as a V4 call.  If it were
> to Java then platform independent Java libraries would need to be
> called.
> 
> I am very skeptical about Bluebottle simply from the number 
> of technical
> problems that keep arising in the discussion group.  The code does
not
> appear to be "elegant", in my opinion.
> 
> I've used V4 for many years and no longer like the 
> interclicks.  I much 
> prefer
> the BlackBox GUI.
> 
> I think that answers your questions?
> 
> -Doug Danforth
> 
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy> 
> 
> 
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-654040814_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFVuZm9ydHVuYXRlbHkgSSBkb24ndCB0aGluayB3
ZSdyZSBnb2luZyB0byBzZWUgYSB0cnVlIGNyb3NzLXBsYXRmb3JtXHBhcg0KdmVyc2lvbiBvZiBC
bGFja2JveCwgYW5kIHRyYW5zbGF0aW5nIGEgZmV3IG1vZHVsZXMgc3VjaCBhcyBIb3N0XHBhcg0K
cHJvYmFibHkgd29uJ3QgYmUgZW5vdWdoIHRvIGd1YXJh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FyDQo+IEkgdGhpbmsgdGhhdCBhbnN3ZXJzIHlv
dXIgcXVlc3Rpb25zP1xwYXINCj4gXHBhcg0KPiAtRG91ZyBEYW5mb3J0aFxwYXINCj4gXHBhcg0K
PiAtLS0gQmxhY2tCb3hccGFyDQo+IC0tLSBzZW5kIHN1YmplY3QgSEVMUCBvciBVTlNVQlNDUklC
RSB0byBibGFja2JveEBvYmVyb24uY2hccGFyDQo+IFxwYXINCj4gXHBhcg0KPiBccGFyDQpccGFy
DQotLS0gQmxhY2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUg
dG8gYmxhY2tib3hAb2Jlcm9uLmNoXHBhcg0KfX0ACgkiUw==
----boundary-LibPST-iamunique-654040814_-_---
Received on Sat Jan 27 2007 - 11:06:11 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:53 UTC