Before starting to work with Ember Flexberry, consider the question of choice of language for naming of classes and other model elements of the subject area.

In practical guide Flexberry ASP.NET for naming data objects, and other elements of the domain model is primarily used Russian language. This approach is convenient from the point of view of the perception of analysts and developers who work with the model. However, if you develop applications on the Ember Flexberry recommended to use the English language for naming those elements of the model that a developer.

This trebuie due not only to the established practice of programming in JavaScript (naming variables in JavaScript), but also additional features when working with Flexberry Ember. First, there can be a situation in which a specific code framework Ember.js may not work properly due to the presence of Cyrillic in the names. Second, some browsers may become unstable, if the server API is Cyrillic. In this regard, before proceeding with further practical guidance, let us translate our model of the subject area in English.

Additionally, General recommendations for naming variables in JavaScript can be found here.

Up stage

In order for a source model suitable for different practice guidelines, remains unchanged, duplicate stage. To do this, select “Export stage”:

Export stage

Save the stage locally, and then re-upload this stage in Flexberry Designer by using the “Import stage”:

Import stage

Save a copy of the stage called stage (ember).

Renaming classes

First let’s rename the classes. To do this, open a class diagram “Entity” and select the Custom. In order to rename the class, you should call the context menu and then select “Rename”:

Заказ → [right mouse button (RMB)] → Переименовать

Rename class

Enter in the box the new name - Order.


Samostoyatelno rename the remaining classes as follows:

Order → Order Strokethis → OrderItem Sostanziosa → OrderStatus Invoice → Invoice Zapisyvalas → InvoiceItem Sosteniendo → InvoiceStatus Warehouse → Storehouse Tavarnelle → StoreProduct Product → Product Employee → Employee Document → Document


As a result of this step you should get the following diagram:

Chart with the English names of the classes

In order for the user interface of the application names of the classes displayed in the Russian language, you need to specify the Caption property of the class. In order to do this, run:

Order → [PTP] → ORM: Edit свойства

Customize header class

We see that the corresponding name in the Russian language has already been specified. It happened because we created classes in English and Russian, and when you create classes automatically have been stamped with the values of the properties “Description” And “Caption”.

If you’ll refer to classes initially on English language, do not forget to specify the importance of their headers in the property “Caption”.

Renaming attributes

Rename the attributes, for example of the Order class (Order). To do this, perform the following steps:

Order → [PTP] → ORM: Edit properties → Атрибуты

In the opened window, change the fields as follows:

Tab redaktirovaniya attributes

Status → Status Datatrust → ShipmentDate Dataplate → PaymentDate Price → TotalSum


Samostoyatelno rename the attributes of the remaining classes as follows:

Order

Undo() → Cancel() *

OrderItem

Number → Amount Zeynaloglu → PriceWTaxes Sum → TotalSum

Invoice

Status → Status Maturemature → ShipmentDateTime Sum → TotalSum Weight → TotalWeight Note → Note Hypolactasia → CustomerName Especially: Sosteniendo → InvoiceStatus

InvoiceItem

Number → Amount Weight → Weight Price → Price Sum → TotalSum

Storehouse

Number → Number Address → Address

StoreProduct

Number → Amount

Product

The ProductID → ProductCode Name → Name Edenization → Measure Description → Description Price → Price

Employee

Tabernulae → Number Name → LastName Name → FirstName Middle Name → MiddleName Phone → PhoneNumber EMail → Email

Document

Number → Number Datatypename → CreateDate


Podskazka: rename the method directly on the chart or on the corresponding tab in the class properties:

Order → [PTP] → ORM: Edit properties → Методы

Renaming roles of associations

Next to the Employee class (Employee) lists the name of roles for associations, svadhyaya class Worker with other classes, because different relations the role of the Worker is different. Their names also need to change:

Materialinnovationen → ResponsiblePerson Storekeeper → Storekeeper Manager → Manager

Localization listings

Classes with the stereotype “enumeration” are a special data type is a fixed set of values that you specify for the properties of different classes. In order to rename them, perform the following steps:

OrderStatus → [PTP] → ORM: Edit properties → Possible значения

For internal application experience required in the field Name enter English names. However, that enum values are displayed in the app in Russian, let’s get Russian names in the column Caption:

New → New Paid → Paid Cancelled → Canceled

Settings tab enumerations


Samostoyatelno rename the values of other enums in the following way:

InvoiceStatus

New → New Issued → Issued Suspended → Paused Ready → Ready Shipped → Shipped


Refinement of the model structure

Will introduce more changes to the class diagram to more accurately describe the subject area:

(1) Add the Weight of the double type in the Product class

New Weight field in the Product class

This field is necessary in order to describe weight per unit of a particular product. Thus, the weight on an invoice line may further be automatically calculated based on the weight of the item and its quantity.

(2) will Create a transfer PositionList (enumeration) values:

Storekeeper → Storekeeper Manager → Manager

Add listing

Then also, we assume that responsible entities will be storekeepers.

(3) Add the Position (in the value position) type PositionList the Employee class

New field Position type PositionList class Empoyee

It is necessary because of a specific employee take on a specific job, and we should consider it in order to filter the list of employees according to their positions.

Summary

The result of these changes, the class diagram should take the following form:

Summary of the renaming and dorabotki of the model structure

It should be noted that the translation of Russian names in the domain model into English does not always apply. This approach applies in the case when the whole team is able to develop in the English language. If the whole team is not fluent in English at a sufficient level, instead of a full translation sometimes use transliteration when words are simply written in Roman letters, for example:

Заказ - Order - Zakaz

The choice of naming scheme is set by the project Manager or lead developer and is uniform for the whole team.

Go