Xcodefactory3.0 full introduction-Preface

Source: Internet
Author: User

I used to write some articles on how to use xcodefactory and how to use the data layer generated on the csdn blog, but they are all aimed at one aspect and have no integrity, in addition, because 3.0 has some changes in the operation interface and the generated code structure, many previous articles are no longer fully applicable, so they have the intention to write "xcodefactory3.0 full strategy. Since it is a complete strategy, we naturally need to introduce all aspects of xcodefactory3.0 in a complete and systematic manner, so that xcodefactory3.0 can truly become a good helper for interested programmers.

The full strategy will be introduced one by one based on the following topics:
(1) xcf conventions
Every programmer has his own coding habits. But to better use the code generated by xcodefactory, it is best to follow the xcf conventions in some styles/habits. Of course, the xcf convention is not a strange and unacceptable specification. It complies with the C # coding standard as a whole. Therefore, if a programmer's coding style is consistent with the C # coding standard, then, the xcf conventions can be integrated without any changes. However, in reality, there are still a lot of programmers whose style of writing code is not the same. If you still stick to the style you think has personality rather than follow the xcf conventions, sometimes (in rare cases), the data layer code generated by xcodefactory may encounter compilation or running errors. The xcf Convention aims to conform to the C # encoding specification, and to simplify data-Layer Code Generation. Accept the xcf conventions with very few limits, and you will get a great return from xcodefactory!

(2) Basic Idea of xcodefactory data layer
Nowadays, there are already many automatic generation tools for the data layer. The authors of these tools have their own solutions for the design of the data layer, and xcodefactory is no exception. For example, some implement the database access operation as the public method of the Data Object (corresponding to a table in the database), and some implement the Data Object independently from the visitor. Xcodefactory adopts the following idea.

(3) xcodefactory3.0 main interface introduction and simple examples

(4) data access interface idbaccesser
All generated data visitors implement the idbaccesser interface, which is inherited from the other three interfaces. The three interfaces are Query Interfaces (based on object operations), command interface (Add/delete/modify, Object-based operation), relational interface (dataset, datareader, relational operation ). Automatic paging is also supported.

(5) simplify data access using dataentrance (1) (2)
Dataentrance is a static class that allows users to access data more easily by bypassing idbaccesser.

(6) complex examples of multiple databases
If your vs. Net project involves multiple databases, some of which may be sqlserver, some access, and Oracle, don't worry, xcodefactory can handle it with ease!

(7) advanced features
The data-Layer Code generated by xcodefactory supports many advanced features, such as transactions, data paging, blob delayed loading, and data caching.
After reading all these topics, I believe that xcodefactory can become your right-hand assistant to accelerate your application development :)
In addition, the main function of xcodefactory is to generate data-Layer Code (and simple UI-Layer Code). xcodefactory also has many additional functions, for example, you can automatically generate configuration files and corresponding operation classes, and automatically generate Message Protocol Resolution classes. These will be introduced one by one in subsequent articles! Thank you for using xcodefactory. I hope to provide comments and suggestions!

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.