Some counter-examples classified by field

Work for so many years, not a few to more recognized in the planning field, collected more counter-example. Counterexample point of view is not necessarily right, the first broken the habit of people take for granted.

 

Orders domain

From this we can obtain the relationship between the entity and field: many to one relationship between the entities and fields. An entity can not be called a field of more than one responsibility only high similarity collection of entities, in order to be called a field. An entity belongs only to one area, if an entity belonging to a number of areas, you may need to think about the next, which in many fields is not exactly the same domain. There are areas of responsibility to manage the life cycle of the entity, which is managed on the management strategy, just can not fall into the code is not on tactics, only entity able to fall into code, not the field.

So we begin with the definition of areas as: high similarity N entities gathered, consisting of knowledge, influence or scope of activities.

For example, the domain trading is the knowledge of orders by multiple entities entities and the order details entities and other components of the marketing domain is the purview of marketing activities by multiple entities entities and entities marketing tools and other components.

Counterexample for example, we have orders entity, so the students have invented a domain name for the order, in fact, this name is not accurate, the entity can not be called a domain.

 

Domain sale

Then counter-example for example, the electricity supplier industry, there is something called the pre-sale, sale For example, Xiao Ming pre-orders today to buy a TV, paid a deposit of $ 500 is required to pay the remaining balance due in 10 days, through this form , businesses ahead of the target buyer, the buyer can get some discount, then there are some students proposed a new field for this business: sale domain, the main reason is to be released in the pre-sale merchandise, product listings, single page, order more local details page, which have pre-sale shadow, and has a pre-sale related business, so the sale can also be referred to as a field, so right?

Is clearly wrong, we can only be called a pre-sale orders scene, but the scene in many areas have set some values, such as providing pre-sale orders only commodity A can participate in the sale, such as providing participate the order details page is not the same, but we can not from the sale of this single scene, abstract and sale of high similarity responsibilities entity, an entity can not be abstracted.

If you put such a scene called pre-sale areas, so as your business grows, you'll be horrible to discover that many of your domain, the domain such as the purchase of $ 0 commodity domain, domain payment stage, the scene is endless of your field will be endless.

So we divided the field, the most taboo is to the scene to divide the field, we should divide the field of business objects polymerization.

 

Purchase domain

For example, in a single trading system, the destination time before there ⼀ domain called the purchase of the domain. According to past business background, zoomed home easily receptive to this domain. Feel very reasonable grounds, ah, there are a variety of situations when purchase orders. However, when we all purchase scenario Using a robust mapping found, the object of these restriction scenario involves the following: According to the buyer dimensions do restriction: ⽐ example, according to the letter Use buyers into ⾏ line with levels, etc. line purchase management process (more updates Buyer, such as marking, etc.), the object according to the object buyer. Buyers should be the target of "domain member" to manage the reason ah ~ ~ ~

By goods dimensions make the purchase: ⽐ for example, to a specific commodity play ⼀ some of the standard, which can be hired ⾏ trekking area for the purchase of such goods. And the object is a commodity subject. Commodity object should be a "commodity domain" to manage ah ~ ~ ~

Press once enjoyed special rates do if the purchase (⽐ bought specials such as half years, not six months during the year can not buy).

This object has information related to the buyer and order and so on.

Obviously, this field is in accordance with the purchase of "scene" dimension into ⾏ trekking extracted ⽽ rather than according to the "object" into ⾏ trekking aggregation produced ⽣ born. So divided, ⼀ a problem become extremely raw, the "scene" is not not enumerable, easily changeable. This year there are 10 to apply it with scenes of next year as the market develops, there may be a separate warranty to apply it with 20 scenes. If, according to the "scene" dimension to do field division, will lead press

According to this embodiment ⽅ domain division, it is not unstable!

Published 91 original articles · won praise 7 · views 120 000 +

Guess you like

Origin blog.csdn.net/Ture010Love/article/details/102858408