Discussion:
multi programmer project ?
(too old to reply)
Skybuck Flying
2004-01-18 13:15:57 UTC
Permalink
Hi,

One programmer can only do so much.

So lately I am thinking how multiple programmers could work together and
create huge applications.

I am thinking about seperating everything into API's.

I know windows is mostly made out of DLL's... but those are procedural
programmed. ( C )

I would like to keep things object oriented. A bonus would be cross language
as well.

What solutions exist ?

A few days back I used COM which was pretty impressive... I think it was
written in C or C++ and I could just import it in delphi

Via project->import type library.

Is COM the way to go when it comes to Windows and Object Oriented
Programming.

One last possibility might be Delphi Packages which are modified DLL's but I
don't really like packages and they are probably not cross language.

Are there any other ways of splitting applications into multiple possibly
reusable language independant components ;) ?

Bye,
Skybuck :)
Richard Heathfield
2004-01-18 13:35:09 UTC
Permalink
[The crosspost list is IMHO excessive. I've trimmed followups to
comp.programming.]
Post by Skybuck Flying
Hi,
One programmer can only do so much.
So lately I am thinking how multiple programmers could work together and
create huge applications.
How huge?
Post by Skybuck Flying
I am thinking about seperating everything into API's.
That can work well, especially if the APIs are properly isolated and
encapsulated, with a carefully designed "usage contract" between caller and
called.

Think about the design of APIs you already like to use - e.g. those provided
by your favourite implementation. Consider emulating the characteristics
that make those APIs desirable to you when the time comes to write your
own.
--
Richard Heathfield : ***@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Robert Wessel
2004-01-19 04:09:30 UTC
Permalink
Post by Skybuck Flying
Hi,
One programmer can only do so much.
So lately I am thinking how multiple programmers could work together and
create huge applications.
I am thinking about seperating everything into API's.
That's certainly one good way of splitting a programming task. Define
a bunch of clean interfaces, then you can work on the different pieces
with considerable independence. During development you supply enough
of a dummy implementation needed to allow the users of missing
components to be developed.

"Interfaces", BTW, do not have to be traditional APIs, but rather any
reasonably clean seam between components. For example, you could
write a multi-pass compiler, and the interface between each pair of
passes could be the layout of the pass output file, or an interface
could be the definition of the datastream passed between two
components via a communications pipe of some sort. In fact, as a
general rule, the less "API-like" an interface is, the more likely
that you're going to avoid excessive coupling across the interface.

With an object-oriented language, you can, with a bit of care, define
interfaces at the class level. Avoid having anything publicly
accessible except the minimum number of methods you really have
defined as part of the interface. Again, this lets you build a dummy
class as a placeholder while other stuff is built.

The difficulty is defining the overall architecture, and then defining
the interfaces well enough. Many projects have foundered due to early
design errors. The various rapid programming paradigms take a
somewhat different tack.
Post by Skybuck Flying
I know windows is mostly made out of DLL's... but those are procedural
programmed. ( C )
Hardly. All COM, OCX and whatnot objects are implemented in DLLs.
Most other large OSs are also built out of "DLLs", although they're
usually named something slightly different.

At the end of the day, DLLs, shared libraries and whatnot are more
about packaging than the structure of your application.
Post by Skybuck Flying
I would like to keep things object oriented. A bonus would be cross language
as well.
What solutions exist ?
A few days back I used COM which was pretty impressive... I think it was
written in C or C++ and I could just import it in delphi
Via project->import type library.
Is COM the way to go when it comes to Windows and Object Oriented
Programming.
It depends on what you're trying to do. For example, many OCXs
implement some type of user interface widget (although that's
certainly not their exclusive use). So you can build your
counter-clockwise-spinning-psychedelic-push-button-control OCX with a
variety of languages in Windows (C++ and VB being fairly popular for
the task), and then use that OCX in any language that allows you to
use OCX based controls. You even get the drag-and-drop function for
the OCX in your IDE of choice.
Post by Skybuck Flying
One last possibility might be Delphi Packages which are modified DLL's but I
don't really like packages and they are probably not cross language.
As I mentioned, things like OCXs are (mostly) language independent.
Some things (for example a straight DLL) may require that you define
the interface in an interface definition file for each language you
plan on having use the DLL (for example a C header file or the
equivalent for Pascal). I don't know much about Delphi, so I can't
relate Delphi packages to anything in particular.
Post by Skybuck Flying
Are there any other ways of splitting applications into multiple possibly
reusable language independant components ;) ?
Techniques for building large systems have been a hot topic since at
least the early sixties. Any chump out of school can hack together a
few 10's of KLOCs, It usually takes a couple of years to train people
to work on large projects - until then they're mostly annoying.
Managing a large project is *hard*. Getting a bunch of people working
together is *hard*. There's *lots* of literature on the subject,
covering everything from modularization to management issues. As
Brooks said, there's no silver bullet.

