Moon. ORM self-report and description

Source: Internet
Author: User
1. Moon features
---- All wisdom is simple, but not known. It is also the main feature of Moon. ORM: the greatest truths to simplicity.

1. high performance is Moon. one of the advantages of ORM is also one of the main purposes of my architecture. I have improved its performance to the extreme. as I said before, it was designed to make up for the performance problems encountered in the project. it can be said that the entire framework data processing adopts the pure ADO. NET for automatic compilation and combined with EMIT to quickly generate entities.

I have to admit the elegance brought by the linq and lambda statements, but at the same time, we need to acknowledge the limitations of linq. some people may say that they can make up for it by means. For example, some people write articles to Improve the Performance of linq, but we need to acknowledge the two facts that they can be optimized only after they identify the linq system. That is to say, the nature of linq determines performance loss. again, linq is not a silver bullet, because it is almost impossible for the responsible scenario to do so. What's more, the SQL statements generated by linq are not necessarily what you really want. (Note: I am not a competitor to linq, but to tell the truth, as I once said: in actual development, there is no silver bullet, and there is only a balance point. It is enough for an architecture that can meet the needs to solve the actual situation) in addition, I do not need to write another framework to create something similar to nhib.pdf or an Entity Framework. I always think that we need to develop a unique feature and advantage.

2. ease of use is powerful. I think Moon. ORM should be used to know this. simple configuration, intelligent awareness, and code generator assistance. Moon can be used for SQL.

3. supports multiple databases and multiple data sources. moon. ORM is your best choice. for example, if your system uses MSSQL by default and you want to use MYSQL at the same time, you only need to instantiate an engine. DBFactory. getEntity <Person> (pjy_AdminRoleTable.RoleID.BiggerThan (0), new MYSQL ("connection string"); of course, you can make the engine global.

4. Syntax sugar function. The result of my personal use is about 70% of my actual needs.

5. native support for. NET 2.0.

6. database transformation problems, if you find that one day your database needs to be changed from mysql to mssql, you only need to change your configuration file. (Of course, you need to pay attention to the SQL syntax difference, if you are using native SQL for operations ).

2. Project Experience

After the development of the two companies, stability can be learned. it was applied to the one-year development framework in the main products of hefu network. and the new system of PAN jiayuan culture media's main platform. they are also affirmed by Moon fans in their actual projects.

3.Usage Problems

This framework is free for anyone and individuals.

Someone once said, 'No source code, so I can't use'. I can't beat Microsoft, but we can change to another location: Do you know the bug in. net framework 3.5 sp1? Is there any bug message in Microsoft's library? Moon. ORM Standard Edition, free of charge (including API documentation) and group technical support. for enterprise users, I will provide specialized services and technical support as well as a more elegant and powerful Enterprise Edition Moon. orm code generator tools and technical training materials.

4.FAQs
1. The Code Generator does not provide technical support in sqlserver2000.
2. The table code generator without a primary key will report an error

3. Some non-. NET Field Types in the system are not supported

5.Comparison of similar products
1. I don't know what's going on today for the performance of the Entity Framework, but 4.0 of tests are sufficient to see http://www.cnblogs.com/humble/archive/2011/05/19/2051053.html
This is also one of the reasons for Project extension in my previous company. At that time, Moon. ORM or version 1.0 was named after Qin. Data.
I am not talking about the Entity Framework, at least it made us fall into a swamp at that time, and performance is sometimes the key to the project.
2. For nhib.pdf, it is indeed good, but it is uncertain complicated. It may be easy to use and can be used as a comparison between Moon and it.
3. People who have used iBATIS will know that every time you make a query, you need to write a bunch of configurations.
4. I don't want to talk about other types of projects. Because there is no silver bullet in the project, it is best to suit the environment. If you are not satisfied, please drift over.

5. I have to say that no ORM can solve really complicated SQL problems. The same is true for nhib.pdf and ef, which is also what Moon faces.

6.Instructions for use

Http://www.cnblogs.com/humble/archive/2012/04/07/2436135.html

7. Latest Version.

Download the executable instance and code generator. Click to download

 

8. Moon. ORM design prerequisites

1. For database design, each table must have a primary key;

2. The primary key design scheme determined by the business logic is incorrect, so the primary key cannot be restrained by the business, because the business is changed. Moon. ORM needs to be established independently of the business.

Because the primary key design MOON selects guid or auto-increment (we recommend using auto-increment ).

 

9. configuration problems

1. Download the Code Generator (download the latest version above)

2. modify the configuration file of the Code Generator, as shown in. (For mysql, see section 6.Instructions for use)

3. Run the code generator to generate an object

 

 

Use the code generator to generate the entity layer. Add it to your project.
(You can copy this code file. cs to the project, or reference the compilation file. dll)

 

 

4. Introduce Moon. Orm and. cs or. dll generated above in the actual project

 

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.