Frontend and backend communication

Kai Meyer kai at unixlords.com
Thu Jul 28 12:37:19 PDT 2011


On 07/27/2011 04:40 PM, Dainius (GreatEmerald) wrote:
> No no. It's the other way round. Shuffle() is in the library
> (backend). PlaySound() is in the executable (frontend). Since I don't
> want the library to be dependent on any sound libraries, I can't have
> PlaySound() in it. And there is no other way that I can think of to
> execute PlaySound() just at the end of Shuffle() without capturing
> events (since Shuffle() itself is called by a whole lot of different
> functions across the library, and not from the executable itself).


One reason for the confusing responses is that in your original post you 
said:
"a frontend (a library)", "a backend (an
executable)", "Shuffle() is a backend function", and "PlaySound()
is a frontend one".

Frontend->library->Shuffle()
Backend->executable->PlaySound()

Then in this email, you say:

"Shuffle() is in the library (backend)", and "PlaySound() is in the 
executable (frontend)"

Backend->library->Shuffle()
Frontend->executable->PlaySound()

I'm assuming that this is the more correct version.

Depending on what PlaySound needs, you can pass the function as a 
parameter to Shuffle().


More information about the Digitalmars-d-learn mailing list