Getting started with EA

Source: Internet
Author: User

1. Introduction to enterprise effecect

Enterprise impact ect is a case software (Computer Aided Software Engineering) that provides excellent support for software system development ). Unlike Common UML drawing tools (such as Visio), EA supports the whole process of system development. Strong support in demand analysis, system analysis and design, system development, deployment, and other aspects, coupled with positive and reverse engineering, project management, document generation for 10 programming languages, data Modeling. This allows all roles in system development to achieve the best development efficiency.

2. Create a new project

After you have installed the EA Chinese edition, start the software. Click "create new project" to create a new project dialog box.


Figure 1]

You can select various initial template packages.


Figure 2]

We selected several of them, and then confirmed to open the project browser. Our project will start from here.


Figure 3]

3. Ea Software Configuration

Before using the software, we should configure it first. Choose tools> options ".

Figure 4]

In general configuration, it is important for the author to do this. Because in the collaboration of the EA project, the author is the identity of each person.

In code engineering, it is best to set the file encoding to utf8 or GB Chinese.

Other configurations are easy to understand because they are both Chinese. Some unknown places can be considered more.

In addition, you can configure the following ten programming languages as needed. For example, PHP can be configured with PhP4 or PhP5, so the generated code is somewhat different. You can also hide other unused languages.

4. Use Case chart

Use case diagram)

The use case diagram is the first step in system analysis and is very important. After all, most development processes take requirement analysis as the first and necessary step. Express the system requirements as graphs. First, right-click "add"> "new chart" in the project browser ".

Figure 5]

Then you can add some roles and use cases. Each time a component is pulled out in the toolbox, the component Setting dialog box is opened, and the component name and other information are filled in the dialog box. Now we are expressing a user registration and login scenario:

Figure 6]

Join Association. The most common association in the use case diagram is "use". Of course, "include" and "extended extend" are often used ". The difference between the two is that "include" means that the primary use case cannot be executed independently without other auxiliary use cases, but the primary use case can be executed without "extension" or other auxiliary use cases. For example, if the registration operation "contains" the verification code, but does not necessarily "extend" the use case to send notification emails.

Role is the basis of the use case diagram. Although a role can be a person in a certain position, a database, or an external system interaction interface, each use case diagram starts with a role. A role can have a class relationship. For example, a registered user is also a visitor to a website. A registered user can do all the things that visitors can do. However, a registered user also has some functions not involved by website visitors, such as logging on to and sending articles.

Figure 7]

Class Diagram)

Class diagrams are the basis of code engineering and the main work of system design. Class Diagrams mainly reflect the detailed implementation architecture of the system. First, let's create a registration service class that implements the user registration function.

Figure 7]

After a class is generated, we can add some variables (right-click the Class component and choose "variable"). The variables mainly save some data of the class, such as gender of the same person, data features such as age are the same. For example, our registration class also has data link variables (it needs to know which database it is dealing with), and may also have data variables that limit the number of registered IP addresses per day.

Figure 8]

You also need to add methods to the class (right-click the Class component and choose "method"). For example, in the registration class, you need to check the entered verification code, data operations, and the number of daily registrations. In the class method, we can also set parameters, parameter types, and parameter remarks for each method, which will be in the Code project, directly generate the parameter and method comments to the code file.

Figure 9]

There may be some relationships between classes, so we use associations to express these relationships. Commonly used inheritance relationships (generalize, or derived class ). For example, during registration, we may have some special registration methods, such as receiving VIP card numbers for registration. VIP registration requires more steps than normal registration, such as verifying the validity of the VIP card number. This VIP registration class inherits from the registration class and has all the common registration functions, but has some unique functions, which can reflect the reusability of the Code. At the same time, when the code is generated, the keyword "extends" will be added to identify their relationship.

Figure 10]

5. Use of other images

Figure 11]

An object graph is a supplement to a class graph. It mainly demonstrates various classes in the system and does different things after instantiation in different scenarios.

Interaction graphs (interaction), collaboration graphs (communication), and time sequence graphs (timing) all reflect the interaction between some entities in the system. A collaboration diagram focuses on collaboration and interaction between entities. In the new version of UML, a collaboration diagram is also called a communication diagram, which better reflects the principle of collaboration between entities in the form of communication. The time sequence diagram emphasizes the order of interaction between each object. For example, if you send a prompt email indicating successful registration, the email is generated after the registration verification data is entered, rather than before.

In addition, there are other graphics, such as State, deployment, component, and activity. For more information, see related documents. At the same time, EA supports a large number of images, including mind graphs (expressing and assisting the thinking process) and Web model graphs (representing the model structure deployed on the website) is only available in recent versions.

Vi. Data Modeling

In data modeling, EA supports modeling 13 different types of databases. You can directly generate SQL statements for table creation. You can also use ODBC, import an existing data table structure.

Figure 12]

In the following example, we create a data table composed of Student Dormitory personnel. The table Type uses MySQL. First, a data table component is created and its attributes are set.

Figure 13]

Add a field (right-click "variable" on the table element) and set the data type, length, and primary key of the field. Here, you can use Chinese as the field name and enter the English field name in the "alias" field. When generating an SQL statement, select "use available alias" to generate the field name of the English name.

Figure 14]

Generate an SQL statement for table creation, click the parent package of the data model, and select "project"-"data modeling"-"generate SQL code" to open the SQL generation dialog box.

Figure 15]

After setting, click Generate to generate a complete SQL table creation statement.


Figure 16]

VII. Code Engineering

Code engineering is to use EA to generate the corresponding code structure. It is called the code structure because only the initial class structure and Some preset values exist in the generated code, the code inside the class method still needs to be manually written. In addition, if you add remarks to the class settings, variables, methods, and method parameters, the Code tool will help you generate neat code comments for all these comments.

Use the previous PHP class and right-click "generate code ". Then, the code generation dialog box is displayed.

Figure 17]

After setting, click Generate to generate the code structure.

Figure 18]

The code generation process in other languages is also similar. The code format generated by code Engineering (Forward Engineering) can be modified in "Settings"> "code Engineering Template.

VIII. Reverse Engineering

Reverse engineering is to import the original class library code using EA to the class structure and generate the class diagram directly. This is useful when the system is restructured, or when a new project is created based on the old project class library.

In the project browser, right-click the location where you want to import the reverse engineering diagram and choose "Code project"> "import source file directory" to open the reverse engineering dialog box:

Figure 19]

After setting, click Import. You can import a class library in a short time. The following example shows how to import a class chart of the speedphp Framework Version 1.5.

Figure 20]

9. Project Management

EA not only supports the entire software development lifecycle, but also provides project management, such as personnel management, Progress Management, and risk management.

Choose View> project management"

Figure 21]

Here you can manage "(human) resources", "work", "risks", and "measurement.

10. Document generation

EA can generate many types of documents to generate documents with different focuses based on different situations and reading objects. You can also select the RTF format and HTML format.

In the project browser, select a model node. Right-click "document"-> "RTF document" to open the document generation dialog box.

Figure 22]

Multiple types of documents can be generated here. Click Generate ". Then an RTF file is generated.

Figure 23]

The default document, which contains most of the English letters. Of course, you can rewrite them into Chinese in the RTF file. In addition, you can use the "Word Translation" in the generated Document dialog box to generate a new translated document. You can also directly modify the document template in EA to generate custom documents.

11. Other functions

EA also provides version control (including SVN and VSS) for the EA project itself, a small communication forum, and many useful functions. Here we will not describe them one by one.

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.