M885 Analysis and design of enterprise systems: an object-oriented approach Flashcards

1
Q

What is requirements analysis?

A

Is the process of elaborating the requirements in terms of understanding their business context and their impact on the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the possible consequences

of conducting an inadequate requirements analysis?

A

Building the wrong system, or one that does not satisfy the

customer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of modelling in analysis?

A

Models help software developers to deal with the complexity and to understand what is being developed. A model is an abstract representation of some view of a system. The view of a system changes with the stage of the development process. So, we have models with different perspectives according to the stage of development

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the steps necessary to develop analysis models from a domain model?

A
  1. Identify how objects, and links between those objects, are affected when the system operations, corresponding to system events from the environment, are performed.
  2. Describe how objects within the system interact with each other to verify the precondition and fulfil the postcondition of each system operation.
  3. Assign to each class of objects the responsibilities that it has to effect each system operation.
  4. Identify the operations needed to carry out the responsibilities assigned to each class.
  5. Specify those operations through operations contracts.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is association between classes

A

Is a property of a concept that relates it to another concept through some meaningful and interesting connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe class multiplicity

A

How many objects at that end are linked to one object at the other end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a property of an object

A

Its a variable that represents an attribute of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two types of identities described in the course?

A

A property is a form of identity is known as value identity.

An object identity is intelligible only to the software system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Briefly describe two types of interaction diagrams defined in UML

A

There are two kinds of interaction diagram:

  • sequence diagrams, which focus on the time ordering of the messages
  • communication diagrams, which focus on the links between objects, and their creation and destruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a a communication diagram?

A

Communication diagrams show the objects involved in a collaboration, the links between those objects, and the nature of those links. In particular, a communication diagram shows the objects, the links that exist throughout the collaboration, and those that are created and/or destroyed by the collaboration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe GRASP.

A

Craig Larman (Larman, 2002) has defined a collection of patterns (GRASP) to help the designers assign responsibilities in commonly occurring design scenarios, based on such principles. GRASP means General Responsibility Assignment Software Patterns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are patterns?

A

Architectural patterns codify recurrent software architectures, by describing the key elements of the architecture and how they fit together.

A design pattern codifies a solution to a recurring design problem. This solution is rooted in practice, in that it codifies what experienced practitioners do when they encounter a particular software problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are frameworks?

A

Framework are sets of classes with self-defined interactions which are designed to solve specific problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are product lines?

A

The concept of product line (Clements and Northrop, 2002) is based on the idea that within a specific domain many different products can be developed with a similar structure and with well-identified variation points; these variations usually correspond to alternative components that can be plugged into the defined architecture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe component architecture

A

Component Architecture aim to support the development of server-side business components. Other standards have emerged which aim to support many other aspects of enterprise application development, from user interaction to database integration. The ultimate goal is for whole system architectures to be built by fitting standard components together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe service-oriented architecture

A

SOA is an approach to build enterprise systems that deliver application functionality either as services to end-user applications or to build other services. In this approach, services are software assets, which are described and interact in a standard way, so that the focus of application development is the assembly of services as building blocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are Use Cases?

A

A use case represents one possible way of using a system; it describes, from a user’s point of view, the interactions with the system necessary to achieve a goal, i.e. it describes functionality. Users have goals that are to be met with the help of the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is inheritance?

A

Inheritance is one of the main mechanisms for the reuse of code in an object-oriented language. By applying inheritance, a class becomes the subclass of an existing class, from which it inherits attributes and methods. The subclass can, of course, add new attributes and methods, or override those of its superclass. Objects of the subclass can make use of any attribute or method defined in the superclass as though they were their own.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is delegation?

A

Delegation is where a class uses the services of another class to fulfil its responsibility. By applying delegation, a class A makes use of some or all of the services of another class B in order to fulfil some of its responsibilities. Objects of class A hold references to objects of class B which they use to invoke class B’s methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the possible obstacles to developing fit-for-purpose systems?

A

