Добавление узлов к диаграмме Размещения — КиберПедия 

Кормораздатчик мобильный электрифицированный: схема и процесс работы устройства...

Двойное оплодотворение у цветковых растений: Оплодотворение - это процесс слияния мужской и женской половых клеток с образованием зиготы...

Добавление узлов к диаграмме Размещения

2017-11-27 151
Добавление узлов к диаграмме Размещения 0.00 из 5.00 0 оценок
Заказать работу

1. Дважды щелкнув мышью на представлении Размещения в браузере, откройте диаграмму Размещения.

2. Нажмите кнопку Processor (Процессор) панели инструментов.

3. Щелкнув мышью на диаграмме, поместите туда процессор.

4. Введите имя процессора "Сервер базы данных".

5. Повторив шаги 2—4, добавьте следующие процессоры:

-Сервер приложения

- Клиентская рабочая станция №1

- Клиентская рабочая станция №2

6. На панели инструментов нажмите кнопку Devices (Устройство).

7. Щелкнув мышью на диаграмме, поместите туда устройство.

8. Назовите его "Принтер".

Добавление связей

1. Нажмитекнопку Connection (Связь) панели инструментов.

2. Щелкните мышью на процессоре "Сервер базы данных".

3. Проведите линию связи к процессору "Сервер приложения".

4. Повторив шаги 1 — 3, добавьте следующиесвязи;

- От процессора "Сервер приложения" к процессору "Клиентская рабочая станция №1"

- От процессора "Сервер приложения" к процессору "Клиентская рабочая станция №2"

- От процессора "Сервер приложения" к устройству "Принтер"

Добавление процессов

1. Щелкните правой кнопкой мыши на процессоре "Сервер приложения" в браузере.

2. В открывшемся меню выберите пункт New > Process (Создать > Процесс),

3. Введите имя процесса — OrderServerExe.

4. Повторив шаги 1 —- 3, добавьте процессы:

- Процесс OrderclientExe на процессоре "Клиентская рабочая станция №1"

- Процесс ATMClientExe на процессоре "Клиентская рабочая станция №2"

Показ процессов на диаграмме

1. Щелкните правой кнопкой мыши на процессоре "Сервер приложения".

2. В открывшемся меню выберите пункт Show Process (Показать процессы).

3. Повторив шаги 1 и 2, покажите процессы на следующих процессорах:

- Клиентская рабочая станция №1

- Клиентская рабочая станция №2

 

Заключение.

В результате выполнения лабораторных работ обучающийся должен понять последовательность работ при проектировании информационной системы и освоить программную среду Rational Rose. Начинать надо с Use Case диаграммы, остальные диаграммы должны служить декомпозицией вариантов использования первой диаграммы. Логические и физические разделы модели Rose с помощью кодогенерации преобразуются в программный код Delphi. Изменения в модели Rose, путем нажатия нескольких кнопок, сразу соответствующим образом изменяют программный код. Тем самым проиллюстрировано основная идея CASE технологий- автоматизированная поддержка информационной системы на всех этапах ее жизненного цикла.

 

Рекомендуемая литература

1 У.Боггс, М. Богс UML и Rational Rose. Из-во «ЛОРИ», 2000 г., 580 с

 

2. М. Фаулер, К. Скотт UML в кратком изложении. Применение стандартного языка объектного моделирования: Пер. с англ. – М.: Мир, 1999.- 191 с.,с ил.

 

Приложение А. Таблица законов кодогенерации из Rose в Delphi

 

Элемент модели: Category

Наименование св-ва Описание
ClassDiagram The name of diagram to add classes to when reverse engineering. Defaults to "Overview". If "", then no diagram is created.

Элемент модели: Class

Наименование св-ва Описание
Kind One of "", "class" (default), "interface", "dispinterface", "object". The class stereotype is also set to "Interface" if the kind is "interface" or "dispinterface".

Элемент модели: ProcedureType

Наименование св-ва Описание
<<Stereotype>> Delphi Procedure Types are modelled in Rose as classes with a stereotype "ProcType"
ProcedureType_ofObject True or False (default), true if procedure type references a method of an instance object.

 

Элемент модели: Component

Наименование св-ва Описание
ComponentKind One of "unit", "library", "program", or "package". Library or program components describe as projects, package components are ignored (their referenced units are in the RDL view anyway).

 

Элемент модели: Attribute

Наименование св-ва Описание
Published True or False (default). If the attribute is public and published is true, then the attribute gets generated to code in a published visibility section.

