Is it possible to reuse domain classes between different applications?

Asked

Viewed 56 times

5

Some materials including recent cite the possibility of reusing domain classes for different applications.

Example

This reuse is viable?

How he does in practice?

  • They are two contexts that this practice. In the text was addressed the reuse of classes and POO (Object-Oriented Programming) and in this case you should create library of dynamic links that would be one . dll in Windows or . so/. ldd in Posix(Unix/Linux/Mac and Windows with Posix layer) and in that library,Framework you would compile classes whose scope was common to several projects, such as the Cliente example that serves both the project of a video rental company as well as the project of a bank. To reuse the class just lynch its framework.

  • The second context is relational database. Where you can create the same framework concept but instead of having a compiled file you would have a cataloged SQL source directory containing DDL(Data Definition Language) instructions that would define reusable tables.

1 answer

1


Yes, it’s possible, but ...

Libraries and frameworks are concrete examples of code reuse. On Github, it won’t be difficult to find projects that address specific domains and, consequently, reuse the available code.

On the other hand, however, the idea of creating, for example, the "definitive" Product class, or the Person class, seems unattainable. Despite the broad interest in these concepts, they remain nonexistent in the standard libraries of the Java and C#ecosystems, for example. In Building Evolutionary Architectures (https://evolutionaryarchitecture.com/) there is a hint: we are constantly changing, including concepts, additionally, the proper perspective for a given domain of the concept Person, not necessarily suitable in another. In fact, it seems that there is always a difference, a detail, that simply prevents reuse as the concept was originally defined.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.