I want to write a C++ program that plays MP3. Among available MP3 decoding libraries, I chose mpg123.
I noticed that, besides being able to link against libmpg123 and make the necessary function calls in my code, the library includes a back-end/front-end interface that enables me to communicate with it’s executable, and thus not having to include it’s code in my program.
What are the advantages of writing a front-end rather than simply linking against the library?
Most of the advantages comes from process separation between your executable and the library executable:
Of course, there is a performance penalty by using an external communication channel. But the benefits of having such decoupling can be quite impressive.