Элемент модели: Role

Наименование св-ва Описание
Published True or False (default). If the role is public and published is true, then the role gets generated to code in a published visibility section.
Array_Range If not "" (default), then the role is generated to code as an array with the specified range. If "", then the role's cardinality is used to determine it the role is an array.

Элемент модели: Operation

Наименование св-ва Описание
Published True or False (default). If the operation is public and published is true, then the operation gets generated to code in a published visibility section.
Operation_Abstract True or False (default). If true, then the operation is generated to code with an "abstract" directive.
Operation_Binding One of "" (default), "virtual", "dynamic", "override", "reintroduce". If not "", then the operation is generated to code with the specified binding.
Operation_CallingConvention One of "" (default), "register", "pascal", "cdecl", "stdcall", "safecall". If not "", then the operation is generated to code with the specified calling convention.
Operation_Message "" (default) or a message expression. If not "", then the operation is generated to code with a "message" directive having the specified value.
Operation_Overload True or False (default). If true, then the operation is generated to code with a "overload" directive.
Operation_Kind The kind of the operation. One of "procedure" (default), "function", "constructor", "destructor", "class procedure", "class function".

Элемент модели: Property

Наименование св-ва Описание
<<stereotype>> Delphi properties are modelled in rose as operations with a stereotype of "Property".
Published True or False (default). If the property is public and published is true, then the property gets generated to code in a published visibility section.
Property_Index "" (default) or index expression. If not "", then the property is generated to code with a "index" specifier having the specified value.
Property_Read "" (default) or read expression. If not "", then the property is generated to code with a "read" specifier having the specified value.
Property_ReadOnly True or False (default). If true,then the property is generated to code with a "readonly" specifier..
Property_Write "" (default) or write expression. If not "", then the property is generated to code with a "write" specifier having the specified value.
Property_WriteOnly True or False (default). If true,then the property is generated to code with a "writeonly" specifier.
Property_Stored "" (default) or storage expression. If not "", then the property is generated to code with a "stored" specifier having the specified value.
Property_DefaultSpecifier One of "" (default), "nodefault", or "default". If not "", then the property is generated to code with a default value specifier. If "default", the value is obtained from the Property_DefaultValue model property.
Property_DefaultValue "" (default) or constant expression. The value used for the "default" specifier.
Property_Implements "" (default) or implements expression. If not "", then the property is generated to code with a "implements" specifier having the specified value.
Property_IsDefaultProperty True or False (default). If true, then the property is generated to code with a "default" property directive. Only relevant for array properties.

Элемент модели: Parameter

Наименование св-ва Описание
Mode One of "" (default), "const", "var", "out". If not "", then the parameter is generated to code with the specified mode.

 

Приложение Б. Модели кодогенерации при настройке по типу Default

 

Type SampleClass1 = class (BaseClass, SampleInterface) {...} end;  
type SampleClass2 = class private AnAttribute: Integer; ARole: SupplierClass1; Public procedure AnOperation (arg: Integer); property AProperty: Integer index 2 read AnAttribute write AnOperation; end; Property specifiers are stored in the code generation properties of the associated rose operation.  
type SampleClass3 = class private ArrayRole1: array of SupplierClass2; ArrayRole2: array [1..10] of SupplierClass5; ArrayRole3: array [SampleRange] of SupplierClass3; ArrayRole4: TItems; end; ArrayRole3 range 'SampleRange' is stored in the Array_Range code gen property. To specify your own collection type, instead of using arrays, add a ':' and the collection type to the role name.
type SampleRecord = record attr1: Integer; attr2: Real; end;
type SampleEnum = (value1, value2, value3);
type ProcedureTypeSample = function(arg: Integer): Integer; A procedure type maps to a Rose class, with a ProcType stereotype, and a single operation 'signature' which represents the procedure type signature
type SampleRange = 1..10; A subrange is represented as a Rose class with 'Range' stereotype, and 2 attributes named Low and High. The initial value of these attributes are the low and high values of the range
type TOldType = class end;   type SampleTypeId1 = TOldType; type SampleTypeId2 = Integer; A type id is represented as a Rose class with a 'TypeId' stereotype. If the type being renamed is a standard delphi type (such as Integer) an attribute is used to model this type. Otherwise, an inheritance relationship is used.
type SampleClassRef = class of TObject;   type SamplePointer = ^TOtherType;   type SampleFile = file of Integer;   type SampleArray = array of array of Integer; Delphi pointer types, class references, array types, set types, and file types are represented as Rose classes with stereotypes. If the delphi type references another user-defined type, this is shown with a dependency. If the delphi type references a basic delphi type (Integer) or is complex (i.e. nested arrays) the reference is modeled with an attribute.
Unit SampleUnit;   interface   type SampleClass1 = class {…} end;   implementation end; A unit maps to a component and a category. Its member classes are the component’s assigned classes.
       

 

