Transcript
Page 1: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

FREDPractical ViewpointPractical Viewpoint

Page 2: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

ContentContent

Basic concepts

Creating a framework with Fred

Using a framework with Fred

Page 3: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Basic Concepts Basic Concepts 1/31/3

Both frameworks and applications are software architectures.

Structural elements of an architecture, such as patterns, data types, methods and fields are called structures.

A structure can be a template defining a set of possible implementations.

Page 4: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Templates are used to instantiate new structures. A template is called a model in relation to its instance. We can also say that an instance is based on a template. A structure can have multiple models.

model instanceSomeFramework

SomePattern

SomeClass

AnotherApplication

AnotherPattern

AnotherClass YetAnotherClass

model

model instance

instance

BasicBasic Concepts Concepts 2/32/3

Page 5: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

By default each structure is an instance of a corresponding meta-structure.

MetaArchitecture

MetaPattern

MetaType

MetaField MetaMethod

SomeFramework

SomePattern

SomeClass

AnotherApplication

AnotherPattern

AnotherClass

Basic Concepts Basic Concepts 3/33/3

Page 6: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

How to create a framework with Fred? How to use the created Framework with Fred?

A Brief ExampleA Brief Example

To answer these questions we will use a framework called List Box Framelet as an example. The framelet is also discussed in the paper “Pattern-Oriented Framework Engineering Using Fred” [HHT98]. The original framelet was presented by Pree and Koskimies [PrK98].

Page 7: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

FieldAccessor

getListOfFields

getVal

setVal

Display

open

close

Item

createDisplay

Transformer

fromSrcToDest

ListBoxFrame

UserItem UserDisplay

creates

uses

Application specific dialog (UserDisplay)

The FrameletThe Framelet

Page 8: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Designer and Pattern CatalogDesigner and Pattern Catalog

Page 9: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 1/91/9

Page 10: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 2/92/9

Page 11: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 3/93/9

Page 12: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 4/94/9

Page 13: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 5/95/9

Page 14: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 6/96/9

Page 15: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 7/97/9

Page 16: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 8/98/9

Page 17: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Creating the Framelet Creating the Framelet 9/99/9

Page 18: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Using the Framelet Using the Framelet 1/51/5

Page 19: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Using the Framelet Using the Framelet 2/52/5

Page 20: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Using the Framelet Using the Framelet 3/53/5

Page 21: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Using the Framelet Using the Framelet 4/54/5

Page 22: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

Using the Framelet Using the Framelet 5/55/5

Page 23: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

FeaturesFeatures

New structures, e.g. fields and methods, can be created directly in the advanced source code editor.

Some structures can be defined to be generated automatically, e.g. getters and setters for fields.

Pattern selection can be simplified using the Pattern Selection Wizard.

Page 24: F RED Practical Viewpoint. Content  Basic concepts  Creating a framework with Fred  Using a framework with Fred

GHJ95 Gamma E., Helm R., Johnson R., Vlissides J.: Design Patterns - Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.

HHT98 Hakala M., Hautamäki J., Tuomi J., Viljamaa A., Viljamaa J: Pattern - Oriented Framework Engineering Using FRED. Manuscript, submitted for publication, 1998.

PrK98 Pree W., Koskimies K.: Framelets - Small and Loosely Coupled Frameworks. Manuscript, submitted for publication, 1998.

ReferencesReferences


Recommended