Xpo of O/R Mapping I know

Source: Internet
Author: User

(I declare in advance that. net is very unfamiliar, and at the same time the English level is very poor, so I understand the various O/R Mapping product features may be wrong, I hope someone can prove it, or let me correct the error, therefore, the written content may be wrong, but the mistake is not terrible, as long as you have said)

O/R Mapping is well known in the Java World. net is also getting more and more people's attention. At the same time, many such products have come out. I want to talk about their respective features and shortcomings in some popular solutions, at the same time, it will be interspersed with my original understanding and expectations of O/R Mapping, and also indicate my formal start. NET software development.

I may continue writing, maybe not, but it depends on the time. My main features are divided into the following aspects:

DB-> class or class-> DB
Multi-Database Support
Mapping Method
Link ing
Complexity of entity classes
Object set return Method
Null Value Processing
Lazy-loading
Session management
Transaction Processing
Cache
Oql Language Support
Criteria query Structure
Partial property query and expression Construction
Data Binding support
Blob support
Support for ing of other data objects (SP and view)
Support for calculated fields
Support for batch update and incremental update operations

We have talked a lot about xpo recently. (Not finished, because I want to go to bed)

O/R Mapping xpo

Product: Dev Express
Latest Version: 1.5

1. DB-> class or class-> DB

Xpo supports both, but it is more like a class-> dB persistence scheme, because its session supports generating database schema directly based on the class.

2. Multi-Database Support

In the internal implementation, xpo abstracts the data access layer. Theoretically, xpo supports any database, although currently only MSSQL and access are supported.
However, from the perspective of connectionprovider defined by connectionprovider, it has very limited support for database features.

3. Mapping mode
Because yes. so xpo uses custom attributes to process mappings, at the same time, ing can be completed without any attributes in the minimum conditions (at that time, the entity class must inherit the base class ). Its ing functions include name ing, index creation, selective ing, link ing, object class inheritance, cascading update, late loading, lock type, and null processing, basically, it can maintain the relationship between the crud and the class. Because xpo focuses on class-> dB, it does not provide classesCodeGenerator.

4. complexity of entity classes
The object class must inherit from the object base class of xpo to manage the state of the object class. The advantage of this is that you can directly call the save of the object class to save data permanently. Xpo has a default session. When the object class does not explicitly specify a session, the default session is called for saving all objects. save, and this default session has a default access connectionprovider, which can automatically complete the schema construction of the database, so sometimes the tutorial of xpo looks like this "simple": define the object class-> Create the object class-> call the save of the object class.

5. crud
This is one of the most basic and most used functions of O/R Mapping. xpo is quite satisfactory in this regard. However:
(1) because it does not use the proxy mechanism to intercept attribute assignment, it cannot perform operations only on modified values, all the persistent attributes will be updated to the database during storage, which is fatal in the case of multi-point concurrency.
(2) It cannot retrive data through the primary key. It can only be obtained through xpcollection or xpcursor. Every time it writes critiria to query data, how tired it is! (Yok-based identification can be implemented through session. getobjectbykey)

6. object set return Method
Dev's processing method is very similar to the processing method I have been dealing with. It uses xpcollection and xpcursor to encapsulate object sets and datasets. The former is a "Heavyweight" set, however, data in this set will always be cached and batch operations are supported. xpcursor is lighter, and pagesize can be used to set the page size, in this way, only the current page is loaded to an xpcollection for traversal.
Why do I only say that the representation is similar to my processing method? Because I have been reusing an entity-class instance while processing the dataset encapsulation, xpo needs to maintain the memory object or yes. net object overhead is relatively cheap.

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.