Design Principles and Design Patterns.

25  Download (0)

Full text


Course 1 – October, 12, 2020 Adrian Iftene [email protected]


SWEBOK: place and role of software engineering, knowledge areas (KAs), related disciplines

Development and maintenance of the systems:

model driven agile development, patterns of enterprise application architecture, test-driven development, refactoring: code architecture

Object oriented design classes: SOA, object- oriented design principles, Serverless

Modeling, business modeling: BPMN, domain


Model-driven development (MDD) - software methodology focused on creating models close to a specific field than informatics concepts

Model-driven architecture (MDA) is the best known initiative of MDD and was launched by the group OMG (Object Management Group) in 2001



AMDD is agile version of MDD


Test-Driven Development – TDD

TDD steps:

1. Add a test.

2. Execut tests; the new test will fail.

3. Add functional code such that pass all test.

4. Run tests again.

If the test fails, go to 3.

If the tests pass successfully, we can continue with other functionality

5. Refactoring code (functional and testing)



IBM Rational Rose Modeler


Domain specific languages (DSL)

Working frameworks:

Eclipse Modeling Framework

Open Architecture Ware (OAW)


Business Process Modelling Notation (BPMN) is a graphical representation for specifying business processes in a workflow



EMF is an Eclipse-based modeling framework and code generation facility for building tools and other applications based on a

structured data model



AOP is a programming paradigm which isolates secondary or supporting functions from the main program’s business logic

AOP increases modularity by allowing the separation of cross- cutting concerns

AOP includes programming techniques and tools that support the modularization of concerns at the level of the source code



Cross-cutting concerns - aspects of a program which affect other concerns

Advice - additional code

Pointcut - point where additional code is executed

Aspect - the combination of the pointcut and the advice















Problem: we want to know when something changes the student (name or grade)

Solution: we add a pointcut for all “set” methods



Problem: we want to trace our program execution

Solution: we add a pointcut for all methods





SOA (Service Oriented Architecture) involves distributing application functionality into

smaller units, distinct - called services - which can be distributed over a network and can be used together to create complex applications

Services are independent functional units that solve specific problems and can be combined to solve complex problems.


Examples of services:

complete an application online to create an account view a bank statement

make an online ticket orders

For a robot: services for vision, hearing, moved



Architecture and dependencies:

When we say that we have a degraded project?

Design principles of classes:

responsibility, dependencies, separation

Architecture design principles:

Reuse, versioning, closing

Coupling, dependence

Object-oriented design patterns:

Abstract server, Adapter, Observer, Bridge, Abstract Factory



Rigid - hard to change

Fragile - changes have undesirable effects

Immobility - separation into components is difficult

Viscous - things not running to properly

Additional complexity

Additional repetition

Opacity - hard to understand


Successive changes lead to sub-optimal code structure

increase the complexity

decreases clarity

Refactoring is a change in the internal structure of a software product in order to make it easier to understand and modify without changing its observable behavior


decreased coupling

increasing cohesion



The following situations are signals for refactoring:

duplicate code

long methods

large classes

Long lists of parameters

Instructions switch by type objects - is recommended polymorphism

Speculative Generality - Hierarchy of classes that subclasses have the same behavior

Intense communication between objects (strong


Github – code

GoogleDrive - documents


SOA: ,

SOA for the real world: 11-2006/jw-1129-soa.html?page=1

Abstract Server

Agile Model Driven Development (AMDD)

Florin Leon – IP Curs 11



Robert Cecil Martin:

Design Principles and Design Patterns.

Robert Cecil Martin:

Agile Development.

Principles, Patterns, and Practices,

Prentice-Hall, 2003





Related subjects :