At the end of the day much of successful reuse does boil down to
interfaces. The problem domain that your component is useful for is
largely dictated by the interfaces. Too specific and it'll never be
reused because it won't apply to any other need, too general, and
it'll never be reused since it'll be like trying to nail Jello to the
wall. And making a component general purpose the first time tends to
be pretty darn expensive (see next paragraph).

Be aware that reuse is a rather tougher goal than just the minor
packaging issues related to how to structure your application. Brooks
draws a square divided into four quadrants. The upper left quadrant
is a normal program. Moving to the right is the system program box,
and moving down is the program product box, and in the lower right
corner is the system program product box. System in this context
means OS-like code as opposed to application, and product means
something packaged for sale. Most of use have come to accept that a
truly reusable component is basically equivalent to a "product".
Anyway, moving across or down the square (eg. from program to program
product or system program) involves approximately a tripling of effort
required, and moving from program to system program product is about a
nine-fold increase.

I strongly suggest reading Brooks (The "Mythical Man Month" - be sure
to get the 20th Anniversary edition).
Robert Wessel
2004-01-19 10:14:23 UTC
Permalink
Post by Robert Wessel
"Interfaces", BTW, do not have to be traditional APIs, but rather any
reasonably clean seam between components. For example, you could
write a multi-pass compiler, and the interface between each pair of
passes could be the layout of the pass output file, or an interface
could be the definition of the datastream passed between two
components via a communications pipe of some sort. In fact, as a
general rule, the less "API-like" an interface is, the more likely
that you're going to avoid excessive coupling across the interface.
Another excellent example of a non-API "interface" might be the
central database for a system. Consider an accounting system. To a
large extent the AR, AP, GL, Payroll, reporting, etc., subsystems (as
well as smaller sub-subsystems) are independent of one another, and
interface via the database schema.
Skybuck Flying
2004-01-19 11:04:18 UTC
Permalink
Nice text and all.

Actually I am now wondering about language independant and a platform
independant way of reusing code. Preferably compiled code (binary code).

COM is for windows only. Does Linux have something like COM. ?

.NET is windows only.

Java is multi platform but single language.

So my requirement has actually expanded into:

A language independant, platform independant, object oriented way of reusing
preferably compiled code (binary code).

The only thing that comes close to that is using TCP/IP or some other
protocol which are usually language and platform independant.

API's tend to get platform dependant or language dependant ! :D

I am thinking of one other example... Allegro which is like a game library
(which unfortunately, when I tried it didn't seem to work in delphi).

Allegro is like a C library or maybe even C++ library which is implemented
many times on different platforms. This is ofcourse inefficient having to
write
more or less the same code or having to write extra code per platform or
language.

Also I don't like C and to support platforms it really comes down to C
compilers usually... for every processor on the planet there is likely to be
a C compiler
somewhere hehe. C however is procedural so it doesn't fit the requirement
:|.

Seems like OO reuse is in a sad state :D

Communicating via protocols is also a bit hard and dangerous in the prospect
of hackers, security issues, also performance issues and reliablility
issues.

Not to mention driving firewalls nuts and limited funtionality thx to NAT
and ip address shortage ;) lol.