Приложение В Результаты кодогенерации проекта в Delphi.

 

Модуль NewProect.dpr (Корневая папка)

program NewProject;

uses

OrderClientExe in 'OrderClientExe.pas',

OrderServerExe in 'OrderServerExe.pas',

OrderDetail_ in 'Baundary\OrderDetail_.pas',

OrderOptions_ in 'Baundary\OrderOptions_.pas',

TransactionMgr_ in 'Control\TransactionMgr_.pas',

OrderMgr_ in 'Control\OrderMgr_.pas',

Order_ in 'Entity\Order_.pas',

OrderItem_ in 'Entity\OrderItem_.pas';

 

begin

end.

Модуль OrderDetail_.pas (Папка Baundary)

unit OrderDetail;

interface

uses

OrderMgr;

var theOderMgr: OderMgr;

procedure Open;

procedure SubmitinfoXX;

procedure Save;

 

implementation

procedure Open;

begin

end;

procedure SubmitinfoXX;

begin

end;

 

Модуль OrderOptions_.pas (Папка Baundary)

 

unit OrderOptions_;

interface

uses

OrderDetail_;

type

OderOptions = class;

OderOptions = class

public

theOrderDetail: OrderDetail;

procedure Create;

end;

implementation

procedure OderOptions.Create;

begin

end;

end.

 

Модуль OrderMgr_.pas (Папка Control)

 

unit OrderMgr;

interface

uses

Order,

TransactionMgr;

type

OderMgr = class;

OderMgr = class

public

theOrderCollection: array of Order;

theTransactionMgr: TransactionMgr;

procedure SaveOrder;

end;

implementation

procedure OderMgr.SaveOrder;

begin

end;

 

end.

 

Модуль TransactionMgr _.pas (Папка Control)

 

unit TransactionMgr;

interface

uses

Order,

OrderItem;

var theOrderCollection: array of Order;

var theOrderItemCollection: array of OrderItem;

procedure SaveOrder;

procedure CommitXX;

implementation

procedure SaveOrder;

begin

end;

procedure CommitXX;

begin

end;

end.

 

Модуль Order_.pas (Папка Entity)

unit Order_;

interface

uses

OrderItem_;

type

Order = class;

Order = class

public

theOrderItemCollection: array of OrderItem;

procedure Create;

procedure SetInfo;

procedure GetInfo;

end;

implementation

procedure Order.Create;

begin

end;

procedure Order.SetInfo;

begin

end;

procedure Order.GetInfo;

begin

end;

end.

 

Модуль OrderItem_.pas (Папка Entity)

 

unit OrderItem_;

interface

type

OrderItem = class;

OrderItem = class

public

procedure GetInfo;

procedure Create;

procedure SetInfo;

end;

implementation

procedure OrderItem.GetInfo;

begin

end;

procedure OrderItem.Create;

begin

end;

procedure OrderItem.SetInfo;

begin

end;

end.

 

Модуль OrderClientExe.pas (Корневая папка)

 

unit OrderClientExe;

interface

implementation

end.

 

Модуль OrderServerExe.pas (Корневая папка)

 

unit OrderServerExe;

interface

implementation

end.

 


Поделиться с друзьями:

Особенности сооружения опор в сложных условиях: Сооружение ВЛ в районах с суровыми климатическими и тяжелыми геологическими условиями...

Эмиссия газов от очистных сооружений канализации: В последние годы внимание мирового сообщества сосредоточено на экологических проблемах...

Своеобразие русской архитектуры: Основной материал – дерево – быстрота постройки, но недолговечность и необходимость деления...

Археология об основании Рима: Новые раскопки проясняют и такой острый дискуссионный вопрос, как дата самого возникновения Рима...



© cyberpedia.su 2017-2024 - Не является автором материалов. Исключительное право сохранено за автором текста.
Если вы не хотите, чтобы данный материал был у нас на сайте, перейдите по ссылке: Нарушение авторских прав. Мы поможем в написании вашей работы!

0.122 с.