notes on architecture

54
Dr. Joonas Lehtinen Founder & CEO / Vaadin Notes on Architecture

Upload: joonas-lehtinen

Post on 11-Nov-2014

1.132 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Notes on architecture

Dr. Joonas Lehtinen Founder & CEO / Vaadin

Notes on Architecture

Page 2: Notes on architecture

Structure [only] when needed

Page 3: Notes on architecture
Page 4: Notes on architecture
Page 5: Notes on architecture

Nightmare

Page 6: Notes on architecture

Dream

Page 7: Notes on architecture

Last name

varchar: !LAST_NAME

Page 8: Notes on architecture

Over-designed architecture

Increases risks by making implementation complex

Tries to achieve fault-tolerance or scalability never needed

Prepares for expansion and changes that will never happen

Software architecture danger #1

Page 9: Notes on architecture

If you are not 100% sure that a

requirement is solid, choose a simpler

structure even when the requirement night

not be fulfilled

Page 10: Notes on architecture

All requirements having an impact on architecture must have clear metrics and goals

Page 11: Notes on architecture

Learn to estimate and communicate cost impacts to negotiate requirements

Page 12: Notes on architecture

Overgeneralization

Page 13: Notes on architecture
Page 14: Notes on architecture
Page 15: Notes on architecture
Page 16: Notes on architecture

Custo

miz

ation b

y P

rogra

mm

ing

Custo

miz

ation b

y C

onfiguring

Report(XSL)

ReportExample

Millstone Cards 2.0

CustomCard UI

External System

Custom Data-

Source

Settings(XML)

Theme(HTML, CSS, ...)

SQL DBWeb

Browser

External Reporting System

SettingsExample

ThemeExample

Card UIExample

System Integration Example

Data-Source

Example

Millstone Cards 2.0 Structure

Page 17: Notes on architecture

Over-generalization

Tries to overcome unknown requirements

Moves the unknown to layers where it should not be (UI or user)

Claims that your software can do thinks that you do not know

Software architecture danger #2

Page 18: Notes on architecture

Decoupling tries to reduce complexity by adding complexity

Page 19: Notes on architecture
Page 20: Notes on architecture
Page 21: Notes on architecture
Page 22: Notes on architecture

You are now prepared to change a meatball

do I really

need to change it?

Page 23: Notes on architecture
Page 24: Notes on architecture

De-coupling

Will make your system slower to build, but could make it easier to maintain

Can make your system harder to understand (more modules and interfaces)

Can make your system easier to understand (modules decoupled)

Two edged sword of software architecture

Page 25: Notes on architecture

Decouple only things that should be built

separately. !

Decouple for readability, not for potential change.

Page 26: Notes on architecture

For the love of Refactoring

Page 27: Notes on architecture

Refactoring is very cheap. Rewriting (working parts) is cheaper than you think. Cleaning up the mess late never happens. Keep your room tidy!

Page 28: Notes on architecture

#1 Choose a statically typed language or loose refactoring tooling support

Page 29: Notes on architecture

Start with the simplest possible architecture. !

When you realize you need to work around your own architecture to add features, or it is impossible to add new features, or you don't know how to model your new features on top of the architecture - refactor!

- Petter Holmström

Page 30: Notes on architecture

Art of naming

Page 31: Notes on architecture
Page 32: Notes on architecture

Naming

One of the hardest tasks

Critical for clarity

Takes a lot of time when done properly

Should be debated in code review

Sign of a good architecture

Page 33: Notes on architecture

Good name

Short

Documents the described thing

Unique (for project and domain)

Intuitive

Follows project style

Page 34: Notes on architecture

Design patterns are dynamite

Page 35: Notes on architecture
Page 36: Notes on architecture

design pattern is a general reusable solution to a commonly occurring problem within a given context [in software design]

Page 37: Notes on architecture

Powerful tool !

Never use when not 100% sure that needed !

Disastrous in inexperienced hands

Page 38: Notes on architecture

Experts trying to save your project after too many design patterns in wrong places

Page 39: Notes on architecture

UX and SA go hand in hand

Page 40: Notes on architecture

wireframes and interaction design

code

software architecture

Requirements

Page 41: Notes on architecture
Page 42: Notes on architecture

Performance is not an afterthought

Page 43: Notes on architecture

HOWTO not fail with performance

Define performance !• Customer

requirement • Performance goal

is a number • Performance has

a cost

Measure performance !• Benchmark

regularly • Start measuring

before app is built • React regressions

immediately

Page 44: Notes on architecture
Page 45: Notes on architecture

Architecture for a Library

Page 46: Notes on architecture

"Don't ever code anything which has public API. You will be sorry"

- Artur Signell

Page 47: Notes on architecture

Internal Architecture!+!

API

Public Architecture!+!

API

Your

libr

ary

Someone else's application

depends on

depends on

Page 48: Notes on architecture

2001

Page 49: Notes on architecture

UIComponent

MillstoneWeb Adapter

Applicationlogic

Web-browser

XHTMLHttp-req.

XMLState change

ChangeEvent

Data source

2003

Page 50: Notes on architecture

2013

Page 51: Notes on architecture

When you do not know how it should work, please do not hide it behind an abstraction

Page 52: Notes on architecture

Architect who is not a developer is not an architect

Page 53: Notes on architecture
Page 54: Notes on architecture

? [email protected] vaadin.com/joonas

@joonaslehtinen