FREDPractical ViewpointPractical Viewpoint
ContentContent
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.
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
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
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].
FieldAccessor
getListOfFields
getVal
setVal
Display
open
close
Item
createDisplay
Transformer
fromSrcToDest
ListBoxFrame
UserItem UserDisplay
creates
uses
Application specific dialog (UserDisplay)
The FrameletThe Framelet
Designer and Pattern CatalogDesigner and Pattern Catalog
Creating the Framelet Creating the Framelet 1/91/9
Creating the Framelet Creating the Framelet 2/92/9
Creating the Framelet Creating the Framelet 3/93/9
Creating the Framelet Creating the Framelet 4/94/9
Creating the Framelet Creating the Framelet 5/95/9
Creating the Framelet Creating the Framelet 6/96/9
Creating the Framelet Creating the Framelet 7/97/9
Creating the Framelet Creating the Framelet 8/98/9
Creating the Framelet Creating the Framelet 9/99/9
Using the Framelet Using the Framelet 1/51/5
Using the Framelet Using the Framelet 2/52/5
Using the Framelet Using the Framelet 3/53/5
Using the Framelet Using the Framelet 4/54/5
Using the Framelet Using the Framelet 5/55/5
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.
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