Consulting on the design of loosely coupled systems?

How to design loosely coupled systems that can often require data from each other, but do not necessarily belong to the same category?

For example, let's take the old Pet-shop example one step further and create a pet franchise. Each pet store has its own website with their contact information, promotions and current promotions.

Franchise owners want to have a list of all franchised pet stores along with contact information and possibly a few photos available on their corporate website. They want to be able to update this information and update any updates in both directions. They also want to automatically provide promotional information to all store sites.

Thus, in this case, the lists of shares are “owned” by the stores, and the contact information is partially owned by the “owners” of both persons, and the promotion information is “owned” by the headquarters. Due to arbitrary reasons, all this data cannot be stored in the same place.

Are there any best practices or common strategies to deal with this situation?

+3
source share
4 answers

I thought about this problem, and I express it by saying that relations between classes are defined contextually. And any model involving global static associations (an inherent connection) between classes is problematic.

Another example that I like to use is products.

A product can play a bunch of different roles. It is associated with OrderItem, which is associated with the Order, which is associated with the customer.

It is provided by the seller.

This is in the directory, maybe in the section and page.

It is the buyer's responsibility, if available from several suppliers.

Being able to easily handle this complexity is a fundamental advantage of the relational data model; and I have not seen that this is well regarded from the point of view of OOP.

, ORM (Object Role Modeling, . VisioModeler, InfoModeler ..), (IMHO).

( CRUD, ActiveRecords ..), . ( , LINQ , , .)

, , , , , .

+1

, , " " - , , .

, : http://www.soamag.com/I22/0908-1.asp

, , . , , , . , , - .

+1

, SOA . SOA -, , , Bill Poole Udi Dahan pub-sub async .

- : . .

SOA Sales services, . , .

-, , . NewPromotion, . , , . , , ContactDetailsChanged, .

, , -, , ..

: , , - , . .

- , , . NServiceBus. WebServices (tm).

, ( , ) . , , , - . ( ).

, :)

+1

( SOA). ESB . , , ESB .

IMHO /.

, n-level Java , EIS:

  • .

  • JAR ( EAR) /JAR.

  • .

  • DAO ( , ) .

- , , . WAR . WAR EAR , , .

OSGi OSGi ( ).

, / .

.

..!

0
source

Source: https://habr.com/ru/post/1699638/


All Articles