- CP to NET: A caveat

From: CFB Software <"CFB>
Date: Wed, 24 May 2006 11:55:22 +0930

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

> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of Les May
>
> BB abstracts away all the messy bits of event handling. In
> Delphi, VB, C# the programmer is responsible for handling
> each event, e.g. mouse click, keypress etc.

Unfortunately BB only handles a very small subset of possible events in that
way. If you want to do anything but the most basic operation (i.e. respond
to a click) then you are on your own in BB and have to do it the real hard
way requiring many lines of code. The example I gave the other day is
typical: I have a table on a form, when I resize the form, I want the table
to continue to fill the form so that I can see as much of it as possible,
rather than remaining as a fixed size in the top left hand corner of the
window. In Delphi, VB, C# etc. this is achieved with just *one* assignment
statement. How can you do this in BB?

In summary, in BB the basic GUI stuff needs no effort, but the more advanced
stuff is extremely difficult. In Delphi, VB, and C# the basic stuff needs a
little effort and the more advanced stuff needs a little effort. It is not
just a documentation problem - it is the amount of relatively low-level code
that has to be repeatedly written to achieve fairly common operations.


> It also means
> that they are 'bloated' by comparison with CP which has
> retained the simplicity urged by Wirth. The price paid is
> reflected in the comments about lack of components, lack of
> versatility of layout, difficulty in creating freestanding
> applications.
>
> If it were to be used to create event driven GUI applications
> a move of CP to dot NET by incorporation into VS would
> require that the language had 'features' added to handle
> events which would become the responsibility of the
> programmer.

I'm currently using CP .NET to create event driven GUI applications (without
incorporation in VS) and it's infinitely easier than it ever was using the
Win32 API. It's not quite as easy as using Delphi or Visual Studio but
definitely easier than BB. In the case where I need a more advanced GUI or
web interface, I use a hybrid approach. I use Visual Studio / C# to
automatically generate the GUI and then call the functions that do the
actual processing that are written in CP. This approach actually encourages
the separation of user interface from processing which is usually claimed to
be a good thing.

Calling a function written in a different language (and different dll) is
only fractionally more difficult than calling one in the same language when
you are in the .NET environment.

> Of course if someone were to take on the job of re-creating a
> BB lookalike with all the rough edges smoothed out, all the
> messy bits of event handling would be hidden from the user.
>
> But 'it ain't gonna happen' is it? Which is why it seems
> important to decide what it is about BB and CP that is really
> important to each user.

I totally agree - I'm not proposing that work should be done on BB to make

it work in a similar automagic way. That is just not feasible as many tens
(if not hundreds) of man-years of work has gone into Delphi, VB and Visual
Studio to make them work that way. At their peaks, VB and Delphi had 6
million and 2 million users respectively. Borland (Delphi) have had
approximately 40 developers working for the past 10 years (that's just
programmers not QA, sales people, documenters, managers etc. etc.) to make
this happen. BB in contrast would have a number of users in the thousands
(if that?) and a handful of employees to cover all the tasks.

BB is not suited for the development of rich GUI desktop applications so it
is a waste of time trying to recruit new users from that camp. What we need
to identify is what BB is really useful for.

> The ease of creating a GUI or the reliability and program
> correctness possible with CP?
>

Some of the positive attributes of BlackBox are:

* It is mature and stable
* The language is simple yet powerful
* Program reliability and correctness is more easily achieved than with
other languages
* Computing resources (RAM, CPU speed) required are minimal
* Programming development tools (profiler, analyser, post-mortem debugger)
are included
* It is 'zippy'. Using BlackBox is like driving a Ferrari (I imagine!).
Using Delphi or Visual Studio is like towing a caravan with a Mini.

I can well understand why BB would be suitable for scientists who do their
own programming - i.e. it is not the main focus of their work. BB might also
have a future is in programming education in countries where the powerful
computers needed to host Visual Studio, Delphi (typically 1GHz CPU, 1Gb RAM)
are not readily accessible.

My current intention (ideas triggerd by these discussions over the last few
days) is to investigate ways in which BB can be used to assist GPCP .NET
development work in a more transparent manner than is possible today.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-1140807480_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9k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gYXNzaXN0IEdQQ1AgLk5FVFxwYXINCmRldmVsb3BtZW50IHdv
cmsgaW4gYSBtb3JlIHRyYW5zcGFyZW50IG1hbm5lciB0aGFuIGlzIHBvc3NpYmxlIHRvZGF5Llxw
YXINClxwYXINCi0tXHBhcg0KQ2hyaXMgQnVycm93c1xwYXINCkNGQiBTb2Z0d2FyZVxwYXINCmh0
dHA6Ly93d3cuY2Zic29mdHdhcmUuY29tL2dwY3BccGFyDQpccGFyDQotLS0gQmxhY2tCb3hccGFy
DQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUgdG8gYmxhY2tib3hAb2Jlcm9u
LmNoXHBhcg0KfX0A1S+QDQ==
----boundary-LibPST-iamunique-1140807480_-_---
Received on Wed May 24 2006 - 04:25:22 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:58 UTC