I am c++ developer,I am planning to write a library/module in c++ which is used by some set of users/application on Cross platform.
I am learning library/module writing, According to my experience and some reference I have created some set of rules for myself :-
Tools Preference :-
- To create cross platform library Projects I will prefer to use CMake
- To do active development I have choose MSVC Compiler and Visual Studio Editor because It has powerful debugging feature.
Code Organization :-
Header Files =>Private(Folder)
=>Public(Folder)
Source =>Src(Folder)
Project Organization :-
XXX_Library => Headers
Src
XXX_Test => Headers
Src
Examples => Src
Coding Rules :-
- While exposing an Interface I mainly use C Language to avoid Cross
Compatibility issues. - Use Error Code instead of exception
- Always use Type-def if using any Third party library
- While writing an class I will try to Follow SOLID
Those who are experienced in library Writing please share your views that will be extremely useful for me.
such as,
- any obvious design pattern every Library/Module writer should follow?
- any Well written open source library to refer ?
- any Well written book every Library/Module should follow?
Aucun commentaire:
Enregistrer un commentaire