Anatomy object frame (6)-Summary

Source: Internet
Author: User

1. entities should be simple and the layers should be better flat, which facilitates object traversal in various communications (such as WebServices, WCF, remoting, and wcf ria );

2. Although the entity should be flat, it does not mean that there cannot be inheritance layers, because such layers can benefit from many management and architecture advantages.

But pay attention to two points: 1. Use interfaces whenever possible, and the main purpose of interface methods or attributes is to provide standard interfaces for uniform object access.

2. The code of the attribute should not be complex and should not be dependent on the outside, but the method should be more like this. The code that can be completed in the operation class or other auxiliary classes should not be arranged in the Entity class as far as possible.

In the entire architecture system, constants such as entity classes and system-defined enumeration should be at the lowest level of reference, that is, entity class libraries do not reference yourself in principle.

Other class libraries defined (of course, if you place the system's constant definition, enumeration definition, and other system normative definitions in a class library, the entity class library can still be referenced ).

3. dynamically construct SQL statements based on entities (including configuration files) to interact with databases. Although data access and conversion classes are greatly reduced, a lot of flexibility is also lost,

If the relational database processing is more professional, leave it to the relational database for processing.

4. No matter what the framework or data goes from the interface to the database, there must be no less to do, but the methods are different.

Most of the database access functions provided by the Entity Framework can be automatically generated using the autocode tool. As for the cache, you still need to maintain some of them by yourself.

5. The cost reduction is not solved by a framework. If you choose improperly, the cost will increase.

This includes the learning cost of the physical framework, the follow-up cost, and the cost of saving the nation by curve when some problems are not well solved.

6. Although there is no need to start from the Assembly, in the optional range, try to use a more primitive method for processing based on durability.

This is mainly for the disadvantages of the physical framework.

7. Shipbuilding and chartering: either one can be selected by an individual, but the country needs to encourage shipbuilding rather than chartering. For enterprises, we will not discuss them in the current Chinese atmosphere.

8. The project manager creates or rents the resources as needed, but as a programmer, it is better to know more about the technology;

9. Although technology is not necessarily profitable, it is not necessary to make money, but programmers still need to focus on technology, because it is at least the need for your work for the moment.

On the whole, if the project scale is not very large, the foreseeable business relationship is not very complex, and the company does not plan to take the product line, then adopt a mature physical framework.

It should be a top priority; if it is a personal system, it is of course "come first.

When selecting an Entity Framework product, in my personal opinion, it is best not to use something from Microsoft. Although it is powerful, there are too many private goods.

 

 

Note: In a country where almost everyone wants to get rich overnight, talking about technology is a little out of date... but the punishment is about to begin...

Without the valuable technology in the market, we have exchanged a pile of government bonds that are not as good as toilet paper. The channel means violent leaks, but the cup is ours,

Why?

 

 

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.