Skybuck.
J French
2004-01-19 13:29:14 UTC
Permalink
On Mon, 19 Jan 2004 12:04:18 +0100, "Skybuck Flying"
Post by Skybuck Flying
Nice text and all.
Actually I am now wondering about language independant and a platform
independant way of reusing code. Preferably compiled code (binary code).
Not a chance
- 'binary code' knows about the machine - so that is out
(except for emulators .. and they are slow .. and not that common)
- 'platforms' sit on machines
- if a platform is not compliant then you are stuffed
- languages compile to binary (machine code) or 'pcode'
- but they rely on 'platforms'
Post by Skybuck Flying
COM is for windows only. Does Linux have something like COM. ?
.NET is windows only.
For the time being
Post by Skybuck Flying
Java is multi platform but single language.
Sort of true - but people have been known to produce Java PCode
(Beans?) that slip into a Java stream
Post by Skybuck Flying
A language independant, platform independant, object oriented way of reusing
preferably compiled code (binary code).
And I am in search of the Philosopher's Stone
Post by Skybuck Flying
The only thing that comes close to that is using TCP/IP or some other
protocol which are usually language and platform independant.
Nuts - TCP/IP is a railway that transports carriages
- what is inside the 'carriages' is of no interest to TCP/IP
Post by Skybuck Flying
API's tend to get platform dependant or language dependant ! :D
Generally Platform dependent
Post by Skybuck Flying
I am thinking of one other example... Allegro which is like a game library
(which unfortunately, when I tried it didn't seem to work in delphi).
Allegro is like a C library or maybe even C++ library which is implemented
many times on different platforms. This is ofcourse inefficient having to
write
more or less the same code or having to write extra code per platform or
language.
Exactly that - and if a 'platform' does not supply/support something
- your code is stuffed
Post by Skybuck Flying
Also I don't like C and to support platforms it really comes down to C
compilers usually... for every processor on the planet there is likely to be
a C compiler
Mostly, but don't imagine that just by writing an App in 'C' that you
can get it running on any platform
- pure ANSI 'C' will give you the rudiments - like 'Hullo World'
- perhaps even a simple console App (like a compiler)
Post by Skybuck Flying
somewhere hehe. C however is procedural so it doesn't fit the requirement
:|.
OOP did not arrive with CPP
- people have been doing OO stuff for years
- actually - under the hood Windows /is/ 'procedural'
Post by Skybuck Flying
Seems like OO reuse is in a sad state :D
Yes - and no - on one platform it can work far too well
- it is just not much use on different platforms
- if those different platforms do not support the first platform
Post by Skybuck Flying
Communicating via protocols is also a bit hard and dangerous in the prospect
of hackers, security issues, also performance issues and reliablility
issues.
That is just Client/Server - not really coding
- the real code is tied to the server (or the platform on the server)
Post by Skybuck Flying
Not to mention driving firewalls nuts and limited funtionality thx to NAT
and ip address shortage ;) lol.
Routers can 'fudge' IP addresses into Ports
- that solves a lot of the 'numbers' problem
However the Transport Protocol has nothing to do with Coding
- or with the structure/design of code
Post by Skybuck Flying
Skybuck.
Skybuck Flying
2004-01-19 15:14:26 UTC
Permalink
Just a quick note:

To achieve what I want the following could be done I think:

Write a C++ compiler which compiles to some byte code.

Write a Delphi compiler which compiles to some byte code.

Make sure that both languages can somehow use each other's byte code.

Make sure that the byte code can be run on any platform.

Voila lol there you have it :D

( Short message: short of time ;) )

