What does it mean "We use C++/C as backend"

Rahul picture Rahul · May 3, 2011 · Viewed 17.8k times · Source

What does it mean when people say we use C++/C as backend. Lets say facebook for instance whereas frontend is php. How can one bind any other lang to c++/c?

My context is web.

For instance user using a web site...Its agreeable to think that o/p is generated by php using templating..

but how is database/caching/web services/business logic etc implemented in c++/c

Answer

Jacob Mattison picture Jacob Mattison · May 3, 2011

Most languages have some way to connect to external components. For example, PHP has the COM constructor, which allows you to access any OLE-compatible component from within PHP. That component is probably a DLL, and could easily be written in C or C++.

Additionally, a well-designed system will consist of layers that are separated as cleanly as possible. So, for example, the view engine could potentially communicate with the business-logic layer via web services, or via an Enterprise Service Bus. In this type of scenario, the two components need not be written in compatible languages at all, so long as they can make or consume web service requests.