Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Explained_.pdf

AsherSterkin 91 views 12 slides Jul 03, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

Presentation to Wing wing community. Porting "Blue Zone" application featured in the "Hexagonal Architecture Explained" book.


Slide Content

Ported to
Cloud
Presenter: Asher Sterkin
Software Technology Expert

“Lift-and-Shift” to Cloud Seldom Works Well
Directly porting software
applications to the cloud
often results in a system
that is more fragile, more
expensive, less secure,
and less performant.
Illustration created using DALLE-3 by OpenAI

Winglang + Hexagonal Architecture is a Better Choice
Using the new cloud-oriented
programming language Wing
in combination with
Hexagonal Architecture has
proven to be a winning
combination striking the right
balance between cost,
performance, flexibility, and
security.
Illustration created using DALLE-3 by OpenAI

The Hexagonal Architecture Essentials
Insulate “Value” from “Stuff”

The “Blue Zone” Application

The bluezone.endor.w Folder Structure

The bluezone.endor.w Folder Structure
application
src
bluezone.endor.w
test
outside
usecase.X.test.w
steps BuyTicketTestSteps.w
CheckCarTestSteps.w
ForIssuingFines.w

Parser.w
ports
usecases
ForParkingCars.w

BlueZone
BuyTicket
CheckCar
Code
RetrieveRates
POST
GET
GET
MockDataStore
Cloud
Resources
1.Direct call
2.Local HTTP REST (Json)
3.Remote HTTP REST (Json)
4.Local HTTP REST (HTML)
5.Remote HTTP REST (HTML)
Configurations

Code Deep Dive
1.test/usecase.BuyTicket.test.w | buyTicket.feature
2.test/steps/BuyTicketTestSteps.w
3.test/steps/TestStepsBase.w
4.test/steps/Parser.w
5.src/application/ports/ForParkingCars.w
6.src/application/ports/Ticket.w
7.src/application/usecases/BuyTicket.w
8.src/application/usecases/Verifier.w
9.src/outside/backend/ForParkingCarsBackend.w
10.src/Configurator.w

The bluezone.endor.w Controller

Topics for Discussion and Further Research
1.“Stuff vs Value” Metrics
a.Total: 55
b.src/application: 16
c.src/: 41
d.Files: 43
e.Strict Value to Stuff Ratio: 16*100/55 = 29.09%
f.Extended Value to Stuff Ratio: (15+19)*100/42 = 74.55%
2.HTTP error status code vs. HTML screens
3.Copilots and Code Generation
4.Wing extensions from endor.w
Illustration created using DALLE-3 by OpenAI

Winglang + Hexagonal Architecture = Great Potential
Using the new cloud-oriented
programming language Wing
in combination with
Hexagonal Architecture has
proven to be a winning
combination striking the right
balance between cost,
performance, flexibility, and
security.
Illustration created using DALLE-3 by OpenAI