Skybuck.
J French
2004-01-19 17:31:47 UTC
Permalink
On Mon, 19 Jan 2004 16:14:26 +0100, "Skybuck Flying"
Post by Skybuck Flying
Write a C++ compiler which compiles to some byte code.
Write a Delphi compiler which compiles to some byte code.
Make sure that both languages can somehow use each other's byte code.
Make sure that the byte code can be run on any platform.
ie: write a JIT compiler or interpreter for each platform
- or ...
Robert Wessel
2004-01-20 02:10:59 UTC
Permalink
Post by Skybuck Flying
Nice text and all.
Actually I am now wondering about language independant and a platform
independant way of reusing code. Preferably compiled code (binary code).
COM is for windows only. Does Linux have something like COM. ?
COBRA comes close, although it more closely parallels DCOM.
Post by Skybuck Flying
.NET is windows only.
As another poster pointed out, the Mono folks (with MS support) are
working on changing that.
Post by Skybuck Flying
Java is multi platform but single language.
Lauguages from Ada to COBOL have targetted the JVM. See:

http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.html
Post by Skybuck Flying
A language independant, platform independant, object oriented way of reusing
preferably compiled code (binary code).
And I'd like a million dollars and a supermodel who wants to be my
girlfriend.
Post by Skybuck Flying
The only thing that comes close to that is using TCP/IP or some other
protocol which are usually language and platform independant.
API's tend to get platform dependant or language dependant ! :D
Without some sort of packaging tools, it's pretty much the nature of
the beast. Windows OCX's, as I mentioned, are an example of a way
around that.
Post by Skybuck Flying
I am thinking of one other example... Allegro which is like a game library
(which unfortunately, when I tried it didn't seem to work in delphi).
Allegro is like a C library or maybe even C++ library which is implemented
many times on different platforms. This is ofcourse inefficient having to
write
more or less the same code or having to write extra code per platform or
language.
Also I don't like C and to support platforms it really comes down to C
compilers usually... for every processor on the planet there is likely to be
a C compiler
somewhere hehe. C however is procedural so it doesn't fit the requirement
:|.
Seems like OO reuse is in a sad state :D
Reuse is hard, period, OO or not.
Post by Skybuck Flying
Communicating via protocols is also a bit hard and dangerous in the prospect
of hackers, security issues, also performance issues and reliablility
issues.
Not to mention driving firewalls nuts and limited funtionality thx to NAT
and ip address shortage ;) lol.
All of which is only an issue if you are creating a distributed
application that needs to cross a firewall.
Skybuck Flying
2004-01-20 10:44:01 UTC
Permalink
Post by Robert Wessel
Post by Skybuck Flying
.NET is windows only.
As another poster pointed out, the Mono folks (with MS support) are
working on changing that.
Man gimme a break.

More like setting them selfes up to get burned again.

But ofcourse linux people are like that... sticking their head in the sand
lol.
Nicholas Sherlock
2004-01-20 18:50:35 UTC
Permalink
Post by Skybuck Flying
Post by Robert Wessel
Post by Skybuck Flying
.NET is windows only.
As another poster pointed out, the Mono folks (with MS support) are
working on changing that.
Man gimme a break.
More like setting them selfes up to get burned again.
But ofcourse linux people are like that... sticking their head in the
sand lol.
I think if they were going to be "Burned", they would have been already.
They have support of big companies.

Cheers,
Nicholas Sherlock
Skybuck Flying
2004-01-20 22:33:47 UTC
Permalink
Post by Nicholas Sherlock
Post by Skybuck Flying
Post by Robert Wessel
Post by Skybuck Flying
.NET is windows only.
As another poster pointed out, the Mono folks (with MS support) are
working on changing that.
Man gimme a break.
More like setting them selfes up to get burned again.
But ofcourse linux people are like that... sticking their head in the
sand lol.
I think if they were going to be "Burned", they would have been already.
They have support of big companies.
Which says ofcourse nothing. Big companies get sued by bigger companies lol.
Post by Nicholas Sherlock
Cheers,
Nicholas Sherlock
Maarten Wiltink
2004-01-20 18:16:02 UTC
Permalink
"Robert Wessel" <***@yahoo.com> wrote in message news:***@posting.google.com...
[...]
Post by Robert Wessel
COBRA comes close, although it more closely parallels DCOM.
Er... that's CORBA, not COBRA, right?
(Common Object Request Broker Architecture)

