How do you guarantee correct code reuse?

Often, when we introduce a new function into an application, we can create artifacts, such as useful methods or classes, that can be reused in other areas of our applications. These artifacts are not necessarily documented as functional requirements, as they are usually a side effect of our implementation options. As we often develop in teams, it is important to separate these pieces of code in order to prevent reuse and duplication.

Examples:

  • Useful Methods and Classes
  • Base class
  • Interface
  • GUI Control

What did you find the most effective way to share these artifacts?

How do you convey the assumptions you made while creating them?

How do you guarantee that they will be consumed correctly?

I am interested in best practices and proven methods related to documentation, code diagrams, meetings (?), To ensure the correct use of the code.

This question is very similar to: Finding reusable code , but I'm interested in a more active than reactive approach.

+5
source share
7 answers

, . . , ( ), .

/ ( -), , . . , , , API, , . -.

: , (Javadoc, Crystal Report, ), .

+3

- .Net, ...

, , , . , Luhn Mod 3, , , n .. , , , . .

+2

, , , . , / , , . , :

  • : , , , ..... , "".

  • : , . , ..

  • , : . , , . , .

. , . , . , , , , .

+2

.

, , , , .

, , , , . , , .

+1

Java, . SVN , . XML, .

+1

. , . , , /api . , . / , .

0

SOLID . : http://www.lostechies.com/content/pablo_ebook.aspx

-, , . , , x , ;)

Reuse is important and avoid duplication, especially when you are in the same product, or perhaps even a subsystem. It is important to always look for him, but do not let this interfere with progress in projects.

0
source

All Articles