Changes in business occur frequently, so software has to adapt to these frequent changes in order to keep a business competitive. Software development does not always mean development from scratch. Timely delivery of new software may mean that existing software has to be reused.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the practices that may help remove obstacles in developing fit-for-purpose systems?

A

Reuse of expertise, design and even existing systems or parts of them within new developed software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is object identity?

A

Is a form of identity intelligible only to the software system, where it identifies which object to use as a receiver of a given message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is value identity?

A

Is an identifier similar to values which are understood by people.

24
Q

Define an iterative and incremental approach to software development.

A

The term ‘iterative’ indicates the repetition of one or more activities; the term ‘incremental’ indicates that development proceeds from an initial subset of the requirements to more and more complete subsets, until the whole system is addressed. Incremental development involves an initial partition of the intended functionality; some or all of the subsequent development activities can be carried out independently and in parallel. The final product results from the total integration of the partitions.

25
Q

What are state machine diagrams?

A

State machine diagrams describe the behaviour of objects (concept and class instances). State machines diagrams are state based diagrams representing changes of state that occur due to external events.

26
Q

What are activity diagrams?

A

Activity diagrams depict business processes and use cases. Activity diagrams are activity based and transitions between activities occur on termination of an activity.

27
Q

What problem is addressed by the Layers pattern?

A

The Layers architectural pattern helps to structure the architecture of a system into groups of subfunctions, each at a particular level of abstraction.

28
Q

What is domain modelling and its objective?

A

Domain modelling is concerned with understanding and modelling a situation independently of a decision to use a software system to deal with it. A domain model is a representation of the main concepts in the real-world problem, i.e. the business under consideration. A domain model does not assume that software is to be used to deal with the situation. (essential or business model)

29
Q

What is specification modelling and its objective?

A

Specification modelling assumes that a software system will deal with a situation; a specification model represents software elements used in the software solution to a problem, and is mainly concerned with the definition, at a high level of abstraction, of the services provided by the software.

30
Q

What is design modelling and its objective?

A

Design modelling describes the software system, the allocation of responsibilities and the internal sequencing and control flow. (implementation model)

31
Q

Discuss three major risks in software development, and ways to mitigate them.

A

Possible risks include:
• Misunderstanding the application domain. This could be mitigated through a thorough upfront domain analysis, possibly involving domain experts, and by producing models of the business domain and processes to be validated by the customer.
• Misunderstanding the requirements/delivering the wrong product. This could be mitigated by adopting a process based on short-cycle of incremental development, each ending with customer validation.
• Project overrun. This could be mitigated by adopting a standard development process, such as the Unified Process, which facilitates project management.

32
Q

Discuss benefits and drawbacks of reuse in software development, and how an object-oriented approach can facilitate reuse.

A

Benefits of reuse include cost effectiveness and improved reliability; it is cheaper, in principle, to make use of existing tested components rather than always developing from scratch. However there are drawbacks: reuse can introduce additional costs at least in an initial phase and it may create difficulties mainly in a traditional approach where the tools and work practices do not support it. Reuse is supported by the object-oriented approach in many ways, including:
• Inheritance and polymorphism: they encourage classes to be reused and easily extended by creating others as subclasses and customisation of already existing ones.
• Patterns: they support reuse of experience; they evolve from existing practical experience of solving problems; they represent previous experience.
• Components: these are concrete pieces of software that can be used as they are; glue code may be required to make bespoke adaptations within an application.
• Frameworks: these are collections of classes and components which are put together for the solution of particular problems, e.g. building interfaces or creating test code. Frameworks are partial implementations which can be extended and customised through inheritance and polymorphism.

33
Q

Discuss the role of operation specifications throughout software development.

A

Operation specifications provide rigorous descriptions of the system operations that should be implemented in the system.
They provide a bridge between requirements analysis and design, for instance by capturing the effect of a use case in a form that is amenable to subsequent design. They can be used to verify the correctness of an implementation by evaluating the code against its operation specifications.
In Design by Contract, they provide a means to define each operation contract in terms of pre and post conditions, and support testing where pre and post conditions can be used to define test cases, fixtures and oracles.

34
Q

