Pular para o conteúdo

Exemplo Big Bank

Esta é a versão em LikeC4 do exemplo Big Bank plc, de Simon Brown, baseado em um sistema fictício de internet banking.

O exemplo apresenta a sintaxe do LikeC4 e a compara com a DSL do Structurizr, destacando semelhanças e diferenças.

A visão de panorama apresenta uma visão geral dos sistemas principais e de como eles se relacionam. O Structurizr utiliza systemlandscape para esse tipo de visão.

No LikeC4, não existem tipos especiais de visão.
Cada visão é definida por predicados que determinam o que incluir ou excluir, como include * no exemplo a seguir.

Criamos a visão index “of bigbank”, pois bigbank é o sistema de nível mais alto cujo panorama queremos visualizar.

views {
view index of bigbank {
title "Big Bank - Landscape"
include *
}
}

Resultado:


views {
view context of bigbank {
title "Internet Banking System - SystemContext"
include
bigbank,
mainframe,
internetBankingSystem,
email,
customer
style * {
color secondary
}
style bigbank, internetBankingSystem {
color primary
}
}
}

Resultado:

views {
view ibsContainers of internetBankingSystem {
title "Internet Banking System - Containers"
include
*,
-> customer
}
}

Resultado:

views {
view apiApp of internetBankingSystem.apiApplication {
title "API Application - Components"
include *
style * {
color muted
}
style singlePageApplication, mobileApp {
color secondary
}
style apiApplication, apiApplication.* {
color primary
}
}
}

Resultado:




Podemos visualizar como os clientes interagem com o sistema.

views {
view customer of customer {
include
*,
customer -> internetBankingSystem.*,
customer -> bigbank.*
exclude webApplication
style bigbank {
color muted
}
style customer {
color green
}
}
}

O Structurizr não possui uma visão específica de cliente.

Resultado: