Generation Code of EA's powerful functions

Source: Internet
Author: User

Recently, I was working on a fee system for the cooperative version of the data center. I was responsible for drawing all the UML diagrams and documents, which is equivalent to my entire architecture. In addition, you can only provide documents and required interfaces to partners to avoid communication and read documents and write code. I thought, it should be detailed!

Later I heard that EA can generate code directly. I thought it would be much more convenient and I don't need to write the interface manually. Directly draw a picture and generate an interface, so that others in our group can see it clearly.

The following shows how:

(1) first draw a class chart in EA, taking the sqluserdal class as an example.

(2) modify the class details (name, change the language) and click OK.

(3) Add a method and give parameters, return values, and visibility.

Here, you need to edit the parameters and click the edit parameters button.

(4) generate code

Right-click the sqluserdal class and click Generate code. Such:

Enter the path and select the code type to be generated. Click Generate!

Next, let's take a look at the generated results (the desired method is directly generated ).

''************************************** * ********** '''Smile ''' group: song Xiao, Qiu Muxia, and Yang Chen Group ''Note: Class sqluserdal'' created on: 26-May 23-2014 16:46:02 ''version: 1.0 ''************************************** * ****** option explicit onoption strict on ''' <summary> '''user table class''' </Summary> public class sqluserdalimplements iuser''' <summary> ''' query User table ''' </Summary> ''' <Param name = "enuser"> user entity class </param> Public Function queryuserinfo (byval enuser userentity) as list (of userentity) queryuserinfo = nothingend functionend class 'sqluserdal
2. If you have drawn many classes that need to be fully generated, you can right-click the model created in the EA.

Click Generate source code:

The source code of the class is directly produced after all selections.

Effect:

Is it much more convenient. Lazy people tend to be very smart!

As you can see, the code I generated earlier already includes all comments for modules, classes, methods, and parameters. The following section describes the powerful comments of EA!

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.