Describe Design by Contract and its main parts, and discuss its main benefits for software development.

A

Design by Contract is the process of incorporating conditions into all phases of software development, from analysis through design and into implementation.
Under Design by Contract, a software system is viewed as a set of collaborating software components whose interaction is based on precisely defined specifications of mutual obligations – contracts.
The contractual model is supported by invariants, preconditions and postconditions. An invariant is a condition that the object must satisfy before and after executing an operation. A precondition specifies a condition that the caller of an operation agrees to satisfy. The precondition is a condition that must be true before an operation can be invoked. A postcondition is the condition that the operation itself agrees to achieve.
Main benefits of Design by Contract include:
• clarification of ambiguity and omissions in the requirements;
• a systematic approach to software construction, which ensures the software will perform its tasks exactly as defined by its specification;
• an effective framework for verification and testing;
• a method for ensuring software correctness;
• a method for documenting software.

35
Q

Explain the difference between unit testing and integration testing. Can you think of a situation where integration testing would not be needed?

A
Unit (or component) testing is the testing of individual units of software in the system, e.g. a class in an object-oriented system.
When a system is built via the development of components or separate increments, integration testing aims to ensure that problems do not arise when components or increments are put together.
Integration testing is not needed when a simple system is built without partitions or increments and without different components.
36
Q

Discuss how test-driven development (TDD) deals with unit and integration testing.

A

In TDD the distinction between unit and integration testing is somewhat blurred as testing is continuous and exhaustive. Development proceeds through small increments of code; each unit of new code is tested, and its tests are written before, and drive the development of, the code itself; each new increment is immediately integrated into existing code and all tests rerun; no new development occurs until all tests are satisfied.

37
Q

The MVC separates presentation and domain logic. Briefly discuss the advantages of this separation.

A

Here are some advantages:
• Separation of concerns: when you design a model you focus on business issues; when you design a presentation you are concerned with aesthetic and usability issues.
• Ease of testing: domain logic is easier to test and tests can be automated; graphical interfaces are hard to test, and tests are by and large manual.
• Flexibility of design: multiple presentations may be developed for the same model, allowing the design to cater for different types of users and different contexts of use.

38
Q

Briefly describe the problem addressed by the Observer pattern and its possible use within the MVC framework.

A

The Observer pattern supports one-to-many relationships between objects.
Within the MVC, the Observer pattern can be used to create a one-to-many relationship between a model (the subject) and its views (the observers).

39
Q

Briefly describe the mismatch which is mediated by a persistence layer between the domain layer and a specific data source layer – say, a relational database system.

A

Each object in an executing program is distinguished by its object identity that in effect represents a reference to the memory location that the object occupies at a particular time. Object identity is assigned and maintained by the run-time system that controls the execution of a program.
Each row in a table may be identified by the value(s) of its primary key column(s). Value identity is typically supplied by the users of a system when a row is first inserted into a table. The value does not usually change.
A consequence of the way that object identity is assigned to an object is that it allows two objects to have the same state. This is because every object upon creation has been assigned a unique identifier by the run-time system that is not a property of the real-world object it may represent. However, to store an object as a row in a relational database table it is necessary for that object to have a unique property that can be used as the primary key value for the row: value identity does not allow two rows of a table to be identical.

40
Q

Briefly describe a general approach to enable an object to be stored as a row in a relational database table.

A

A general approach is to generate a unique object identifier (OID) for each object and its corresponding row. An OID is usually an integer based value unique to a specific object. As OIDs have no relationship to the actual business data in the objects or tables, a suitable mechanism for generating OIDs has to be established.

41
Q

Briefly describe how the Enterprise JavaBean (EJB) architecture addresses the mismatch.

A

Each entity bean within an EJB container is identified (located) by its primary key. The entity bean’s primary key usually maps to the primary key of the corresponding row in the database.

42
Q

What are the disadvantages of developing software in strict sequence through all its development phases?

A

The results of implementation and testing may lead to refinements in the requirements specification that are difficult to accommodate in a strictly sequential development. The period of development is long, any feedback on the requirements comes too late, and the requirements may then no longer be valid.

