Advanced Systems Design with Java UML and MDA 1st Edition Kevin Lano download
Advanced Systems Design with Java UML and MDA 1st Edition Kevin Lano download
https://ebookgate.com/product/advanced-systems-design-with-java-
uml-and-mda-1st-edition-kevin-lano/
https://ebookgate.com/product/systems-analysis-and-design-with-
uml-international-edition-alan-dennis/
https://ebookgate.com/product/developing-applications-with-java-
tm-and-uml-1st-edition-paul-r-reed/
https://ebookgate.com/product/applying-uml-advanced-
applications-1st-edition-rob-pooley/
https://ebookgate.com/product/uml-for-database-design-first-
edition-naiburg/
Object oriented Analysis And Design Understanding
System Development With UML 2 0 First Edition Mike
O'Docherty
https://ebookgate.com/product/object-oriented-analysis-and-
design-understanding-system-development-with-uml-2-0-first-
edition-mike-odocherty/
https://ebookgate.com/product/software-evolution-with-uml-and-
xml-hongji-yang/
https://ebookgate.com/product/software-modeling-and-design-uml-
use-cases-patterns-and-software-architectures-1st-edition-hassan-
gomaa/
https://ebookgate.com/product/opencv-with-python-blueprints-
design-and-develop-advanced-computer-vision-projects-using-
opencv-with-python-1st-edition-michael-beyeler/
https://ebookgate.com/product/uml-for-systems-engineering-
watching-the-wheels-2nd-edition-john-holt/
Preface
9 UML 2.0: we introduce the core concepts and notations of UML, and
show how they can be used in practice.
9 MDA: we describe the key elements of this approach, and transformations
of models using UML Profiles, XSLT, JMI and REI.
9 Internet system design: how to use JavaScript, Flash, XHTML, JSP
and Servlets to produce modular, usable, portable and accessable web
systems.
9 Web Services: including technologies such as J2EE, JavaMail, .Net, SOAP,
WSDL and streaming.
9 E-commerce: including the Semantic Web, FTP, WML and Bluetooth.
vii
viii Preface
Acknowledgements
Kelly Androutsopoulos, David Clark and Pauline Kan contributed to the pro-
gram synthesis concepts used in the book. Runa Jesmin contributed the ma-
terial on usability design of web systems. The internet jukebox case study is
due to Ruth O'Dowd, Taherah Ansari contributed the case study of XSLT and
REI transformations, and numerous other students at King's College have also
helped in providing feedback on courses in which the material presented here
has been taught.
Chapter 1
1.1 Softwaredevelopment
The purpose of software I remains the same today as it was at the beginning of
computing in the 1940s: to automate the solution of complex problems, using
computers. However the nature of the problems to be solved has changed
dramatically, and so have the programming techniques employed: the first
computers were used for highly critical and specialised tasks such as decryption,
and 'programming' them meant reconfiguring the hardware (vacuum tubes or
'valves') of these huge and massively expensive devices.
Today, the variety of tasks for which computational power is used spans the
whole range of business, social and creative endeavours. Increasingly, instead of
performing some isolated computation, software systems form active or passive
elements in a communicating network of services and agents, each new system
depending essentially on existing capabilities of previously developed systems,
whose services it uses.
Programming techniques have also advanced in the decades that followed
the 1940s, through the use of languages of increasing power and abstraction:
Assembly languages, FORTRAN, C, C + + , and now Java and C #. Instead of
manipulating instructions at the level of the hardware, programmers specify
data and algorithms in terms of the problem domain. The rise of object-
orientation as a language for problem description and solution is the prime
1The name 'software' for computer programs seems to have been used for the first time
by John Tukey in the January 1958 edition of the American Mathematical Monthly journal
[5O].
Chapter 1. The Challenges of Software Design
Platform Independent
~_~._ Model b
Transformations
Code Generation
l (PlatformA)
l
~Impl . . . . tedSystem
(PlatformB)
Some popular development methods are the spiral model, the waterfall model,
the rational unified process, and extreme programming.
Requirements
Definition
System and
Software Design l
Implementation &
unit testing
'Integration &
Isystem testing
Operation and
Feedback maintenance
The Rational Unified Process [43] defines four phases in the development
process:
I ~eriOcat~_e,=::: \ \ Test
/
lmm~tion , Test \ \ ~ ND~LOE~[~:~I~JDUCT
,AN NEXT PHASES
The major milestones in development are the progression from one phase to
another: the decision to commit to the project in the Inception --+ Elaboration
progression, an accepted first revision of the requirements document in the
Elaboration --+ Construction progression, and a beta release in the
Construction --+ Transition progression.
The process is use-case driven: each design module should identify what
use cases it implements, and every use case must be implemented by one or
more modules.
The waterfall model has often been criticised for its rigid progression from one
task to the next, which can lead to a progressive build-up of delays, as one
task cannot begin until its predecessor has completed. On the other hand,
it imposes greater discipline than more evolutionary incremental approaches,
where 'completion' of a task is left open-ended, and indeed, may not end.
The cumulative iterations and reviews of the spiral model can lead to earlier
detections of errors, and therefore lower costs and reduced risks of failure than
monolithic methods such as the waterfall model.
The Rational Unified Process, like the waterfall model, also has an em-
phasis on development phases with milestones as the progressions between
them. Some software engineers believe that, in contrast, an architecture-driven
approach is necessary for object-oriented development, whereby global phases
are replaced as the focus by the modular construction of systems, component
by component and layer by layer. For each layer there are separate specific-
ation, design and implementation activities. XP may be a better fit for this
approach than phase-centred methods.
In principle, any of the above development methods can be used in a MDA
development, although the end product of the process may be a PIM or a
PIM plus PSMs, instead of executable code. With the MDA, the progression
1.3. Software development steps 7
1.3.1 Feasibilityanalysis
This stage evaluates the technical options for implementing the system,
determining if it is feasible to implement it, and if so, if there is a cost-effective
implementation. Background research may be needed to investigate similar
systems that already exist, and what services are available to carry out parts
of the required functionality. Trial implementation/prototyping could also be
carried out, or mathematical estimation (eg, of bandwidth or data storage
requirements).
This stage can be carried out as part of the risk analysis phase in the earliest
iteration of the spiral model, or as the first step in the waterfall model. In the
spiral model a developer could recheck the feasibility of the system after each
iteration as part of the review task.
For example, in the case of the Scrabble playing system, this stage would
investigate the rules of Scrabble, existing AI techniques and programs such as
Maven [46] and the feasibility of different memory storage and lookup schemes
for dictionaries.
For the Jukebox project, this stage would involve investigating the state
of available music streaming technologies, for example, streaming servers such
as Helix (http://www.realnetworks.com/) and checking that these support the
required functionality of the system.
1.3.2 Requirementsdefinition
Provided that it has been determined that there is some feasible and cost-
effective way of constructing the system, the development process can advance
to elicit in detail the required functionality of the system.
This stage systematically records the requirements that the customer(s) of
the system have for it, and the constraints imposed on the system by existing
Chapter 1. The Challenges of Software Design
1. The system must enable between one and three human players to play,
together with the computer player.
2. Standard Scrabble rules for moves and the validity of moves should be
enforced.
3. The system should check all words formed in each move, and only accept
the move if all the words appear in its dictionary.
4. The system should keep a history of all valid moves made in a game: the
letters played, the player who moved, and the score of the move.
Use-case models in UML can be drawn for either system, to make clear what
users or external systems are involved in each functional requirement. Figure
1.4 shows some use cases for the Scrabble system, and Figure 1.5 those for the
jukebox.
Human Computer
Player Player
v~edit playlis~
User
1.3.3 Analysis
This stage builds precise models of the system, using suitable graphical or
mathematical notations to represent its state and behaviour in an abstract,
platform-independent manner. In a critical system, such as a railway signalling
system, formal validation that the analysis models satisfy required properties
would be carried out.
For the Scrabble system a fragment of the class diagram is shown in Figure
1.6. A fundamental property is that the total number of letters in the game is
always 100, these may be distributed between the player's racks, the bag, or
the board. Hence the annotation in the top corner of the Letter class.
For the Jukebox, the core data model is much simpler (Figure 1.7). There
will also be other web forms associated with the system, for logging in, viewing
and creating playlists, etc.
1.3.4 Design
This stage defines an architecture and structure for the implementation of the
system, typically dividing it into subsystems and modules which have respons-
ibility for carrying out specific parts of its functionality and managing parts of
its data. The activities in design include:
Board
game [ . Square
Board, placeMove(m: x: 1..15 1 ......
r 1 / Move" I . ~_ I lSOCCuplea[):
l Game ] / 1 ,| y ...... I boardSq . . . . Boolean
/turn. 1 4 I ~ getSquare(i: 1..15J .......
/ " "" I ~ " 1 15" S uar I getLetter~coreu:
|moveNumber: Il J J: "" ): q q Inte,,er
i startGame 0 --|-~
IgameEnded0: [~ ~ /\
I Booleanl ~ ~V
| endMove(m: Move) I ~1, I I
~
/
/1
)
"~
\
gam~e Bag
Bag [/bagSize: 0..100
IisEmpty0: Boolean
I
OrdinarySq . . . . DoubleLetter
I lsq . . . .
I
IlSq
T ripleLetter
....
validateMove( I 1 * x: 1 . . 1 5 l /
n: Integer): I ietterMoves y: 1..15
B o o l e a n ~
calculateScore( ~
b: Board):
Integer
PlayState <<enumeration>>
stopped Player
play setting: Play
rewind 1 Statq
fastForward
PlayForm
requested ~ ! *
Title: String
playTrack0 1
Controller
.~ I ~ descri~i~
~_ Iname: String
String
UploadForm ling
lploadTo:
String
JploadItem: \ Iartist: String
String
Jpload0
GUI
P l a y e r GUI Administrator
GUI
Functional Core
Data Repository
teraction, and database design, to define the structure of a database for the
system, and what queries/updates will take place on it.
Pure top-down design, in which a system is hierarchically divided into sub-
systems, and these in turn into further subsystems and modules, is an idealistic
model which can lead to expensive backtracking and rework if applied without
regular review. The structure of the design may need to evolve as experience
with prototypes of the system grows, for example, and the hierarchical struc-
ture may lead to duplication of effort (eg, two teams developing different parts
of the system could create similar modules, which a review may detect and
merge into one module).
For the Scrabble player, design could partition the system into a GUI to
manage the display of the board and racks (bearing in mind the constraint that
only the rack of the current turn player should be visible), a module to check
the correctness of moves, and (the most technically challenging) a module to
generate moves automatically. There will also be data management modules,
to hold dictionary data and game history data (Figure 1.8).
For the jukebox, design will identify the client and server program compon-
ents required: the components to be executed on the client will essentially be
web pages containing forms, the server components will be modules handling
requests from these pages and performing actions on the database of tracks,
and controlling the downloading of tracks. User interface design would sketch
out the appearance and format of the interface, for example, to imitate the
appearance of a real jukebox (Figure 1.9).
1.3.5 Implementation
1.4 Summary
2.1 Introduction
The UML [51] is the result of a successful unification of the many object-
oriented analysis and design notations which arose during the 1980s and 1990s.
In 1994 work began on unifying the widely-used OMT [42] and Booch [6] meth-
ods into what became UML, with OOSE [22] also integrated in 1995. From
version 1.1 UML was endorsed by the Object Management Group (OMG), rep-
resenting many companies and organisations, as a standard for object-oriented
analysis and design, and it has now become the primary notation in this field.
A major revision of UML, to version 2.0, was published in 2004. UML consists
of a large number of different modelling notations:
14
2.2. Use case diagrams 15
class diagrams and statecharts may be used at any development stage and are
very expressive languages which can describe a level of detail close to t h a t of
program code.
In this book we will focus on class diagrams and statecharts as the most gen-
erally useful UML notations, especially when enhanced with OCL
assertions.
A use case model [22] describes (1) the system to be constructed, (2) the actors
- representing a role played by a person or other entity t h a t interacts with the
system, and (3) the use cases - families of usage scenarios of the application,
grouped into coherent cases of functionality. A use case is a generalisation of
the scenarios of use of the system: technically, a scenario is an i n s t a n c e of a
use case.
Figure 2.1 shows a generic use case diagram, where actor A participates
in two use cases and actor B in one. The arrows indicate the direction of
interaction - this is not part of official UML use case notation but can be
helpful in indicating the intention of the use case. Figure 2.2 gives the use
Actor A
System
Actor B
cases for a share m a n a g e m e n t system, where price changes are informed to the
system from a stock exchange, and the trader using the system may receive
alerts from it when share price changes pass some preset limits. The trader
can also use the system to sell shares.
Use cases can have additional textual descriptions. A complete textual
description of a use case includes:
Share System
Stock
Exchange
@ ~ Trader
3. End of the use case- the termination event: 'when f occurs the use case
terminates'.
4. Interaction between the use case and the a c t o r s - this identifies what
activities should be inside the system and which outside.
5. Exchanges of i n f o r m a t i o n - what d a t a items are passed between the sys-
tern and the actors.
6. Chronology and origin of i n f o r m a t i o n - identifies when the system re-
quires internal or external information and when it records it.
7. Repetitions of behaviour.
8. Optional s i t u a t i o n s - points where an actor or the system m a y choose
different behaviours within the use case.
9. C a p a c i t y - number of concurrent executions of the use case t h a t the
system may have to handle.
An example from the Scrabble project could be the use case for a h u m a n
player making a move, which has agent HumanPlayer, and the detailed de-
scription:
9 Optional situations: The system may reject a move, if the letter moves
are not co-linear and connected, or if (for the first move) the move does
not include the centre square, or (for later moves) if it does not cover a
square adjacent to a square t h a t was already occupied by a letter before
the move began.
9 Capacity: 1.
Use case diagrams can also express relationships of inclusion and extension
between use cases:
I n c l u d e s Use case ucl includes use case uc2 if doing ucl always involves doing
uc2. This relationship is particularly useful if uc2 is a common subtask
of two or more use cases: an example of factoring out functionality from
several locations and placing it in a single component.
For example, in the jukebox, editing a playlist and viewing a playlist both
involve retrieving it from the playlist database server. In the Scrabble
game, verifying a h u m a n player move and generating a computer player
move both involve looking up a word in the dictionary (Figure 2.3 shows
the notation for inclusion and extension relationships between use cases).
E x t e n d s Use case ucl extends use case uc2 if ucl provides additional func-
tionality t h a t may be used to carry out uc2 in certain cases. For example,
calculating a bonus score in Scrabble could be an extension of a calculate
score use case (Figure 2.3).
User
~ <<include>>
H~y::~ ~ validate
~ move ....<h<....l n c ~i~'<inl
_ _ .>>
_ -~-
~
~ d ~ pClampUter
.
~ate m~'~<<?:e@ate ~bonu
Staff
Administrator ~~''~-~
Class diagrams represent the classes (the types of objects) in a system, together
with relationships that exist between them. Class diagrams can be used at
different stages of development:
2.3. Class diagrams 19
9 Classes, represented as rectangles with the name of the class at the top
of the rectangle. For example: Letter.
Class names are normally written in bold face, begin with a capital letter
and are centred in their rectangle.
9 Attributes, represented inside the box of the class to which they belong,
and written as name : type where name is the attribute name, and type
its type. For example: symbol is an attribute of Letter, describing the
printable character of the letter, and so it has type char.
Attribute names should start with a lowercase letter.
9 Relationships, represented as lines between classes. The UML term for
the simple form of relationship shown here is association. Associations
have names, by default we will take this to be C1-C2 where C1 and C2
are the names of the classes at the ends of the association. Each end of
the association can have:
- A multiplicity indication, defining how many objects of the class at
that end of the association can be associated, via the association, at
any one time with a single object of the class at the other end.
1These four elements are the only UML notation needed for purely declarative UML class
diagrams.
20 Chapter 2. The Unified Modelling Language
The easiest way to think about the meaning of a class diagram is in terms
of sets of objects. Figure 2.5 describes some properties of the sets of Letter
and Bag objects in the Scrabble system, and how these objects relate to each
other. Figure 2.6 illustrates one possible arrangement of objects that is allowed
by the class diagram. There are two Bag objects, b l and b2, and ten Letter
objects. Five letters are associated with bl and three with b2. Two letters do
not belong to any bag. The symbol and score of each letter object are written
on it, and the size of a bag is written in it.
Bag
Rule
If att : T is listed in a class diagram as an attribute of class C, and
obj is an object of C, then obj.att is a value of type T.
moveNumber :Integer = 1
in Game in Figure 1.6. The value of the attribute is set to the default initial
value on creation of a new object of the class, unless a more specific constructor
operation is used.
At each point in time there will be a set of instances of each class. In Figure
2.6 the set of Bag instances is {bl, b2}, for example. An association is also a
set, a set of pairs or links of objects of the classes at the ends of the association.
In the above example Bag_Letter has the value
The role name describes the role played in the association by the class at its
end.
The concepts of attribute and association end are quite similar, and have
been converged into the concept of a property in UML 2.0.
Rule
If an association between classes C1 and 6'2 is given in a class
diagram, and there is a role r at the C2 end, then for each object
obj of C1, obj.r is a set of C2 objects. If the multiplicity at the (72
end is 1, obj.r is considered to be a single 6'2 object.
C o m m o n m i s t a k e : p u t t i n g t h e m u l t i p l i c i t i e s o n t h e w r o n g e n d of
a n a s s o c i a t i o n . T h e y m u s t go o n t h e e n d n e a r e s t t h e class w h o s e
n u m b e r of i n s t a n c e s in t h e r e l a t i o n are b e i n g c o n s t r a i n e d . A role
n a m e m u s t go on t h e a s s o c i a t i o n e n d opposite to t h e class of w h i c h
it is a p r o p e r t y .
The multiplicity constraints can define any interval of natural numbers (pos-
sibly with no upper bound). The following standard notations are used to
describe these sets (Table 2.1).
boss 1
Person
lsubordinates Company
name: String
employees employer
association maps each person to the company they work for, and each company
to its set of employees.
Figure 2.8 gives an example of a situation that satisfies this diagram: there
are five persons, of which p5 and p l are their own boss, p2 has boss p l and p3
and p4 have boss p2. p5 works for company c2, the others work for company
c l. The arrows point in the direction of the 1-multiplicity association ends.
Associations can also be derived, in this case the role names of the associ-
ation are written with a prefix ' / ' in the class diagram.
Associations can have a navigation direction, indicating the direction in
which the system is expected or intended to navigate. This is indicated by
putting an arrow on the end of the association which will be navigated to
(Figure 2.9). This means that an instance of Board can refer to and call
Board
Square
placeMove(m:
Move) isOccupiedO:
boardSquare Boolean
4
I I I
IOri~176 I I~176
qoare Iqoare
IDoubleWord ITripleWord
Square Square
methods on instances of its squares, but that the squares are not expected
to refer to/invoke methods on their board. Arrows can be placed on both
24 Chapter 2. The Unified Modelling Language
2.3.1 Operations
Game
turn: Integer
moveNumber: Integer
gameEndedO: Boolean {query}
startGameO
startMoveO
endMove(m : Move)
addPlayer(p: Player)
lowercase letter. Operations can either be query, if they do not modify the
internal state of the object, or update, if they do. Query operation declarations
can be written with a { query} constraint beside them, on a class diagram. A
query operation usually returns some property of the object state, and is quite
similar to a (derived) attribute in this respect. If g is a Game object in Figure
2.10, then g.gameEnded() is a boolean value, for example.
In contrast, startGame() is an update operation, which changes the state
of the game it operates on, to initiate the game by choosing the first player,
etc, but which does not return a value.
An operation can have input parameters, which supply information to it.
Any number of input parameters can be listed, although it is usually good
practice to try to minimise the number, endMove(m : Move) is an example
of an operation with a parameter, it supplies the move m which has been
constructed during the move, to the game, for evaluation of its validity and to
update the game board and player scores if it is valid.
2.3. Class diagrams 25
Rules
If op(x : T) : S is a query operation of class C, obj is an object of
C, and e is a value of type T, then obj.op(e) evaluates to a value
of type S.
If op(x : T) is an update operation of class C, obj is an object
of C, and e is a value of type T, then obj.op(e) represents the
invocation of op with parameter e on obj.
2.3.2 Enumerations
An enumeration is a simple enumerated type, such as { on, off} for the set of
states of a switch. It is represented as a rectangle in a class diagram, with
stereotype 2 << enumeration >> and with its values listed. Figure 2.11 shows
a basic example. If an enumeration E is defined in a class diagram then it
can be used as the type of an attribute of a class in the diagram, for example
Direction is used as the type of orientation in Word in Figure 2.11.
Direction <<enumeration>>
vertical
horizontal
Word
orientation: Direction
2.3.3 Inheritance
Player
name" String
score: Integer
HumanPlayer
Player is called the superclass and HnmanPlayer the subclass in this rela-
tionship, and HnmanPlayer is said to inherit from Player: each feature (at-
tribute, operation or association) of Player is also implicitly a feature, with
the same name and type, of HumanPlayer, and does not have to be repeated
explicitly on the subclass.
C o m m o n m i s t a k e : r e p e a t i n g all f e a t u r e s of s u p e r c l a s s o n a s u b -
class.
Figure 2.13 shows an example of a situation that satisfies Figure 2.12. There
are four Player objects, of which p l, p3 and p4 are also in HumanPlayer.
Player
Classes may have several subclasses, for example in Figure 2.14, the class
Square has five subclasses corresponding to the five different types of square on
2.3. Class diagrams 27
a Scrabble board: ordinary, double letter, triple letter, double word and triple
word. All of these may have a letter on them, so the Letter_Square association
only needs to be written once, on the superclass.
Square
isOccupiedO:
Boolean
I I
OrdinarySquare DoubleLetter TripleLetter
Square Square
DoubleWord TripleWord
Square Square
Because every square must be one of these five kinds, the superclass Square
itself has no direct instances (all its instances are actually also instances of
OrdinarySquare or DoubleLetterSquare, etc). Square is termed an abstract
class, and its name is written in italic/slanting font on the class diagram to
indicate this. An abstract class cannot have direct instances created for it (cf,
in Java, new C(...) cannot be executed if C is abstract). Non-abstract classes
are termed concrete.
Like associations, an inheritance is a special kind of relationship, indeed
an inheritance can be thought of as a 0..1 to 1 association (Figure 2.15): for
each instance of the subclass there is (it is) a corresponding instance of the
superclass (cf the 'super' keyword in Java), and each superclass instance may
correspond to (may also be) an instance of the subclass.
Abstract superclasses may have abstract operations, operations for which
a specific definition cannot be given in the superclass, instead the individual
subclasses will give their own definitions. For example, a superclass Person
could have an abstract operation alcoholLimit() : Integer which returns the
weekly alcohol limit of the person in units. In subclasses Male and Female
this operation can be given specific definitions: to return 28 in the first case
and 21 in the second. In such a situation the operation is written both on the
superclass and on the subclass, since the subclass is providing a definition of
the operation. An operation is also written in the class box if it redefines an
ancestor definition. Abstract operations are written with italic font (Figure
2.16).
Cycles of inheritance are disallowed: if A inherits from B, then B cannot
inherit directly or indirectly from A. Multiple inheritance means that a class
may directly inherit from more than one other class, eg, HouseBoat inherits
28 Chapter 2. The Unified Modelling Language
Superclass
0..1
Subclass
from Residence and WaterCraft. UML permits this, but some languages, such
as Java, restrict inheritance to single inheritance: where each class can only
have at most one immediate superclass.
Rack 1 Letter
IrackSize:Integert rackLetters symbol:
score:
char
Integer
0..1 {ordered}
0..7
A normal association represents the concept of 'has' between entities: 'a bag has
between 0 and 100 letters', 'a player has a game', and inheritance represents the
concept of 'is a'- 'a h u m a n player is a player', 'a double word square is a square',
30 Chapter 2. The Unified Modelling Language
Board
Square
placeMove(m: x: 1..15 [ 1
Move) y: 1..15 I boardSquare isOccupied0:
Boolean
4
I I I
[OrdinarySquare I IsD~ iTripleLetter
Square
IDoubleWord TripleWord
Square Square
etc. UML also has a variation on associations which represents the concept of
one object being a 'part of' another. For example 'a wheel is part of a car', or
'a square is part of a board'. The distinction between this form of association,
called aggregation or composition and ordinary associations is that it expresses
a binding/ownership between objects of one class and objects of another. The
strong form of aggregation is termed composition and is represented by a filled
diamond at the 'whole' (owner) end. It implies a constraint on the lifetimes of
the linked objects: the parts cannot exist without the whole, and vice-versa.
For example, a Scrabble board and its squares are strongly bound together in
this manner.
UML also has a weaker concept, simple aggregation, represented by an open
diamond at the 'whole' end. The meaning of this relationship is deliberately
left open by the UML definition, so that modellers can use it as required. At
most one end of an association can be an aggregation or composition.
A composition association from A (whole) to B (part) should be:
Cat
i Wheel Square
This means that in a system that satisfies this diagram, there should be such
an object, and that it should be linked to a rackPanel object. Likewise for the
other object specifications in the model.
There are usually many ways to express a situation in a class/object dia-
gram. For example, we could alternatively model the startMoveButton,
cancelMoveButton and endMoveButton as three associations from the rackPanel
object to Button, with these rolenames on the Button end. This however makes
the expression of button-specific constraints such as text = "End Move" on
endMoveButton less obvious: the constraint would have to be placed on the
association instead of within the endMoveButton rectangle. The benefits and
drawbacks of alternative modelling choices should be considered during review
and analysis steps in a development.
C o m m o n m i s t a k e : c o n f u s i o n b e t w e e n o b j e c t s a n d classes, a n d
o b j e c t d i a g r a m s a n d class d i a g r a m s . O b j e c t d i a g r a m s o n l y d e s c r i b e
one p a r t i c u l a r a r r a n g e m e n t of specific o b j e c t s of classes, each class
d i a g r a m could have a large n u m b e r of o b j e c t d i a g r a m s w h i c h a r e
i n s t a n c e s of it, ie, t h a t d e s c r i b e a r r a n g e m e n t s of o b j e c t s a n d links
t h a t satisfy t h e class d i a g r a m p r o p e r t i e s .
Figures 2.6 and 2.13 can be directly recast as object diagrams that satisfy
the class diagrams 2.5 and 2.12 respectively.
The previous sections have introduced a large amount of notation for modelling
systems - how can this notation be used in practice to create precise, detailed
but platform-independent models of a system such as the Scrabble player?
The first step is to go through all the information that is available about the
requirements of the system, from documentation or 'stakeholders' (people with
an involvement in the commissioning or use of the system), making this in-
formation systematic by defining a number of coherent and distinct use cases
to describe the required functionalities, and by defining a class diagram to
capture the conceptual entities of the system and their properties.
For the Scrabble system we can use the existing rulebooks for the game
(summarised in Appendix A), together with practical experience of playing it,
to determine that there are only a few basic operations:
Figure 2.21 shows the use cases. We have divided the make move use case into
two, since the behaviour in the human and computer player cases will be quite
different.
player~
Human ~ Computer
Player Player
For the data model, the first step is to identify the entities in the system - a
basic way of doing this is to list the nouns in the requirements statement and
discard those that are non-specific to the system. For the Scrabble system the
key nouns appear to be:
player, game, score-keeper, score, turn, score sheet, tile, bag, blank,
rack, board, word, square, line, dictionary, double letter square,
34 Chapter 2. The Unified Modelling Language
The software itself will play the role of the score-keeper and score sheet, so
these entities are not explicitly needed. Score and turn are attributes rather
than entities in their own right (each player and played word has a score, for
example). There are many kinds of square mentioned, suggesting already that
inheritance will be useful to describe these.
Having identified the main candidates for entities, we can start to determine
what attributes and properties they have, and what relationships they have
with each other:
Putting all these facts together, we can draw an initial class diagram (Figure
2.23).
To refine this model we consider what other information and properties will
be needed in the software system (as opposed to what information is present in
the physical board game). For example, it will be useful for each player to be
given a name, so their score can be displayed on the system GUI. In addition,
one of the requirements specified that a history of moves should be kept, so this
needs to be added as an extra association from Game. Attribute types could
be made more precise, for example the score of a tile must be between 0 and
10, so we could write score : 0..10 in the Tile class. This could be over-specific,
2.5. Creating a platform-independent model 35
Board r
game -- J Square
Boar/~ 1 22-~ x" 1 15
/ 1 - boardSq . . . . ~ 1::15
Game ~ isO~():
moveNumber" 1 Boolean
Integer = 1 ~ / 0"1 IgetTileS.... 0:
1 1 ~ -- [ Integer
I ~1,
] _ ~a~ Bag OrdinarySquare DoubleLetter ITripleLetter
~0..1 \1 Bag [/bagSize: 0..100 [ I [Sq. . . . I [Sq. . . .
\ . _ ~ \~isEmpty0: Boolean I
{subset}: ,.~ IgiveTiles(x: I DoubleWord TripleWord
~.-'" ~ [ Integer): Setl ISq. . . . ] ISq . . . . I
01"9 squareTile
~'layers~'~ 2"'4 bag 0..100~ 0..1
Player_~
Tiles Tile 100 Word
current \ score: I n t e g e r [ [symbol: char *lallWords
Player 1\ / rackTales~ ...... Integer
/ o..7/I~ c--~6
1l ~ a y e r R a c k / / ~ . . 1 [ Dicta. . . . y
[H . . . . PI. . . . I ~ looknp(w--------~"
Word)------~"
I J I . [/rackSaze: @.7 Boolean
I I [addTiles(l: Set)
C~ / . . . . . . Tiles(s:et)
Guideline
Simplify the data of a class diagram where possible. In particular
if a class C has an ordered role drl from itself to a class D, and a
1-multiplicity role dr2 to D, with property dr2 : drl, then dr2 can
be replaced by an integer attribute index of C, with the element
drx[index] taking the place of dr2.
Similarly, the linear list of board squares can be rationalised into a double
array structure corresponding to the physical layout of the board. The names
used for classes and class features should also be reviewed, to determine if they
can be improved. In this system we decide to rename Tile to Letter because
'tile' is a technical term specific to the physical version of the board game,
which is not as implementation-independent or as generally comprehensible as
the name 'letter'.
Figure 2.24 shows the class diagram after these rationalisations.
2.6 Exercises
1 Draw a use case diagram and class diagram to represent the following
system.
9 Over the summer holiday, university students can book college hall ac-
commodation online. They must specify their name, student number,
course, year, and identify three college residences as their preferences.
9 The system makes an allocation of students to rooms before the start
of term, trying, where possible, to allocate students to a room in one of
their preferred halls.
3 In Figure 2.26, what is the maximum number of users that can be given
aliases, given that each user has five aliases, and there are at most 100 user
names available?
Draw a class diagram for a conservatory design system: this system enables
the planning of proposed conservatories in terms of their dimensions (height,
2.6. Exercises 37
Board ]
game -- [_~ Square
Board/placeMove(m: Ix: 1..15 I 1 ......
/ Mo e~I . .. I lsuccupleo():
Game ] / 1 v ~{y: a.l~ I boardSquare Boolean
turn"9 1""4 [ ~ getSquare(i-
. . . . . • 1""15~ getLetterScore0:
moveNumber: [1// j: t..t3): ~ q u a r ~ Int g
Integer = 1 ~ f / ~ 0..1 eer
startGame0 ],~..
gameEnded0: [l ~ /\
Booleanl ~ ~-~
endMove(m: Move) I ~ 1 I
addPlayer(p: Player) ] ~ , a ~ OrdinarySquare DoubleLetter TripleLetter
/1 ~ Bag ~ ; g S ~ i)..0.~o0~o!ean I I lSq. . . . [ ]Sq. . . .
/ ~ [giveI~etters(x:_ I DouhleWord TripleWord
/ nl. . . . s~ I lntege~)~Set ] ISq. . . . [ ISq. . . . [
/ players ~ 0..1 ~ sq. . . . Letter
/ Io r ~ hag 0..100"~ 0..1
/ ~ Letters Letter 100
/ [. . . . . Str!ng I ]symbol: char
/ I {identity} I rackLetters / score: Integer
/ I...... Integer [ {ordered}~Only}
/ I /~ 1"x 1 [playerRack ~ . . 1 setSymboi(c: char----) * ~ allWords
I I H umanPlayer
I ~ ~~r: rackg
Rack. ,o f17 1 */
] ' _' ] addLetlers(l: / Dicti. . . . y
/ ] ComputerPlayer[[] Set) / lookup(w: Word):
l ~ S [ . . . . . . Letters(l: / Boolean
9 ] history {ordered} ~ I Set) ]
Move I * ~ l 0..1/
...... Integer 1 ~ *~
validateMove( [1 *x ~ /
n-,nteger,- I 'ette~~ r
B~176 r I
calculateScore( [ ] ]
b: Board):
Integer
rl 1
A
r2
User UserName 10
0..1 alias text: String
5 Draw a class diagram for a conference centre booking system, which allows
customers to book conference rooms for specified time slots (given by a date
and start and end time). A room has an integer capacity and a set of facilities,
such as projectors and PA.
Define a use case diagram for the following ambulance dispatch system:
9 The system receives notification from the emergency services when a new
incident occurs requiring ambulance attendance.
9 The system then tries to find a free ambulance which is sufficiently near
to the incident and then to a hospital so that the patients can be delivered
to hospital within 30 minutes (15 for a serious emergency).
9 If an ambulance can be found, the one with the shortest distance to the
incident is dispatched.
9 Ambulance crews notify the system when they reach an incident and
complete their journey delivering the patients to hospital, and on return
to their ambulance station.
10 Draw a class diagram for an estate agents' database, which records details
of properties, their asking price and the minimum price that the vendor will
accept, their location, if they are freehold or not, and the details of their seller.
The size of the property in metres squared and feet squared should also be
given (one square metre is ten square feet).
The contents of the property are described as a set of spaces, which can be
either rooms, hallways, roof terraces, garden areas, outbuildings, etc. Each has
2.6. Exercises 39
I1 What are the multiplicities of the role ends (both called spouses) of an
association representing the relationship of marriage (under UK or USA law),
between subclasses Male and Female of Person?
What additional constraint should be added if the association is viewed as
a self-association on Person?
Chapter 3
In this chapter we describe the UML constraint language, OCL, and a subset,
LOCA, of OCL. OCL is a means to express more complex properties of diagram
elements, and interrelationships between elements. OCL is defined for version
2.0 of the UML [34], and this is the version we will base our own constraint
language, LOCA, on.
Full OCL notation is itself a complex language [34] which contains four
different forms of collection: sets, ordered sets (sequences without duplicates),
sequences and bags (multisets), many operations on these and on single valued
data, quantifiers, and the capability for auxiliary and recursive definitions. Here
we will use a simplified subset of OCL which is adequate for most purposes.
40
3.1. Using OCL and LOCA Constraints 41
Table 3.1 shows the syntax of this subset, which is known as L O C A (Logic
of Objects, Constraints and Associations). A valueseq is a comma-separated
< value > "'= < ident > I < number > I < string > I < boolean >
< objectref > ::= < ident > I
< objectref >. < ident > l
< objectref > I( < expression > )
< arrayref > ::= < objectref >1
< objectref > [< value >]
< factor > "'= < value > I { < values eq > }I
S~qu~.r < v a l ~ q > } l < a~ay~4 >l
< factor > opl < factor >
< expression l > "- < factor > op2 < factor >
< expression > "= < expression l >1 ( < expression > ) I
< expression1 > op3 < expression >
invariant > "= expression >1
expression > => < expression >
A·S·Ellis
THIRD FLOOR PLAN.
The height of the parapet is 6 feet 6 inches, and the pattern of the
coping may be seen at the junction with the buttress turrets, and
this also shows that the roof was confined to the inner circle, and
did not project over the parapet. There are also traces showing that
the embrasures contained, as at Alnwick, a hanging shutter.
The inner circle, or chamber within the inner walls, was 27 feet
diameter, and its flooring rested upon a range of nineteen plain
corbels. Only the lower part of the wall of this chamber remains, but
the jambs of a doorway show that it was entered from the rampart
walk. The wall, and consequently the chamber, was about 7 feet
high, and upon it was a conical covering, the eaves of which must
have projected somewhat over, and discharged their water into the
rampart walk. This mode of finishing off the summit of a tower, by
placing the uppermost floor within the circuit of the rampart walk
and leaving the battlements free from the roof, is seen in its greatest
completeness at Coucy, and what is there seen illustrates what must
have been the arrangement here, at Pembroke, at Martens Tower,
Chepstow, and in the smaller and later flanking towers of Holyrood
House. It is obvious that unless the roof sprung here from a wall
within the parapets, or unless there was a timber gallery carried
round outside the wall, such a tower as this could not be defended.
Its loops were intended for light and air, not for defence; this could
only have been directed from the battlements. Hence the absurdity
of covering in towers intended for defence, or at any rate to have
the appearance of being defensible, with conical roofs springing from
the outer wall.
Of course the accommodations of such a tower as this of
Conisborough were not such as to suit its lords, still less their ladies,
save under the pressure or in expectation of a siege, a remark which
applies to all, save the largest, keeps. The passive strength of
Conisborough, and its rocky base, secured it against attacks even if
seconded by engineering machinery. No catapult or battering-ram
would be at all likely to shake or break it. The peril to be guarded
against was a blockade, and with this view there was a well within
the tower, and the two lower floors, it is clear, were intended for the
storage of provisions. The first floor would be the ordinary room of
the constable, or lord, and of his family or guests; the men,
probably, also sleeping there. The room above would be the ladies’
room, with the oratory close at hand. The kitchen was above all, and
there, also, at the battlement level, would be the lodging of the
small garrison, probably of not more than ten or a dozen picked
men, with a ready communication with the ramparts.
The fashion of round keep towers, quite different from the shell
keeps, came in towards the close of the Norman and during the
Early English period of architecture, when frequent communication
with the East had affected men’s military ideas. A few, such as
Brunless, Tretower, Launceston, and Orford, are found in England of
that time, but in France there are many, widely spread, and very
grand examples. Philip Augustus was a great builder of such towers.
That of the Louvre, of which the circular foundations, with the well
and the sewer, were uncovered a few years ago, was his work, and
to the same period, though late in it, 1223–30, belongs the Tower of
Coucy, probably the finest military structure ever built.
Taking a general view of the Castle of Conisborough, and giving
due weight to the value of the evidence afforded by its remains, it is
clear that the excavation of the ditch, both of the hill and the
outwork, and the scarping of the former, were the original and
English works, to which an early, though not the earliest, Norman
lord added the curtain wall of the enceinte, and much of the lower
gatehouse. He certainly also built a hall, kitchen, and lodgings within
the inner area. The next addition of importance, the keep, was
certainly made a century later. The curtain wall was taken down to
make room for a part of it, and not only was there no bond between
the old wall and the new tower, but the junction was carelessly and
clumsily effected, as may be seen from its present condition.
Probably some later alterations were made as regards the hall and
lodgings. The wall near the entrance to the inner ward seems to
have been partially rebuilt, but subsequently to this there does not
seem to have been any addition of importance. The castle was no
doubt rendered untenable during the wars of Charles I., and time
and neglect have since completed the ruin.
It is singular that so strong and so remarkable a fortress should be
but little noticed in the earlier records. Invention, indeed, in the
absence of evidence, has attempted to fasten upon it an early
history. “Conyng” has, by British antiquaries, been converted into a
Breton Conan, and Caer-Conan, thus constructed, has been mixed
up with Aurelius Ambrosius and the Kentish Hengist, who is asserted
to have here fought, been slain and buried. There is, however, no
evidence whatever connecting this place with either the Britons or
Bretons, or the Romans, or Hengist. Everything bearing upon its
origin is Saxon, but Saxon of a much later date than Hengist. Two
tombstones carved in what is generally regarded as a præconquistal
style were long seen in the churchyard, and are now placed for
security in the church—so securely placed, indeed, as to be scarcely
visible. The earliest mention of the place is probably in the
testament of Wulfric Spot, the minister of King Ethelred, and the
founder, in 1004, of the Abbey of Burton-on-Trent. By this document,
printed by Dugdale in his Monasticon [I. 266], Wulfric bequeaths to
Ælfred certain lands and fisheries of Cunuzesbury, so that about a.d.
1000 it belonged to that great Saxon. Mr. Hunter, whose history of
Conisborough leaves nothing to be desired, points out that this
devise was really a very ample one, for the fisheries were not those
of the Don but of a part of the Soke of Hatfield, which were of great
value. In Domesday, the lord of “Coningesboro” had twenty fisheries
at Tudworth, yielding each 1,000 eels, and long afterwards they
were important enough to be specially recorded. It seems therefore
probable that, at least as early as the year 1000, Conisborough was
the head of a large estate or Soke. The name of “Moothill field,”
borne by an enclosure about three-quarters of a mile south-east of
the castle, indicates the place of the court for the liberty or
jurisdiction. The hill has been removed. There is a Moot-hall near the
church.
While the castle has retained something of its ancient name, that
of the ferry over the Don at its foot has undergone translation, and
is known as Kingsferry. Who the king was who gave name to both
has long been unknown; probably he was of Northumbria. The old
Soke, the growth of centuries, received its final consolidation at the
Conquest, when it was granted by William the King to William Earl
Warren. At that time the fee was probably one extensive parish, for
Conisborough seems to have been the mother church of Barthwell,
Hatfield, and Sandal, three churches named in Domesday.
Conisborough as a parish church, therefore, thinks Mr. Hunter, can
scarcely be later than Ælfred, and may be older than even Doncaster
itself. Such is the antiquity of the memories and speculations with
which this very remarkable place is associated.
Immediately before the Conquest it belonged to Harold the Earl.
Earl Warren evidently took it as it stood, and seated himself in the
English “Aula” at Conisborough, having about him the twenty-eight
vills which either wholly or in part were appended to it, and which
included much of the Wapentakes of Strafordes and Siraches. These
were the lands “quæ pertinent ad Coningesberc,” and which formed
the “Socæ pertinens.”
The possessions of Earl Warren in England were extensive, but
were especially valuable in Sussex, Norfolk, and Yorkshire; and what
Lewes was to the former Conisborough was to the latter, and as the
Soke became an Honour the castle was its “caput.” In Earl Warren’s
foundation charter to Lewes Priory in 1078, it is provided that the
monks should find him lodgings as he went and returned from
Yorkshire, so that when he crossed from Normandy he took Lewes
on his way. The connexion between his two lordships he cemented
by giving to Lewes the church of Conisborough. Earl William was
created Earl of Surrey about 1088, and died in 1089, and among his
possessions stand enumerated the Lordship and Soke of
Conisborough, with twenty-eight vills and hamlets.
II. William Earl of Surrey, son and heir, supported Robert Curthose
against Henry II., and with him retired to Normandy. On being
pardoned, and his earldom of Surrey restored, he changed sides and
fought for Henry at Tinchebrai. He gave to Roche Abbey the tythe of
his Hatfield fisheries. He died 1138.
III. William Earl of Surrey, his son and heir, the third earl, joined in
the mixed French, German, and English Crusade in 1145, during
which, in 1148, he fell, leaving a daughter and heiress.
IV. Isabel de Warren, who married, first, William de Blois, a natural
son of King Stephen; and, secondly, Hameline Plantagenet, natural
son of Geoffry Earl of Anjou, and half-brother to Henry II.
William was Earl of Boulogne and Mortaigne, and, by his wife,
possibly of Surrey. He died childless 1160.
King Henry seems to have taken and held the earldoms for a while
in his own hands, but, in 1163, Isabel married Hameline
Plantagenet, who enjoyed her honours and estates and, 12 Henry
II., paid scutage on sixty knights’ fees. Hameline bore the probably
Norman title of Earl Warren, and was an active soldier in his day, a
faithful servant to Richard I., and much employed in transactions
both of peace and war. Also, though engaged occasionally in
Normandy, he appears to have passed most of his time in England,
and was by no means an unlikely man to have added the keep to his
castle of Conisborough. He died 3 John, 1201, Isabel having died in
1199. Their son succeeded. Earl Hameline founded an endowment
for a priest for the chapel of St. Philip and James within the castle.
This probably stood in the courtyard for the use of the garrison, for,
11 Edward II., the Earl of Lancaster gave timber from the wood of
Conisborough to repair the roof of the chapel within the castle,
which therefore could not be the oratory in the keep, which is
vaulted. King John was here March 12, 1201, probably taking
advantage of the earl’s death to view the castle and possessions.
V. William Plantagenet, or de Warren, son and heir of Hameline
and Isabel, who succeeded as fourth Earl of Surrey, was probably
then of age, as he had livery at the least of some of his lands, 4
John, 1202. He held the earldom for an unusually long time, and
much added to its wealth and consequence. As a Magna Charta
Baron, he behaved with great moderation, and upon John’s death he
swore allegiance to Henry. He married, first, Maud, a daughter of the
Earl of Arundel; and, secondly, Maud, widow of Hugh Bigot, Earl of
Norfolk and Earl Marshal, by a daughter of the great William
Marshal. He died 1240, 24–5 Henry III., leaving a son, John. Maud,
the earl’s widow, had livery, 30 Henry III., of the rod and office of
Earl Marshal, as elder co-heir of her brother. She also held the
custody of the castles of Conisborough and Chepstow until her death
in 1246, 32 Henry III.
Their son and successor, VI. John, fifth Earl of Surrey, who
succeeded at five years old, married in 1247, being then very young,
Alice le Brun, who died 1290, half-sister of Henry III. In 1254 he
paid an aid upon sixty knights’ fees. He lacked much of the prudence
of his father, and his general character was scarcely in accord with
his famous answer to the “Quo Warranto” of Edward I., to whom,
however, he was a better subject than to his sire. He died 32 Edward
I., 1304, having held the earldom sixty-four years. He was
summoned to Parliament as Earl of Surrey and Sussex.
William his son died 14 Edward I., 1286, and therefore before his
father. His son, and the successor to the earldom, was, VII. John de
Warren or Plantagenet, sixth Earl of Surrey, a posthumous child,
born 1286. When nineteen years of age, he married Joan, daughter
of the Earl of Barr, but had by her no issue. 17 Edward II.
Conisborough Castle was in the king’s hands, and 18 Edward II. he
appointed the Constable. 19 Edward II. the earl recovered his
estates, but had surrendered them to the king and his heirs, taking a
re-grant for his own life. He was also both Earl of Sussex and Earl of
Strathern in Scotland. Joan Countess of Surrey was at her castles at
Sandal and Conisborough in 1314.
Earl John died 1347, and his will is dated from Conisburgh Castle,
and the title of Surrey seems to have gone to Edward Earl of
Arundel, son of Alice, Earl John’s sister. Besides natural daughters,
he left two sons by Maud de Nerford, John and Thomas de Warren,
to whom and their mother he left, with the king’s permission, a very
considerable property, including Conisborough. Thomas Earl of
Lancaster seems to have obtained from Earl John some sort of
forced occupation of Conisborough, which came to an end upon his
attainder, so that Earl John recovered and died seized of it.
About its descent there is some uncertainty, for Henry, the brother
and heir of Earl Thomas of Lancaster, did homage for the castle, 1
Edward III., to which John, Earl Warren, laid claim. Earl John held it
5 Edward III., and agreed to a grant of 65 acres of the waste lands
of the manor by the king to William de Skargill. Similar grants were
made in the five following years by the earl and confirmed by the
king, with a note that the earl’s tenure was for life only.
Probably the children of Maud de Nerford found it to their interest
to allow the Crown to possess the castle, for at Earl John’s death it
was held by Edward III., who granted the castle to Edmund of
Langley, his fifth son, afterwards Duke of York, who died 1402, from
whom it descended to his son Edward, also Duke of York. He fell at
Agincourt, childless, 1415, and was succeeded by Richard, son to his
brother Richard Earl of Cambridge. He became Duke of York, and
was called also Richard of Conisborough, from his birth in the castle.
Richard, who was great-grandson of Edward III. and father of
Edward IV., was slain at Wakefield, 1460. His second wife and
widow, Maud Clifford, held the castle in dower, and lived here. She
died 1464. The decay of the castle probably dates from her death,
for Edward Duke of York, who succeeded, became Edward IV., and
nothing has generally proved more fatal to an independent historic
estate than its absorption by the Crown.
Conisborough remained in the Crown, and, though probably the
buildings were suffered to fall into decay, some of the offices
attached to the castle and domain were kept up. As late as 1522, Sir
H. Wyatt and John Melton were bailiffs and stewards of “the
lordships of Conysborowe,” keepers of the park, &c., and there were
constables and door-wards of the castle. Finally, James II. granted it
to Carey, Earl of Dover, from whose family it passed to that of its
present owner. King, in his “Munimenta,” has given elaborate plans,
and a yet more elaborate history of this castle, but neither can be
depended upon. There is also an excellent paper upon it in the fifth
volume of the Archæological Journal by Mr. Milward, the plans
attached to which seem, however, to be taken from King.
Conisborough Castle deserves a better fate than has of late years
attended it, or than seems likely to attend it. Its position upon one
of the most celebrated of the Yorkshire streams, its grand natural
mount, and the striking character of the earthworks by which it is
defended, are quite enough to attract public attention; but in
addition it has an undoubted though obscure Saxon history, and
from the Norman Conquest it was for three centuries or more the
residence of a very powerful race of barons, the evidences of whose
power and wealth are preserved in the ruins of their fortress. By
whom, or precisely when, the present works in masonry were
executed, is a question not exactly to be decided. William de
Warren, the third and last earl of the old stock, 1138–1148, was a
very likely man to have built in masonry this his most important
northern castle, and it is probable that he built the enceinte wall of
the inner court, and the hall and offices now destroyed. The keep is
certainly later, scarcely much earlier than 1200, and is, therefore,
probably the work of Hameline Plantagenet, who held the earldom
and the castle from about 1163 to 1201. The tower was, no doubt,
added for security only, for, though it contains state apartments and
an oratory, these were dark and inconvenient, only fit to be
inhabited during a siege. The hall and ordinary lodgings were, of
course, more spacious and placed in the court, where are still traces
of their foundations.
At a still later period, possibly under Earl John, who held the
earldom from 1240 to 1304, the Norman curtain seems to have been
repaired and strengthened with round bastion turrets, small and
solid, along the southern and western faces of the inner ward. Then
also the arrangements for crossing the ditch, and defending the
lower entrance, were made more elaborate. The work of this period
is of inferior quality, and much of it has fallen down. Since this no
additions of any importance seem to have been executed.
It is probable that, during the civil war and after the death of King
Charles, the curtain wall, domestic buildings, and lower gate-house
were broken down, and the keep gutted and unroofed, but since
that time, now nearly two centuries and a half, the ruins seem to
have been left untouched save by the hand of time. Such is the
excellence of the workmanship of the keep that for very many years
the walls stood unshaken. During the last quarter of a century,
however, the rains of autumn and the frosts of winter have begun to
tell upon the structure, and the top of the tower is in a shaky
condition. Still, it is not so far gone but that a few pounds judiciously
laid out upon it would save it. The upper two or three feet should be
removed, stone by stone, and replaced with water-lime or cement.
The cost of this would be very trifling indeed; but what should also
be done, and what would not by any means involve a very serious
expense, is the replacement of the roof and floors. All Yorkshire, and
indeed all the Archæological Societies in England, from the Society
of Antiquaries down to the most recent local society, must feel an
interest in this subject. Probably, if it were brought before the owner
of the castle in a proper manner, the necessary repairs would be
undertaken; if not, surely it would not be difficult to provide the
means by private subscription. In any case something should be
done at once, for the top of the keep is in that condition that every
winter tells severely upon it.
The plans and illustrations appended to this notice of the castle
are from actual survey by Mr. A. S. Ellis, and by him presented to the
Yorkshire Archæological Society, by whose permission they are here
reprinted. They will be found as far superior in accuracy as in
completeness of detail to any plans as yet published, and it may be
said of them, and it is no slight praise, that they are worthy of the
important fortress they are intended to illustrate.
CONWAY CASTLE.
THE castle and town of Conway form together the most complete
and the best preserved example of mediæval military architecture in
Britain. The works are all of one date and design, apparently by one
engineer, at the command of a monarch specially skilled in the art of
war, and whose intention here was to command a very formidable
pass, and to put a curb upon the boldest, most persistent, and most
dangerous of the foes who strove to resist the consolidation of his
kingdom. At Conway are displayed all the arts of defence as
understood in the thirteenth century. The position is naturally strong,
the walls are of unusual thickness, each part of the containing
curtains is flanked by frequent towers, and the castle predominates
over the whole position, commanding and protecting the town, and
forming a citadel within which, as a last resource, a secure shelter
would be afforded.
Conway, the Aber-Conwy of the Welsh, stands on the left or
western bank of the river whence it derives its name, and which is
commemorated by Drayton and Spenser as rich in “precious orient
pearls,” and here is widening into an estuary. The southern front of
the town is further protected by the marshy bed of the Gyffin, which
here joins the Conwy. Town and castle cover a triangular mass of
rock, of which the castle occupies the apex projecting into the water.
The curtain wall which encircles the town is strengthened by twenty-
eight towers, all but two or three of which are half-cylinders in
figure, and open from top to bottom in the rear. They rise one stage
above the curtain, which also is unusually high. Between two of
them there project upon corbels from the curtain at the battlement
level a row of twelve garderobes, showing that sanitary
arrangements were by no means neglected even in the thirteenth
century. There are three gates, each flanked by a pair of towers,
defended by double doors, portcullis, grate, and drawbridge. One of
these, Porth Uchaf, opens landward; a second, Porth-isaf, upon a
quay along the water’s edge; and a third, Porth-y-felin, opens in a
shoulder of the wall upon the river below the castle, and gave a way
to the castle mill. There is, besides, a postern, also below the castle,
and opening upon the sea-shore. Besides these defences a thick
spur wall, defended above by a double battlement, extends from the
sea-front into the sea. Formerly this was carried to low-water mark,
and ended in a small round tower, and thus effectually prevented
any attempt to turn the flank of the defences and attack the town
from the sea-front. The town walls run up to, but their rampart walk
does not communicate with, the castle, which, however, forms a part
of the enceinte, and has one front with its main entrance within and
towards the town.
It is said that the rock occupied by the castle originally extended
some way eastward into the estuary, and was, therefore, a point of
danger on that side. To remove this, the rock was quarried away and
a passage opened, which is now the main channel of the river, and is
spanned by the road and railway-bridges of Telford and Stephenson.
It will be observed that Conway is not, like Gloucester and
Chester, posted on the English side of the river, as if intended for
defence only; like Chepstow, it is placed beyond the stream, and
intended as a tête-du-pont to cover the passage of troops across the
water.
In plan, the castle is somewhat of a parallelogram, 100 yards east
and west, and with a breadth ranging from 35 yards to 40 yards.
The northern front is straight, the southern zigzag, following the
irregularities of the rock. Its general level is several feet above the
nearer parts of the town. There are eight towers, one at each of the
four angles, and two, intermediate, upon each of the long faces.
There is no gatehouse, a very unusual omission in an Edwardian
castle, but one the cause of which is here very obvious. The towers
are cylindrical, about 40 feet in diameter, but somewhat flattened
and irregular on their interior faces, to enable the rampart walk or
allure to be carried on without traversing their interior chambers. To
allow of this, bold corbels, or sometimes a projecting shelf of
masonry are applied to the internal or rearward face of the tower at
the proper level. By this means there is secured an uninterrupted
walk all round the place, communicating with, but not traversing
each tower.
The area is divided by a very thick cross curtain into two wards.
The outer or western is 60 yards long, and contains the great hall,
the chapel, the kitchen, and the water-tank; the eastern or inner
ward, 40 yards long, contains the smaller hall and the state
apartments. At each end the castle is covered by a small platform, at
the level of the courts within, and supported by retaining walls of
considerable height, crowned by two light parapets, each with three
small half-round bastions flanking the curtains. Each of these
platforms protects and covers an entrance. The main entrance is at
the west end and from the town, and is a very curious piece of
engineering skill. A causeway of masonry, a viaduct, about 14 feet
broad and parapeted on each side, ascended with a very steep slope
to a point 13 feet from the gate of the barbican, where it stopped
abruptly, and is still seen rising out of the ditch, and about 20 feet
high. The barbican is a narrow rectangular space, contained
between two walls, ending below in two small round turrets which
flank the outer gate, and above is another gate opening on the end
of the platform under the north-western main tower. A very
ponderous drawbridge, working on trunnions 14 inches in diameter,
dropped from the outer gate upon the pier already mentioned. The
pier was 4 feet lower than the cill of the bridge, so as to preserve
the steepness of the approach. The bridge was balanced by a short
and heavy tailpiece or counterpoise which worked in a quadrant-
shaped pit below it. The gateway had a portcullis and doors, and
within it a staircase in the side wall led to the battlements over the
gate. The upper gateway was closed by a stout door only, but was
protected by the adjacent bastion of the platform, which has a loop
towards it. The entrance thus completed was broad enough to admit
two horsemen abreast, and the steepness gave the defenders a
great advantage over the enemy. The barbican of Conway may
conveniently be illustrated by a reference to that of Brampton Brian,
which contains the same arrangements, though on a larger scale.
The woodcut shows the tower flanking the drawbridge, the outer
and inner gates, and between them the mural staircase leading up
to the ramparts.
CONWAY CASTLE.
The chapel, bratticed off at the east end of the hall, had also an
open roof, with one stone rib. It has two windows to the south and
one to the field, and at its east end is a larger, three-light window,
with a round head, and a piscina in the south jamb. The tracery is
broken away. The great kitchen has been pulled down. It was built
against the north curtain, opposite to the hall door. There remains of
it a water-trough occupying the seat of a window, and lined with
cement. Near the kitchen was a large tank quarried in the rock, lined
and cemented, for the storage of water; a culvert brought into it
water from the roofs, and leaden pipes have been traced from an
exterior spring at some distance. It has been opened to a
considerable depth, 14 feet or 15 feet, but was certainly not a well,
though possibly one was intended.
The cross wall separating the two wards is of the same height and
thickness as the exterior curtains. It is pierced near its centre by a
shoulder-headed doorway, closed with a door only, and opening into
the inner ward. This door is covered by a sort of lodge on its
western face, with a loop towards the main gate.
The inner ward, nearly square in plan, has the state rooms on its
south and east sides. These have basement chambers, well lighted
and with fireplaces on the ground floor, level with the court; and
above these, on the first floor, are the state apartments, with open
roofs. First of these, on the right is the smaller hall, 30 feet by 28
feet. It has a door at its west or lower end communicating with a
sort of lobby, and so with a main tower, which probably contained
the kitchen. At the other or east end is also a door, opening into the
withdrawing-room. Towards the court is a central fireplace, between
two handsome windows. These were flat-topped, of two lights, and
the upper half was filled with Decorated tracery, now broken away.
In the remaining side, towards the field, is at one end a small
window, and at the other a door opening into a mural chamber, a
garderobe. The roof was strengthened by two stone ribs, of which
one is perfect, and is not quite so plain as those of the great hall.
The withdrawing-room has a fireplace on the north side, and was
crossed by two ribs, both broken down. This room has a mural
passage in its south wall communicating with a garderobe and large
vaulted chamber, also in the wall, and so opening into the ground
floor of the south-eastern or king’s tower. Another door opens into
the queen’s chamber. This is a large and handsome room, also on
the first floor, occupying the east side of the court. Its roof contained
two ribs, both removed. At its north end are passages into
garderobes, mural chambers, and an oratory, all contained in the
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com