문제

I have a codebase, which will be used by several applications.

What techniques would facilitate this requirement (service layer?)?

Thanks

도움이 되었습니까?

해결책

I don't see what your actual question is, but I can tell you that a Service Layer is unlikely to be what you're after.

A service layer will provide communication between systems (including ones that are built on different platforms); and a messaging based approach can also be used between components or layers within a system (application). Sharing all or part of a code-base is not a requirement in either of these scenarios.

I have a codebase, which will be used by several applications.

You have a codebase or you're going to have? "Will" infers you're not there yet.

What techniques would facilitate this requirement?

What requirement exactly? If you meant "going to have" then I guess you're after guidelines on writing code that can be re-used by several applications?

Give us some more info and I'll expand my answer :)

다른 팁

This is commonly solved with one of two patterns: library or framework.

Using libraries, one factors out the common code and puts it in dedicated libraries. These libraries are used by actual applications. In the library scenario the application provides the logic for starting, initializing and coordinating the program logic, in simple C terms: the main() function. The application specific code calls library functions.

With a framework, one basically builds a completely runnable application which is extended or customized by hooking program logic into the framework. A framework typlically provides the logic for starting, initializing and coordinating the program logic, the custom code gets called by the framework code.

Which of both to use depends on the scenario and the effort to put into. Libraries are much easier to build than frameworks but with frame works done well, code re-use is much better.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top