Groetjes,
Maarten Wiltink
Robert Wessel
2004-01-21 03:21:42 UTC
Permalink
Post by Maarten Wiltink
[...]
Post by Robert Wessel
COBRA comes close, although it more closely parallels DCOM.
Er... that's CORBA, not COBRA, right?
(Common Object Request Broker Architecture)
Ahh... spell checkers... ;-)

CORBA, of course.

J French
2004-01-19 11:31:04 UTC
Permalink
Post by Robert Wessel
Post by Robert Wessel
"Interfaces", BTW, do not have to be traditional APIs, but rather any
reasonably clean seam between components. For example, you could
write a multi-pass compiler, and the interface between each pair of
passes could be the layout of the pass output file, or an interface
could be the definition of the datastream passed between two
components via a communications pipe of some sort. In fact, as a
general rule, the less "API-like" an interface is, the more likely
that you're going to avoid excessive coupling across the interface.
Another excellent example of a non-API "interface" might be the
central database for a system. Consider an accounting system. To a
large extent the AR, AP, GL, Payroll, reporting, etc., subsystems (as
well as smaller sub-subsystems) are independent of one another, and
interface via the database schema.
I'm not convinced that using that approach is a good idea
- it suggests lateral interdependencies
- when hierarchical dependencies make the system easier to understand

Watertight compartments, with highly defined 'interfaces' are much
easier to create and maintain
Robert Wessel
2004-01-20 02:17:01 UTC
Permalink
Post by J French
Post by Robert Wessel
Another excellent example of a non-API "interface" might be the
central database for a system. Consider an accounting system. To a
large extent the AR, AP, GL, Payroll, reporting, etc., subsystems (as
well as smaller sub-subsystems) are independent of one another, and
interface via the database schema.
I'm not convinced that using that approach is a good idea
- it suggests lateral interdependencies
- when hierarchical dependencies make the system easier to understand
Watertight compartments, with highly defined 'interfaces' are much
easier to create and maintain
The database (schema) is at the apex of the hierarchy.
J French
2004-01-20 09:13:09 UTC
Permalink
On 19 Jan 2004 18:17:01 -0800, ***@yahoo.com (Robert Wessel)
wrote:

<snip>
Post by Robert Wessel
Post by J French
Watertight compartments, with highly defined 'interfaces' are much
easier to create and maintain
The database (schema) is at the apex of the hierarchy.
That seems an odd way to design an accounting system
- as an extreme example :-
the relationship between the payroll and the rest of the system is
very tenuous

I see such things more as 'sun and satellites'
- the central part being a form of General Ledger
(although it would be a 'virtual' GL)
Bruce Roberts
2004-01-19 19:55:18 UTC
Permalink
Post by Skybuck Flying
Hi,
One programmer can only do so much.
So lately I am thinking how multiple programmers could work together and
create huge applications.
I am thinking about seperating everything into API's.
I know windows is mostly made out of DLL's... but those are procedural
programmed. ( C )
Not necessarily. IMO one should treat a dll much like an object. It doesn't
matter how it was written or what programming techniques it employs the
bottom line is that it offers a particular functionality and and interface
so that callers can benefit - just like a Delphi class.
Post by Skybuck Flying
Are there any other ways of splitting applications into multiple possibly
reusable language independant components ;) ?
This has been a goal since at least the design of COBOL. Take a look at COM
and .net both are attempts at this. As you will quickly see they are, for
all their limitations, quite complex. An o/s itself offers a rudimentary
environment that meets your goal. As another poster suggests, even a
database oriented approach can be used.

I think one can take a few lessons from the real world. Despite the obvious
merit of a common verbal and written form of communications, humans continue
to maintain and even invent different forms. Many of the reasons for this go
well beyond our need for cultural distinction. There are environments in
which a particular form of communication is much more suited than others.
I'm not at all sure that it is even reasonable to expect that one can create
a common environment in which any program can be written and run on any
platform. (I guess we will find out as things progress with .net.) That is
not to say that I think the goal is unobtainable. Rather IMO one ends up
with an environment that while useful in a particular context will very
quickly become dated and overly limiting.
Loading...