Proficient in. NET Enterprise Project Development

Source: Internet
Author: User

(P7) for classes at any logic level, other classes at the same level should be reusable; for all other classes that require this data within the same scope, classes that provide data should be callable;

(P9) most enterprise systems are built using platform-independent technologies;

(P16) well-designed code must be able to be broken down and divided into independent functional blocks;

(P17) enterprise development usually requires a strong coupling degree;

(P19) the true evaluation criteria of loose coupling classes are the ability to write unit tests for them;

(P21-abstract interface is a popular method for disassociation of types. This method is required when you try to implement loose coupling for classes that require interaction;

(P35)

Designing maintainability is one of the most important goals when creating software;

The biggest resistance that is not easy to change comes from dependency-that is, those classes that depend on other classes in the system. Dependencies may occur in various aspects of the Code-high-level classes may depend on lower-level classes, and vice versa;

(P46) flexibility measures the difficulty of changing the code;

(P47) reusability measures the portability of code and the extent to which the software can be reused elsewhere;

(P63)

Dependency Inversion Principle (DIP) is to separate classes from specific implementations so that these classes only depend on abstract classes or interfaces;

Robert C. Martin defines DIP as follows:
(1) high-level modules should not depend on low-level modules. Both of them should depend on abstraction;
(2) Abstraction should not depend on details. Details should depend on abstraction;

The first step of applying DIP is to extract interfaces for each low-layer dependency;

(Bp65)
Dependency injection implementation method:
(1) constructor injection: constructor injection is usually used in the final stage of refactoring. It is the process of providing dependencies through class constructor;
(2) Set function injection-set the process of injecting the dependent module into the high-level module by setting the function (Setter) attribute;
(3) method injection-method injection requires that an interface be implemented. The high-level module will introduce and inject this interface at runtime;

(P68) setting the function injection method may not be as obvious as constructor injection. However, if you need to inject a large number of other Dependencies into the constructor, it may be more wise to move the optional dependency to the method based on the set function, because this makes the structure of this class easier to understand;

(P83) before writing code that allows the test to pass, you must first fail the test;

(P91) first, you must know the basic principles and what you are doing before you can take shortcuts to increase the speed;

(P149)

Inversion of control is a general rule, and dependency injection is the implementation of this rule;

The IoC container is just a dictionary containing types and implementations;

(P153) spending all the development time on the infrastructure focus and cannot build applications faster;

(P157) Automatic Connection dependency is the biggest benefit of using IoC containers;

(P169) middleware-computer software that connects software components or applications;

(P189) The main purpose of the application and the only purpose of our existence as a developer is to solve business problems;

(P190)

There are three main modes in the business logic layer: Transaction Script, Active Record, and Domain Model );

Transaction script is a very simple business design model, which follows the process-oriented development method rather than the object-oriented method. It creates a process for each business transaction. Each process contains all the business logic required to complete the business transactions, including workflows, business rules, and verification checks to all the persistent storage content in the database;

(P191) one advantage of the transaction Script Mode is that it is very simple and easy to understand. It is easy to understand its role without any preliminary knowledge about the mode. If a new business use case needs to be processed, you can directly add a new method to process it. This method will contain all relevant business logic;

(P192)

The Active Record mode is very popular. This mode is especially effective when the underlying database model matches your business model;

In the activity record mode, each business object is responsible for its own persistence and related business logic;

(P194) the main difference between the domain model and the activity record model is that the business entities of the domain model exist in the domain model and they do not know how to persist themselves, the data model and business model do not necessarily have a one-to-one ing relationship;

(P198)

Another advantage of the domain model mode over the transaction script and activity record mode is that because the domain model does not contain data access code, it is easy to perform unit tests on it, instead of simulating the dependencies of the data access layer such as the stubs;

One of the most important strengths of a domain model is to process complex business logic. However, when an application contains a very small number of business logic, the full use of Domain Models is somewhat overutilized;

(P200) The best way to learn is through examples;

(P255)

The data access layer includes all CRUD (create, read, update, and delete) methods and query mechanisms, which enables the business logic layer to retrieve Objects Based on any given conditions;

The data access layer should not contain any business logic, and the business logic layer should access the data access layer through interfaces. The implementation of the data access layer can be easily replaced by the communication through interfaces, without any negative impact on the rationality of the software;

(P256) the role of ORM is to build a bridge between the relational model (database) and the object-oriented model;

(P257) The DataContext class is responsible for tracking changes and managing identity ing and concurrency concerns. It is the manager of all entry points into the database;

(P258) Linq To SQL contains a DataContext class that tracks data changes and maintains the ID ing of all objects retrieved from the database;

(P272) the powerful feature of Entity Framework is that the relational data model does not require a one-to-one ing with the business model;

(P273) Entity Framework is not limited to databases. In an entity model, data can be extracted from many different data sources, including services for data sources;

(P288)

The idea of Persistence Ignorance is to keep the business object from being associated with the data access layer, so that the business object only contains the Code related to the business logic;

One of the best features of nhib.pdf is its support for persistence transparency-this means that business objects do not have to inherit any base classes or implement any architecture interfaces;

(P321) the object relational er builds a bridge between the relational data model of the database and the Object-Oriented Domain Model (more accurately solving the mismatch problem );

(P324)

MVC splits the front-end of an application into three conceptual layers-the Model represents the data of the application, the View represents the Visible Component in the UI, and the Controller) data communication and business rules between models and views are processed;

The primary task of MVC is to isolate data from the UI as much as possible. Through this separation, developers can easily modify the UI or data and business rules without affecting each other;

(P336) Our goal is not to unify the development field into a full-featured design, but to build applications, make it secure, testable, and flexible enough to adapt to the scaling and growth of features;

(P340) the core of the MVP model is the model, or more accurately, the logic part of the code, which processes the business rules and logic;

(P341)

In most cases, the dashboard is a testable abstraction for views;

The view or UI part of the ASP. NET page is the main entry point for submitting information to the Web server or obtaining information from the Web server;

(P348) the purpose of the provisioner is to process the input and output from the view;

(P370) forms are composed of actions and methods;

(P371) Web MVC separates the incoming request from the specific output and routes the request to the corresponding method on the server object;

(P377) Every conceptual entity in the system is usually composed of a model, a controller, and n views;

(P380) the power of Web MVC is that it can combine the correct Architecture Pattern with Rapid Application Development;

(Optional 3) ASP. net mvc view has a reference named Model. This reference is used as a handle to the Model object referenced on this page;

(P394) in the Domain Driven Design field, it is usually the responsibility of the Domain model object to understand the rules of the Domain model object and determine whether they violate these rules;

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.