Design of a business model (I)

Source: Internet
Author: User

Recently, I came into contact with a website. The designers thought of the business object as an entitybase-class simpleentity and complexentity. simpleentity had many properties and complexentity was merged by many profile classes, each profile has many properties. Most specifically, the attribution relationship between complexentity and profile objects is associated with an attribute of the profile object.

This design seems very flexible, but I personally keep my opinion on it. There are three reasons:

I. the complex relationship between business objects should be avoided as much as possible. Here, splitting a business object into multiple profiles seems to aggravate the complexity of the class relationship and the expansion of the number of classes.

2. a property of the profile object is associated with the complexentity class, instead of directly containing the profile object set by the complexentity class. In this way, the entire object (including the profile and complexentity) can only be obtained through reflection, in this case, there may be problems with efficiency (not demonstrated ).

3. dispersed the attributes of a logical object into N profile objects (n data tables will be created after nhib.pdf persistence ), the query efficiency of attributes across profile objects may be affected.

For some flexibility, the above three questions are not minor. How is this design?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.