43
Q

Briefly describe when each of the three modelling perspectives (domain, specification
and design) is relevant.

A

Domain modelling is relevant when we want to understand the business before any software development starts. Specification modelling is relevant when we have a defined set of requirements and want to model what the system is going to do. Design modelling is relevant when we want to describe in detail how the software is to achieve the required behaviour; this involves, for example, representing the flow of control for the required functionality.

44
Q

What is a sequence diagram?

A

Sequence diagrams are used to show the time ordering of interactions between objects.

45
Q

What problem is addressed by the Singleton pattern?

A

To ensure that a class has only one instance, and to provide a global point of access to it.

46
Q

What problem is addressed by the Factory pattern?

A

To define a specialised object for the creation and initialisation of other objects.

47
Q

What problem is addressed by the GRASP Expert pattern?

A

To assign responsibility based on object properties.

48
Q

What problem is addressed by the GRASP Creator pattern?

A

To assign responsibility for creating objects.

49
Q

What are advantages of using factories for the creation of objects rather than applying GRASP Creator directly to classes of the domain layer?

A

One advantage is that the logic for the creation and initialisation of objects of a given class is encapsulated within the factory. This improves system flexibility as all required changes will be local to the factory. Also, by using the singleton factory, the coupling within classes in the system remains low, as the factory can be accessed without the need for links between the factory object and its clients (although there are dependencies between clients and factory).

50
Q

What is Coupling?

A

Coupling is a measure of the dependency between classes resulting from a collaboration between objects to provide a service. It is a measure of how strongly one class is connected to, has knowledge of, or relies on other classes.

51
Q

What is Cohesion?

A

Cohesion is a measure of how strongly related and focused the responsibilities of a class of objects are.

52
Q

What is meant by low coupling, high cohesion?

A

A set of classes that exhibit low coupling is one in which the classes are not too dependent on each other. A class that exhibits high cohesion is one whose responsibilities are related (being confined to one particular functional area) and one which performs a small number of tasks. A system whose classes exhibit low coupling and high cohesion is easier to maintain and offers greater opportunities for reuse.

53
Q

Define software components.

A

Software components, or simply components, are units of software structured according to some specific object-oriented principles. These are:

  • a component encapsulates data and functions;
  • a component comes with a specification that clearly separates the component’s interface and its implementation;
  • a component is known to client components only through its specified interface.
54
Q

Define service as part of SOA.

A

A service is an application function which is packaged as a reusable component for use in a business process. The way a service is actually implemented is not relevant as long as the service exhibits the following key qualities:

  • interoperability, which allows consumers to communicate with the service: this is achieved by compliance with standard communication protocols;
  • location transparency, which allows consumers to make use of the service without being aware of where the service is actually located, i.e. on which machine or even in which business organisation. The requester of the service and the service itself are only loosely bound; in particular, the requester has no knowledge of the service implementation or its platform, and they only communicate through messages.
55
Q

Give a summary of the characteristics of a service in SOA.

A

A service is a self-contained and modular software entity. It interacts with applications and other services through a loosely coupled, message-based communication model. It supports interoperability through reliance on communication standards. It can be found by its consumers through a registry, hence its location is transparent to them.

56
Q

Discuss the differences and similarities between the application controller (introduced in Section 3) and the MVC controller.

A

The application controller isolates and abstracts business logic from presentation logic, and controls the workflow of a business process. The MVC controller manages user inputs through a user interface in order to modify business data. Thus the contexts of their applications are different: a business process versus a user interface.

The main similarity between the two controllers is that they support a separation of concerns: presentation logic from business logic in the case of the application controller; data from the user’s view in the case of the MVC controller.

57
Q

What are the main goals of testing and the main factors which contribute to its effectiveness?

A

Testing aims at verifying and validating a software system, including its models and code, in order to uncover (and hence eliminate) as many defects as possible, in a manageable amount of time and effort. Key factors to its effectiveness are how exhaustive and systematic the testing process is, i.e. how much of the system is tested and under which range of conditions, and how often tests are run throughout the software life cycle.