Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7699971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:36:03+00:00 2026-05-31T22:36:03+00:00

I have a set of C++ libraries and now I would like provide a

  • 0

I have a set of C++ libraries and now I would like provide a common API interface for this dll’s!

The idea is to use a facade design pattern; but cant apply this on dll’s, only on objects/classes! I think it’s necessary to merge all the code in one single library (single project) with this design, isn’t it?

Any ideas?!

Thank you very much!

greets

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:36:04+00:00Added an answer on May 31, 2026 at 10:36 pm

    Background:

    • You have this big C++ library, spanned across multiple DLLs.
    • Your library exports C++ objects, not C functions (so it’s not binary portable across different compilers).
    • You want to provide a simple interface to provide access to this library, you’ll use facade pattern to achieve this.

    You don’t need to pack everything in one DLL. One of the purposes of this pattern is to simplify dependencies. Its clients can have only a dependency to that DLL (but your interface could be spanned across multiple DLLs, if needed). For example:

    • Base64.dll: it contains C functions to encode/decode text in base64.
    • Network.dll: it contains C++ objects to manage network connections.
    • RegEx.dll: it contains C++ objects to parse RegEx.
    • MailHelpers.dll: it contains C++ objects to send/receive raw e-mails.

    Now you want to provide a simple beautiful interface for this task. An object to represent a message, another one for the connection and so on. You’ll create another DLL (Smtp.dll, for example) that depends on Base64.dll, Network.dll, RegEx.dll, MailHelpers.dll and it exposes one common high level C++ interface. Its clients will add a dependency to this DLL and they won’t know anything about others.

    So, finally, the answer is no, you do not need to merge all code (of what you want to hide with a facade) in a single library.

    Second scenario: your facade library is going to be more complex. You want to strip all advanced tasks from Smtp.dll to another library and you plan to create a helper library to make common tasks very easy. You’ll have something like this:

    • SmtpCore.dll: a simplie, unified interface for SMTP clients.
    • SmtpTasks.dll: a helper library with simple methods for common tasks. It depends on SmtpCore.dll, its clients will have only this dependency (for example).
    • Mail.dll: the full featured library. It adds the classes to receive mails using various protocols. It depends on SmtpCore.dll and other DLLs. Its clients will have dependencies to Mail.dll and SmtpCore.dll.

    Second answer is no again, you’re using a facade pattern again and your facade is spanned across multiple DLLs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which would like to utilize the Google Guava libraries (on
I have an existing set of .net libraries that I wish to call from
I have created a set of default project templates and development framework libraries. I
I have been trying to set up Eclipse and the Arduino libraries. I have
I have set a background on the data-role=page element like so <div data-role=page style=background:
In my project I have two libraries that would currently result in a circular
I have a 'Description' field in a form. I would like the user to
I have a page exported from a wiki and I would like to find
I would like to hear from people who have real world programming experience in
I have a program like this: it compiles files in memory and then executes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.