Thoughts on code generation: MyMeta provides the database architecture, reflection, and Emit provides the built environment that provides dynamic creation.

Source: Internet
Author: User
First, I will introduce several articles:
Emit Learning Series Article navigation

Use the MyMeta component to obtain the database structure
A little reflection, and a little more Emit -- extremely simplified Entity!

These are all good things. Of course, the premise of thinking about these things is that there are some concepts of reflection, assembly, and domain and there are some attempts, otherwise it will be a little tired.
For people familiar with reflection, Emit is used to write information (programs), such as creating classes and methods.
I have to say that I am really uncomfortable with IL. I used to learn compilation. Although I worked very hard, I stayed at a very conceptual level. I don't have the motivation to be proficient. But don't be discouraged, don't be afraid of anything. You can do this by writing code first, and then using idm to view IL. Although this is a method, it is always uncomfortable. Here is a Reflector plug-in:ReflectionEmitLanguage. Is it so nice? By the way, the person who used it for the first time may not be able to find the place to view it. After adding the plug-in, you can see it in the language selection area on the menu.
Well, all the obstacles to constructing the class are flattened. Next, we will go to the Code architecture.
People who are familiar with multi-layer architectures must be familiar with entities. This depressing thing is so disgusting. Haha, it's always written one by one. Simply use a code generation tool, almost worse than what I wrote. Although there is nothing in the entity, other classes related to the entity are all problems.
There is also that it is always not synchronized with the database (^_^ needs to be changed frequently). With the Emit tool, it is a problem with the database. MyMeta is out, and its naming rules and architecture are too helpful, although I am not used to writing code, I have to admit that it is very concise. It's too easy to write database-related things.
Finally, there are some questions about how to simplify Entity for reflection of Emit. The third article is also very good and can be used for reference.

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.