What is a model?

Source: Internet
Author: User

Excerpt from: Open Source it
1) The model must be an object (class)2) the properties of the model object must be persisted (saved) after it has changed, and then it is: Entity object: Commodity object, Order object 3) when the properties of the model object change, do not persist, IS: Business service object, base service object, helper object: Page Flip object, database connection object, order commodity validation class 4) for simplicity, many projects write business in control, Use the model primarily as an entity object: Access thinking 1 user registration scenarios in which every business within the business can write 1 service objects (classes), at least 1 methods of each business object's change each service object can be stored/taken multiple entity objects create order scene check book item: Can Sell (presence/inventory /promotional time) check the booking order item: The user can Buy (level/can participate in the event/reach the event online) to check the order itself preferential policy, the user is using the correct check the address of the order itself/contact/payment Method/distribution method, etc. correctly create order Total price, and verify: According to the offer/postage/insured /invoice ETC Create Order Processing user's offer//Processing commodity inventory processing user Shopping Cart Payment order scenario//Check whether the order can be paid: order time//check whether the order item can be paid: whether it can be sold (presence/inventory/preferential activity time)//Check the booking item: the user can buy (level/ can participate in activities/reach the event on-line) Create payment parameters Submit Payment Interface Order Payment success Scenario Check callback data authenticity Modify order Status processing Merchandise inventory processing points gift etc 5) 4 Color prototype analysis method partplacething (PPT Green): Basic entities: Goods, people, departments, posts, Location, Fixed asset description (DES Blue): Classification of the underlying entity: Commodity classification, Department type, post level, type of person, location area, item classification role (yellow): role: In a particular business situation, increase the business capability (method) of the underlying entity. Use decorator mode Momentinterval (MI red): Business scenario. such as: generating orders, adding shopping carts, departmental moves, job mobility, employee turnover, product sales, outbound Momentinteval (Midetail red): Entity: Detail records in the business scenario: Order Details, sales details, inbound details, out-of-Library details role There are about four ways to achieve: 1, Use dynamic proxies to dynamically inject behavior into PPT. 2, explicit interface implementation + partial class. 3, the Field Service. 4, the State of the field services, the status of: a PPT instance.

What is a model

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.