Strong type weak type

GPS platform, website construction, software development, system operation and maintenance, looking for Senda Network Technology!
http://cnsendnet.taobao.com
from the official blog of Senda Technology
http://www.cnsendblog.com/index.php/?p=525

[Strong Type Weak Type]
has always said that C # is a strongly typed language. In layman's terms, it means that the type of "variable" in C # is clear at the time of development: String is String, Int32 is Int32, there is no dispute. The advantages of strong typing are many, and you can give a few examples at will if you open your mouth:

Can you enjoy the code hinting function?
Can you get the support of refactoring tools?
Can you find more errors at compile time?
 But C # is not an "absolute" strongly typed language because it also has weak types, that is Object. We know that Object is the ultimate base class of all types, and any type of object can be referenced using Object. But once converted into Object variables, the code hints disappeared; even if we "explicitly" the exact type of the object, it must be used through Cast-not to mention that it forms a kind of "abuse" or "misuse" opportunity. For example, an error code may be passed into an object that does not conform to the agreed type, which will cause an error. Even more serious is that such errors may only be discovered at "runtime", and the compiler is powerless to do so.

Object-relational mapping (ORM, Object-Relation Mapping) mode refers to the persistence of all entity domain objects in a single component, encapsulating the details of data access. ORM provides another mode for implementing the persistence layer. It uses mapping metadata to describe the object-relational mapping details, so that ORM middleware can act as a bridge between the business logic layer and database layer of any Java application.
The main problem solved by ORM is object-relational mapping. Both the domain model and the relational model are based on the conceptual model. The domain model is object-oriented, while the relational data model is relation-oriented. In general, a persistent class corresponds to a table, and each instance of the class corresponds to a record in the table

GPS platform, website construction, software development, system operation and maintenance, looking for Senda Network Technology!
http://cnsendnet.taobao.com
from the official blog of Senda Technology
http://www.cnsendblog.com/index.php/?p=525

Guess you like

Origin blog.51cto.com/14036626/2487346