views:

78

answers:

1

I wasn't completely sure how to phrase what I wanted to ask in the title so I'll try to clarify it better in what follows.

For C++ software library developers, what abstract interfaces do you find yourselves rewriting often between projects/jobs? For instance, I would imagine that it is fairly common practice for different projects to write abstract interfaces for "printing" objects and for serializing objects based on the requirements of that project (even if they are implemented in terms of other established libraries which provide a lot of that functionality). What are your experiences with this?

If the question is too vague feel free to recommend how to clarify it.

A: 

I don't know if the question is c++ specific. Seems like a general programming question. I find even when I do JS coding I still use the abstract concept.

I think the simplest answer is you use abstract classes whenever you do the same set of operations on different types. The abstract methods fill in the details of that particular implementation, the other methods provide the framework, i.e. the "same set of operations".

As a java developer, it is very common to use the abstract pattern for DAO CRUD operations. Its always the same, the only thing different is the type...

hvgotcodes
I am not familiar with Javascript or its common patterns. What I was trying to figure out was which aspects of general programming are not well covered by standard C++ and hence necessitate the continual reinventing of similar abstract interface patterns.
bpw1621