SlideShare a Scribd company logo
Advanced (Simple)
Web Application Architecture
Matthias Noback
@matthiasnoback
A little bit of controversy for you
What makes a framework "good"?
"I make a lot of money with it"
Faulty heuristic
A hard question:
"Is it good?"
Gets replaced by an easy question:
"Do people make money with it?"

Recommended for you

Reactive programming - Observable
Reactive programming - ObservableReactive programming - Observable
Reactive programming - Observable

Reactive programming in javascript. What is reactive programming, what is a stream, difference between array, object, promise and observable.

promiseevent streamstream
Reactive programming and RxJS
Reactive programming and RxJSReactive programming and RxJS
Reactive programming and RxJS

This document provides an introduction to reactive programming and RxJS. It begins by explaining the benefits of the reactive approach for asynchronous and event-driven code. It then contrasts reactive and functional programming, noting that reactive programming deals with asynchronous data streams. The document introduces RxJS and how it handles promises and observables. It defines observables and operators. Examples are provided to demonstrate reactive concepts. Resources for further learning are included at the end.

rxjsjavascriptreactive programming
Reactive programming
Reactive programmingReactive programming
Reactive programming

This document discusses reactive programming and introduces the Reactive Extensions (Rx) library. It provides an overview of Rx and how it addresses limitations of traditional .NET events by treating all data sources as observable sequences. Rx allows composing and transforming event streams in a declarative way using LINQ-like operators. The document demonstrates how to work with observable sequences and observers in Rx and contrasts it with other approaches like the Task Parallel Library.

reactive rx c#
Advanced web application architecture - Talk
"I learn design patterns from it"
"My framework uses semantic versioning"
"My framework is great for prototyping"

Recommended for you

Ajax
AjaxAjax
Ajax

The document discusses Ajax, which uses a combination of technologies like XHTML, CSS, JavaScript, and XMLHttpRequest to retrieve data asynchronously from web servers without reloading the entire webpage. It allows web applications to be more interactive and responsive by exchanging small amounts of data with the server behind the scenes. While not new, Ajax became popular when Google used it to great effect in Gmail, showing how it could enhance the usability of web applications and create richer internet experiences without the need for plugins like Flash.

Messaging
MessagingMessaging
Messaging

A talk on how to think about choosing a distributed messaging technology, and some notes on how to avoid locking yourself into a single choice, keeping your platform able to grow as needs change.

jobsmessagingdistributed messaging
Grokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way bindingGrokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way binding

Speaker: Nhan Nguyen - Software Architect @ FPT IS Bio: Author of HtmlJs Be fluent in C# and JavaScript. Software architect at FPT IS Description: Kiến trúc của HtmlJs Cách thiết kế web app với HtmlJs Demo (code 1 số app đơn giản + performance demo) Mô hình lập trình three-way binding (điểm mới so với buổi trước)

"I can go to conferences about my framework"
A framework is not something to identify with,
but something you use, and know how to use to
your advantage
Frameworks dictate the structure of your project
High-level structural
elements
● Models/entities
● Controllers
● Views/templates
● Migrations
● Configuration

Recommended for you

Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming

Functional reactive programming combines functional programming and reactive programming. Functional programming avoids mutable state and side effects through referential transparency and reusable functions. Reactive programming builds reactive systems through asynchronous data streams and treating everything as a stream. Observables are the core component, representing a stream of data over time, and operators allow querying, transforming, and combining observables. RxJS is a popular library for implementing functional reactive programming.

functional reactive
Services, dependencies, and you
Services, dependencies, and youServices, dependencies, and you
Services, dependencies, and you

This document outlines principles for writing maintainable code using a service-oriented architecture approach. It recommends defining reusable service objects that each focus on a single domain concept or business logic. These service objects should make their dependencies explicit through their constructor signatures. This makes the code more modular and testable. It also lays the foundation for potentially extracting services into microservices later. The document provides these recommendations and emphasizes that keeping code separated by concern and with well-defined dependencies leads to more maintainable code over time. It concludes by promising code examples demonstrating these principles.

Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)

This document provides an overview of Prometheus, an open source monitoring tool. It discusses key Prometheus concepts like push vs pull monitoring, blackbox vs whitebox monitoring, its architecture with a Prometheus server and alertmanager, service discovery, metric types, labels, the data model using time series, PromQL for querying metrics, and alerting rules. The document is intended to explain the fundamentals of Prometheus for monitoring applications and services.

infracodersmeetupprometheus
Thin controllers, fat models
● "Only briefly visit your
controller, go to your model
as fast as you can."
● In practice: we build services,
lots of them, and large ones
too.
Advanced web application architecture - Talk
The effects of a framework-
driven architecture
Implicit use cases
➢ It's not even clear what the
domain is about
➢ Impossible to reuse the use
case with a different delivery
mechanism
The effects of a framework-
driven architecture
Implicit connections to actors
Application
Primary actor:
User
Secondary actor:
Database

Recommended for you

Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux

The document discusses building modern web applications with React and Flux. It begins with introductions and an agenda. It then covers React components, lifecycle methods, and Flux architecture including actions, dispatcher and stores. It discusses common mistakes, other view libraries like Vue and Riot, and takes questions.

react flux javascript
Microservices - Please, don't
Microservices - Please, don'tMicroservices - Please, don't
Microservices - Please, don't

A talk about why not to build Microservices right off the bat, and some of the problems you have when jumping into them too early.

microservices dont
Ruby on rails intro
Ruby on rails introRuby on rails intro
Ruby on rails intro

Ruby on Rails is a web application framework built on Ruby. It was created by David Hansson in 2004 and follows conventions like MVC architecture and RESTful design. Rails makes it easier for developers to build database-backed web applications by providing default structures for common tasks and promoting practices like DRY (Don't Repeat Yourself) and agile development. The framework includes everything needed to build a full-stack web app with models, views, controllers, mailers and support for databases through ActiveRecord.

ruby on rails
The effects of a framework-
driven architecture
Coupling to the framework
➢ Framework-specific classes
and (magic) ways of doing
things are all over the code
base
Why bad?
Use cases are interrelated
(legacy spaghetti)
➢ Hard to change anything
➢ Hard to add something new
Why bad?
Domain logic is mixed with
infrastructure logic
➢ Hard to specify/test in isolation
➢ Hard to design the most useful
domain model
Why bad?
Code is tied to a specific
(version of a) framework
➢ Hard to upgrade the
framework
➢ Hard to switch frameworks

Recommended for you

Net developer days presentation
Net developer days   presentationNet developer days   presentation
Net developer days presentation

.NET Core 3.0 includes performance improvements, enhancements to SignalR, new endpoint routing for web apps, the introduction of Blazor and Razor Components, an in-box JSON reader, support for async streams, new C# 8.0 features, improvements to Entity Framework 3.0, support for HTTP/2, and the ability to publish self-contained executables. The presentation provides an overview of the key new features in .NET Core 3.0 across areas like performance, web development, client-side frameworks, languages, and tools.

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development

Test Driven Development (TDD) involves writing tests before code to drive the development process. It emphasizes: 1. Starting with writing an acceptance test for the thinnest slice of functionality, known as a "walking skeleton". 2. Writing unit tests by following the "write tests backwards" approach of specifying the test name, call to code, and expectations before writing code to pass the test. 3. Using mock objects to guide interface design by specifying the required services of an object rather than its provided features, promoting narrow, role-based interfaces between objects.

leantddtest driven development
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop

This document provides an overview of Gatling, an open-source load testing tool developed using Scala. It discusses Gatling's focus on web applications, simplicity, high performance, good reports, and easy integration with CI tools. It then covers setting up Gatling, including prerequisites, writing a sample test, and key concepts like scenarios, simulations, and reports.

What do we want?
● The ability to focus on domain
logic without thinking about
storage, web services, web
requests, etc.
● The ability to switch to a
different database, framework,
message queue, filesystem, etc.
We need to make a split between:
Infrastructure and Domain logic
The intention and the implementation of
communication
First: what is domain
logic/infrastructure
1. Saving an uploaded file to a cloud file storage
2. Instantiating an entity by calling its constructor
3. Storing an entity in the database
4. Calculating the total amount for an invoice
5. Making sure that an order has at least one line
6. Publishing a domain event to a message queue
Heuristic
● Try describing what the
system does without
mentioning any technology.
● Split the implementation
along these lines.

Recommended for you

Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments

This document outlines 10 commandments for writing efficient and well-structured Apex code in Salesforce. The commandments advise practices like limiting queries and DML operations in loops, having a single trigger per object, utilizing relationships and maps to reduce queries, writing unit tests with 100% code coverage that test all logic branches, limiting future calls and using asynchronous code where possible, and writing batch Apex that is efficiently optimized. The document provides examples and explanations for each commandment and invites questions from the reader.

salesforcesalesforce.comapex
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...

The document discusses refactoring legacy code for a social networking website for travelers. It describes business requirements where users must be logged in to see content and be friends to see others' trips. When refactoring production code, tests must be added first and refactoring should start from the deepest code branches and move outward. Tests should also be added from the shortest code branches outward. Tips are provided on writing clean, readable code and tests in small, safe increments with frequent commits while embracing changes.

bucharestsandro mancusoromania
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"

For 15 years in development, I managed to take part in the creation of a large number of various projects. I have already made a number of talks on the working architecture of Web applications, but this is only part of the efficient development puzzle. We will consider the whole process from the start of the project to its launch in production. I’ll tell you how we approach the ideas of the “12 Factor App”, how we use the docker, discuss environment deployment issues, security issues, testing issues, discuss the nuances of SDLC and much more.

fwdaysnodejsapplication
Example: Fixer
We convert the invoice line and total
amounts of the invoice currency by
sending a GET request to Fixer's
/api/latest API endpoint, providing
the invoice currency as the base currency
and EUR as the target currency.
Advanced web application architecture - Talk
Applying the heuristic
"We need to convert the invoice
line and total amounts of the
invoice currency. In order to do
this, we need to find out the
current exchange rate between
the invoice currency and our
standard currency (EUR)."
ExchangeRateProvider
Applying the heuristic
"We do this by sending a GET
request to Fixer's /api/latest API
endpoint, providing the invoice
currency as the base currency and
EUR as the target currency. The
result will be a JSON string which we
decode. We'll return a Rate value
object based on the data we receive."
FixerExchangeRateProvider implements
ExchangeRateProvider

Recommended for you

Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2

Struts is an open-source MVC framework that makes it easier to develop Java web applications by providing common functionality out of the box. While the Model 2 pattern provides a basic structure, frameworks like Struts standardize development and provide features like validation, tag libraries, and simplified configuration. For large applications, frameworks save development time compared to manually implementing common functionality in each application. Struts uses the Model 2 pattern with interceptors, actions, and results to simplify request processing and forwarding.

The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский

The document discusses the working architecture of NodeJs applications. It begins by introducing the speaker Viktor Turskyi and his experience. It then discusses why architecture is important and shares their battle-tested approach. The presentation addresses whether to use monolith or microservices architectures, and recommends starting with a monolith in most cases. It also discusses domain models, services, and controllers. The presentation provides an example of a service class and user registration process to demonstrate the architecture in practice.

The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...

We launched more than 60 projects, developed a web application architecture that is suitable for projects of completely different sizes. In the talk, I'll analyze this architecture, will consider the question what to choose “monolith or microservices”, will show the main architectural mistakes that developers make.

nodejsjavascriptarchitecture
Domain logic versus Infrastructure
Domain logic versus
Infrastructure
● Entities
● Value objects
● Repository
interfaces
● Domain
services
● SQL query
● HTTP headers
● File
permissions
● MIME types
● JSON/XML
encoding
Split the code in two parts
● One part which shows what
you're trying to accomplish.
● Another part which fills in the
low-level details.
What about...
A web controller action?
1. In the controller, only take out the
necessary data from the Request.
2. Call a service that knows nothing about
the web.

Recommended for you

Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture

The document discusses various software architecture patterns and principles, comparing monolithic and microservices architectures. It covers topics like layers, domain-driven design, code-first versus database-first approaches, and considerations for data management in multi-tenant systems. The key aspects of architectures like microservices and domain-driven design are explained at a high level.

ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM

A quick presentation about ReactJS and its benefits - with some discussion of the Flux pattern/architecture at the end. Follow me: https://twitter.com/marcacyr https://github.com/marcacyr

web developmentreactjsprogramming
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014

This document provides an overview and summary of OpenShift v3 and containers. It discusses how OpenShift v3 uses Docker containers and Kubernetes for orchestration instead of the previous "Gears" system. It also summarizes the key architectural changes in OpenShift v3, including using immutable Docker images, separating development and operations, and abstracting operational complexity.

paasdockeropenshift
What about...
Saving an entity to the database?
1. Recognize the need for persistence,
and define an interface for it (e.g. a
repository interface).
2. Provide an implementation that knows
how to talk to your particular database.
Application service
Repository interface
Web controller
calls
uses
Repository implementation
implements
So far
● We've separated domain logic
from infrastructure
● We can replace the
infrastructure "layer"; domain
logic is independent of it
● We can test a complete use
case scenarios without invoking
infrastructure code
Application service
Repository interface
Test driver
calls
uses
Repository stub
implements

Recommended for you

Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases

This document provides an overview of DevOps concepts and practices for delivering changes for applications and databases. It discusses topics like continuous integration, continuous delivery, infrastructure as code, database automation, and managing changes. The document is presented as a training material divided into multiple chapters that cover application development, infrastructure, databases, managing changes, and establishing a DevOps engineering practice. It emphasizes the importance of collaboration and communication between development and operations teams to enable continuous software delivery.

Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1

First Session on Learning to Code for Startup MVP's using Ruby on Rails. This session covers the web architecture, Git/GitHub and makes a real rails app that is deployed to Heroku at the end. Thanks, Henry

startupbeginnercode
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5

This document summarizes new features in .NET Framework 4.5, including improvements to WeakReferences, streams, ReadOnlyDictionary, compression, and large objects. It describes enhancements to server GC, asynchronous programming, the Task Parallel Library, ASP.NET, Entity Framework, WCF, WPF, and more. The .NET 4.5 update focuses on performance improvements, support for asynchronous code and parallel operations, and enabling modern app development patterns.

wpfmicrosoftwindows
Application service
Repository interface
calls
uses
implements
W
ebcontroller
Testdriver
MySQL
Stub
calls
implements
Hexagonal architecture, or:
Ports & adapters
Port: an intention of a dialog
Adapter: supporting implementation for
the dialog
Hexagon: the application without its
adapters
Hexagonal architecture, or:
Ports & adapters
Port: "For saving entities" (represented by
a repository interface with a save()
method)
Adapter: "Save entities by sending SQL
insert/update statements to a MySQL
database" (implemented in a repository
class).
Application service
Repository interface
calls
uses
implements
W
ebcontroller
Testdriver
MySQL
Stub
calls
implements

Recommended for you

O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material

This document provides information about a Global Office 365 Bootcamp 2018 event being held in Iselin, New Jersey. It introduces the organizers Tom Daly, Paul Galvin, and Adnan Rafique. It then provides an overview of topics that will be covered, including setting up an Office 365 tenant and development environment, an introduction to SharePoint client-side web parts and extensions, building "Hello World" examples, connecting to SharePoint APIs, an introduction to React, and other important React concepts like components, props, state, and lifecycle methods. Links are provided to Microsoft documentation for many of the code examples and tutorials that will be shown.

spfxoffice 365 developerdeveloper
Dust.js
Dust.jsDust.js
Dust.js

The document discusses LinkedIn's adoption of the Dust templating language in 2011. Some key points: - LinkedIn needed a unified view layer as different teams were using different templating technologies like JSP, GSP, ERB. - They evaluated 26 templating options and selected Dust as it best met their criteria like performance, i18n support, and being logic-less. - Dust templates are compiled to JavaScript for client-side rendering and to Java for server-side rendering (SSR) through Google's V8 engine, allowing templates to work on both client and server. - SSR addresses challenges like SEO, supporting clients without JavaScript, and i18n by rendering

web developmenttemplatesjavascript
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020

How to develop NodeJS apps effectively? I will tell you all details and share his personal experience on the whole process: from the very start and up to the production stage. You will also learn more about Docker, SDLC and 12 Factor App. Save the date!

nodejsjavascript12factor app
Userinterface
Persistence
Notifications
Batchimport
News feed
Blob storage
Advanced web application architecture - Talk
Stub
MySQL
NoSQL
W
ebcontroller
CLIcommand

Recommended for you

L06 Using Design Patterns
L06 Using Design PatternsL06 Using Design Patterns
L06 Using Design Patterns

Hönnunarmunstur eru aðferðir við að leysa algeng vandamál. En notkun þeirra felst í að takast á við verkefni sem þarf að leysa. Fyrst koma verkefnin og svo finnum við hvaða munstur hentar miðað við þær forsendur sem við höfum. Oft þegar verið er að vinna að lausnum þá er alls ekki hægt að gera allan hugbúnaðinn í einu, heldur þarf að "hakka" suma hluti meðan unnið er í öðru. Til þess að lenda ekki í technical dept þarf að vera með stöðugt refactoring. Í þessum fyrirlestri skoðum við vandamál og rifjum upp grunnmunstrin (base patterns) sem við kynntumst í L05 Design Patterns. Þá skoðum við hvernig við leysum tengingu við póstþjón.

hönnun og smíði hugbúnaðarháskólinn í reykjavík
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"

This document discusses module architecture for React-Redux applications. It recommends splitting an application into semantically named modules to improve development speed, scalability, and reduced maintenance costs. The modularity level depends on the application scale, with everything identifiable as a separate component separated. Minimal connectivity between modules ensures the architecture remains scalable and readable. Business logic and data models should be extracted and organized by domain. Selectors wire components to the state model in a clear way. Actions are standardized between modules. A modular architecture has pros like scalability and reduced costs, and a potential con of increased number of files/folders.

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...

Servlet Technology is used to create web applications. Servlet technology uses Java language to create web applications. As Servlet Technology uses Java, web applications made using Servlet are Secured, Scalable and Robust. Web applications are helper applications that resides at web server and build dynamic web pages. A dynamic page could be anything like a page that randomly chooses picture to display or even a page that displays the current time.

javajava programmingj2ee
What does this bring us?
Domain logic is decoupled from
infrastructure, meaning that:
What does this bring us?
The domain logic can survive
the replacement of port adapters
What does this bring us?
We can create new adapters
for existing ports and swap them
What does this bring us?
We can switch frameworks

Recommended for you

Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend

The description of elements for an iOS backend, in the context of an application talking to a REST backend

applicationarchitectureios
Sharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratchSharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratch

The document summarizes a system design workshop for designing a note-taking application called TechyNotes. The workshop covers defining system requirements and interfaces, discussing database and storage options, designing initial and revised system architectures, and addressing scalability bottlenecks. Attendees learn a repeatable process for system design and discuss technologies like databases, load balancing, caching, and queues.

system designworkshoptechnology
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloud

Mail is received as a commodity from the cloud, also Collaboration. However, in many client meetings we often hear the question, where are we heading with the hundreds of Notes applications? Which strategy is most effective and cost efficient at the same time? Is cloud a practical answer? With sound and proven methodology Notes applications can be transformed into valuable web applications in the cloud. It turns out that today the time has come for cloud platforms. A side view of large customer projects, already transforming their Notes applications to the cloud - for example to IBM SoftLayer - is helpful. This Track helps you understand that strategies that are implemented and lets you understand the costs and risks involved.

domino apps cloud
But, I'll never switch
frameworks...
You will
But, I'll never switch
frameworks...
Even a minor framework (or library)
upgrade can sometimes feel like a
complete switch
But, I'll never switch
frameworks...
Your favorite framework today will stop
being maintained some day (just like the
earth itself)
But, I'll never switch
frameworks...
What's modern and cool now, won't be in
just two years

Recommended for you

Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2

Struts 2.0 is an open source MVC framework that makes building web applications with Java easier. It uses the Model 2 architecture pattern with actions as controllers, models to handle business logic, and JSPs as views. Struts handles common tasks like request processing, validation, and forwarding so developers can focus on business logic. While simple applications can use just servlets and JSPs, larger ones benefit from Struts' standardized structure, tags, and features which reduce complexity and improve maintenance.

Rector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetupRector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetup

This document summarizes a fireside chat about the Rector tool for refactoring PHP code. It introduces Rector as a PHP command line tool that can understand code, improve entire codebases at once, and be fine-tuned or extended for specific needs. Rector can help with continuous improvement, code coaching, and the future of refactoring PHP applications without creating technical debt from migrations. The chat then transitions to a demo by Tomas and discusses a book about how to use and extend Rector.

DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...

Of course, you should read all you can about SOLID, Design patterns, Patterns of Enterprise Application Architecture, etc. Once you have a basic understanding of these topics you still have to write that code though, and write it well too! What is good code? Are there some guidelines, or rules of thumb, which you can follow while making your everyday coding decisions? In this talk I’ll cover many of these coding guidelines, which aren’t usually covered by patterns or principles books. They should help you write better code and give you a richer vocabulary for reviewing other people’s code. Some of the subjects that we’ll discuss are: state, mutability, CQS, one-method objects, domain-first, API-driven, functional programming influences, object boundaries, (de)serialization, and many more!

object-oriented programmingobject designcqs
What does this bring us?
We can test every part in isolation
(domain logic, adapters)
But, I don't write tests...
You have to
Why do developers not
write tests?
Because it involves a learning process on
top of the process of learning to write
code.
Why do developers not
write tests?
Because it seems to be possible to skip
the extra effort needed to write tests and
do something easier: write production
code.

Recommended for you

Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)

Of course, you should read all you can about SOLID, Design patterns, Patterns of Enterprise Application Architecture, etc. Once you have a basic understanding of these topics you still have to write that code though, and write it well too! What is good code? Are there some guidelines, or rules of thumb, which you can follow while making your everyday coding decisions? In this talk Matthias will cover many of these coding guidelines, which aren’t usually covered by patterns or principles books. They should help you write better code and give you a richer vocabulary for reviewing other people’s code. Some of the subjects that we’ll discuss are: state, mutability, CQS, one-method objects, domain-first, API-driven, functional programming influences, object boundaries, (de)serialization, and more!

oopobject designcqs
Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...

Working effectively with legacy code isn’t all about creating test harnesses before refactoring algorithms. The “safety first” strategy doesn’t always apply. Not if the code you’re looking at is LYING IN YOUR FACE anyway. In this talk I’ll show you what brutal refactoring is. I’ll show you the red glowy eyes of the Churn. And I’ll hold up some big warning signs that should prevent you from producing legacy code today. Table flips allowed.

legacy coderefactoringtesting
Beyond Design Principles and Patterns
Beyond Design Principles and PatternsBeyond Design Principles and Patterns
Beyond Design Principles and Patterns

The document discusses object-oriented design principles and patterns. It covers design patterns like abstract factory, mediator, proxy, builder, and others. It also discusses design principles like SOLID principles, package design principles, and tactical domain-driven design patterns. It emphasizes that while knowing patterns and principles is important, the key is applying them correctly. It provides guidance on writing good object-oriented code by focusing on object cohesion, encapsulation, defensive programming, and using composition over inheritance.

object-oriented programmingobject design
Why do developers not
write tests?
The feedback loop is very big: you'll only
learn later that having a test suite is
absolutely required to keep the software
in a presentable state in the long run.
So please write your tests
Start learning today;
Reduce the extra effort it takes
And finally: enjoy the increase
in development speed
"What if my project is short-lived?"
The advice doesn't apply
(But don't decide to quickly)

Recommended for you

Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018

This document discusses advanced application architecture, specifically layers, ports, and adapters. It introduces layered architecture as a way to define coupling and cohesion in a codebase. The layers separate domains into infrastructure, application, and domain layers with dependencies only allowed in one direction from higher to lower layers. Ports define interfaces that layers can depend on while adapters implement ports, allowing for decoupling and replacement of components. The document also discusses testing at the unit, integration, acceptance, and system levels to verify the architecture.

layersports & adapters
Designing for Autonomy
Designing for AutonomyDesigning for Autonomy
Designing for Autonomy

The much hyped "Microservice Architecture" tells us to design our services to be autonomous. Let's find out what this means and how we can achieve it. In this talk I will guide you through the fascinating world of asynchronous communication, event-driven systems and distributed data.

autonomyservicesmicroservice architecture
Docker workshop
Docker workshopDocker workshop
Docker workshop

Docker allows for isolation of applications into lightweight containers that can be linked together and share resources. Containers are run from images that act as templates containing the files, configuration, and dependencies for an application. Images are built from Dockerfiles that define the build process and layers, and can be pulled from or pushed to a registry for distribution. Docker uses a client-server model with daemons managing containers on each host.

What's a good framework?
A framework that doesn't get in the way
A good framework allows me to split:
Infrastructure and Domain logic
The intention and the implementation of
communication
Questions?
Matthias Noback
Training & Consultancy
matthiasnoback.nl

More Related Content

What's hot

ITI006En-AJAX
ITI006En-AJAXITI006En-AJAX
ITI006En-AJAX
Huibert Aalbers
 
Microservices with spring boot
Microservices  with spring bootMicroservices  with spring boot
Microservices with spring boot
Mesut Can Gurle
 
Interop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeInterop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough Code
Jeremy Schulman
 
Reactive programming - Observable
Reactive programming - ObservableReactive programming - Observable
Reactive programming - Observable
Dragos Ionita
 
Reactive programming and RxJS
Reactive programming and RxJSReactive programming and RxJS
Reactive programming and RxJS
Ravi Mone
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
Nick Hodge
 
Ajax
AjaxAjax
Messaging
MessagingMessaging
Messaging
Sean Kelly
 
Grokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way bindingGrokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way binding
Grokking VN
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
Ahmed Kamel Taha
 
Services, dependencies, and you
Services, dependencies, and youServices, dependencies, and you
Services, dependencies, and you
Sean Kelly
 
Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)
Oliver Moser
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
Keuller Magalhães
 
Microservices - Please, don't
Microservices - Please, don'tMicroservices - Please, don't
Microservices - Please, don't
Sean Kelly
 
Ruby on rails intro
Ruby on rails introRuby on rails intro
Ruby on rails intro
Ming-hsuan Chang
 
Net developer days presentation
Net developer days   presentationNet developer days   presentation
Net developer days presentation
Alexandre Malavasi
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Maris Prabhakaran M
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
NetStronghold
 
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Mozaic Works
 

What's hot (20)

ITI006En-AJAX
ITI006En-AJAXITI006En-AJAX
ITI006En-AJAX
 
Microservices with spring boot
Microservices  with spring bootMicroservices  with spring boot
Microservices with spring boot
 
Interop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeInterop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough Code
 
Reactive programming - Observable
Reactive programming - ObservableReactive programming - Observable
Reactive programming - Observable
 
Reactive programming and RxJS
Reactive programming and RxJSReactive programming and RxJS
Reactive programming and RxJS
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Ajax
AjaxAjax
Ajax
 
Messaging
MessagingMessaging
Messaging
 
Grokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way bindingGrokking TechTalk #16: Html js and three way binding
Grokking TechTalk #16: Html js and three way binding
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
 
Services, dependencies, and you
Services, dependencies, and youServices, dependencies, and you
Services, dependencies, and you
 
Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
 
Microservices - Please, don't
Microservices - Please, don'tMicroservices - Please, don't
Microservices - Please, don't
 
Ruby on rails intro
Ruby on rails introRuby on rails intro
Ruby on rails intro
 
Net developer days presentation
Net developer days   presentationNet developer days   presentation
Net developer days presentation
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
 
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconferenc...
 

Similar to Advanced web application architecture - Talk

Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
Fwdays
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
divzi1913
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
Sigma Software
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
ABDEL RAHMAN KARIM
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
Marc Cyr
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
Hojoong Kim
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases
Eduardo Piairo
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
Malam Team
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
Thomas Daly
 
Dust.js
Dust.jsDust.js
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
OdessaJS Conf
 
L06 Using Design Patterns
L06 Using Design PatternsL06 Using Design Patterns
L06 Using Design Patterns
Ólafur Andri Ragnarsson
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
LogeekNightUkraine
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
Laurent Cerveau
 
Sharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratchSharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratch
Adelina Simion
 
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloud
Roman Weber
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
Long Nguyen
 

Similar to Advanced web application architecture - Talk (20)

Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Dust.js
Dust.jsDust.js
Dust.js
 
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
 
L06 Using Design Patterns
L06 Using Design PatternsL06 Using Design Patterns
L06 Using Design Patterns
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
 
Sharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratchSharing our best secrets: Design a distributed system from scratch
Sharing our best secrets: Design a distributed system from scratch
 
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloud
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 

More from Matthias Noback

Rector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetupRector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetup
Matthias Noback
 
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
Matthias Noback
 
Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)
Matthias Noback
 
Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Matthias Noback
 
Beyond Design Principles and Patterns
Beyond Design Principles and PatternsBeyond Design Principles and Patterns
Beyond Design Principles and Patterns
Matthias Noback
 
Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018
Matthias Noback
 
Designing for Autonomy
Designing for AutonomyDesigning for Autonomy
Designing for Autonomy
Matthias Noback
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
Matthias Noback
 
Docker swarm workshop
Docker swarm workshopDocker swarm workshop
Docker swarm workshop
Matthias Noback
 
Docker compose workshop
Docker compose workshopDocker compose workshop
Docker compose workshop
Matthias Noback
 
Building autonomous services
Building autonomous servicesBuilding autonomous services
Building autonomous services
Matthias Noback
 
Designing for autonomy
Designing for autonomyDesigning for autonomy
Designing for autonomy
Matthias Noback
 
Advanced application architecture
Advanced application architectureAdvanced application architecture
Advanced application architecture
Matthias Noback
 
Continously delivering containerized microservices
Continously delivering containerized microservicesContinously delivering containerized microservices
Continously delivering containerized microservices
Matthias Noback
 
Apprendre le français
Apprendre le françaisApprendre le français
Apprendre le français
Matthias Noback
 
Living Documentation (presentation)
Living Documentation (presentation)Living Documentation (presentation)
Living Documentation (presentation)
Matthias Noback
 
TDD - A Reminder of the Principles
TDD - A Reminder of the PrinciplesTDD - A Reminder of the Principles
TDD - A Reminder of the Principles
Matthias Noback
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
Matthias Noback
 
CQRS & Event Sourcing
CQRS & Event SourcingCQRS & Event Sourcing
CQRS & Event Sourcing
Matthias Noback
 
Advanced Application Architecture (workshop slides)
Advanced Application Architecture (workshop slides)Advanced Application Architecture (workshop slides)
Advanced Application Architecture (workshop slides)
Matthias Noback
 

More from Matthias Noback (20)

Rector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetupRector fireside chat - PHPMiNDS meetup
Rector fireside chat - PHPMiNDS meetup
 
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
DPC 2019, Amsterdam: Beyond design patterns and principles - writing good OO ...
 
Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)Beyond design principles and patterns (muCon 2019 edition)
Beyond design principles and patterns (muCon 2019 edition)
 
Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...Brutal refactoring, lying code, the Churn, and other emotional stories from L...
Brutal refactoring, lying code, the Churn, and other emotional stories from L...
 
Beyond Design Principles and Patterns
Beyond Design Principles and PatternsBeyond Design Principles and Patterns
Beyond Design Principles and Patterns
 
Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018Advanced Application Architecture Symfony Live Berlin 2018
Advanced Application Architecture Symfony Live Berlin 2018
 
Designing for Autonomy
Designing for AutonomyDesigning for Autonomy
Designing for Autonomy
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Docker swarm workshop
Docker swarm workshopDocker swarm workshop
Docker swarm workshop
 
Docker compose workshop
Docker compose workshopDocker compose workshop
Docker compose workshop
 
Building autonomous services
Building autonomous servicesBuilding autonomous services
Building autonomous services
 
Designing for autonomy
Designing for autonomyDesigning for autonomy
Designing for autonomy
 
Advanced application architecture
Advanced application architectureAdvanced application architecture
Advanced application architecture
 
Continously delivering containerized microservices
Continously delivering containerized microservicesContinously delivering containerized microservices
Continously delivering containerized microservices
 
Apprendre le français
Apprendre le françaisApprendre le français
Apprendre le français
 
Living Documentation (presentation)
Living Documentation (presentation)Living Documentation (presentation)
Living Documentation (presentation)
 
TDD - A Reminder of the Principles
TDD - A Reminder of the PrinciplesTDD - A Reminder of the Principles
TDD - A Reminder of the Principles
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
CQRS & Event Sourcing
CQRS & Event SourcingCQRS & Event Sourcing
CQRS & Event Sourcing
 
Advanced Application Architecture (workshop slides)
Advanced Application Architecture (workshop slides)Advanced Application Architecture (workshop slides)
Advanced Application Architecture (workshop slides)
 

Recently uploaded

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
Ortus Solutions, Corp
 
active-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptxactive-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptx
sudsdeep
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
908dutch
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud ConnectorsBreak data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
ssuser2b426d1
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
bhatinidhi2001
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
DNUG e.V.
 
Splunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptxSplunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptx
sudsdeep
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
onemonitarsoftware
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Softwares
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
e-Definers Technology
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
Philip Schwarz
 
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdfdachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
DNUG e.V.
 
Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
MaisnamLuwangPibarel
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
akshesh doshi
 
Overview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptxOverview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptx
Mitchell Marsh
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 

Recently uploaded (20)

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
 
active-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptxactive-directory-auditing-solution (2).pptx
active-directory-auditing-solution (2).pptx
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud ConnectorsBreak data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud Connectors
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.CViewSurvey Digitech Pvt Ltd that  works on a proven C.A.A.G. model.
CViewSurvey Digitech Pvt Ltd that works on a proven C.A.A.G. model.
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
 
Splunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptxSplunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptx
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
 
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdfdachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
 
Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
 
Overview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptxOverview of ERP - Mechlin Technologies.pptx
Overview of ERP - Mechlin Technologies.pptx
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 

Advanced web application architecture - Talk

  • 1. Advanced (Simple) Web Application Architecture Matthias Noback @matthiasnoback
  • 2. A little bit of controversy for you What makes a framework "good"?
  • 3. "I make a lot of money with it"
  • 4. Faulty heuristic A hard question: "Is it good?" Gets replaced by an easy question: "Do people make money with it?"
  • 6. "I learn design patterns from it"
  • 7. "My framework uses semantic versioning"
  • 8. "My framework is great for prototyping"
  • 9. "I can go to conferences about my framework"
  • 10. A framework is not something to identify with, but something you use, and know how to use to your advantage
  • 11. Frameworks dictate the structure of your project
  • 12. High-level structural elements ● Models/entities ● Controllers ● Views/templates ● Migrations ● Configuration
  • 13. Thin controllers, fat models ● "Only briefly visit your controller, go to your model as fast as you can." ● In practice: we build services, lots of them, and large ones too.
  • 15. The effects of a framework- driven architecture Implicit use cases ➢ It's not even clear what the domain is about ➢ Impossible to reuse the use case with a different delivery mechanism
  • 16. The effects of a framework- driven architecture Implicit connections to actors Application Primary actor: User Secondary actor: Database
  • 17. The effects of a framework- driven architecture Coupling to the framework ➢ Framework-specific classes and (magic) ways of doing things are all over the code base
  • 18. Why bad? Use cases are interrelated (legacy spaghetti) ➢ Hard to change anything ➢ Hard to add something new
  • 19. Why bad? Domain logic is mixed with infrastructure logic ➢ Hard to specify/test in isolation ➢ Hard to design the most useful domain model
  • 20. Why bad? Code is tied to a specific (version of a) framework ➢ Hard to upgrade the framework ➢ Hard to switch frameworks
  • 21. What do we want? ● The ability to focus on domain logic without thinking about storage, web services, web requests, etc. ● The ability to switch to a different database, framework, message queue, filesystem, etc.
  • 22. We need to make a split between: Infrastructure and Domain logic The intention and the implementation of communication
  • 23. First: what is domain logic/infrastructure 1. Saving an uploaded file to a cloud file storage 2. Instantiating an entity by calling its constructor 3. Storing an entity in the database 4. Calculating the total amount for an invoice 5. Making sure that an order has at least one line 6. Publishing a domain event to a message queue
  • 24. Heuristic ● Try describing what the system does without mentioning any technology. ● Split the implementation along these lines.
  • 25. Example: Fixer We convert the invoice line and total amounts of the invoice currency by sending a GET request to Fixer's /api/latest API endpoint, providing the invoice currency as the base currency and EUR as the target currency.
  • 27. Applying the heuristic "We need to convert the invoice line and total amounts of the invoice currency. In order to do this, we need to find out the current exchange rate between the invoice currency and our standard currency (EUR)." ExchangeRateProvider
  • 28. Applying the heuristic "We do this by sending a GET request to Fixer's /api/latest API endpoint, providing the invoice currency as the base currency and EUR as the target currency. The result will be a JSON string which we decode. We'll return a Rate value object based on the data we receive." FixerExchangeRateProvider implements ExchangeRateProvider
  • 29. Domain logic versus Infrastructure
  • 30. Domain logic versus Infrastructure ● Entities ● Value objects ● Repository interfaces ● Domain services ● SQL query ● HTTP headers ● File permissions ● MIME types ● JSON/XML encoding
  • 31. Split the code in two parts ● One part which shows what you're trying to accomplish. ● Another part which fills in the low-level details.
  • 32. What about... A web controller action? 1. In the controller, only take out the necessary data from the Request. 2. Call a service that knows nothing about the web.
  • 33. What about... Saving an entity to the database? 1. Recognize the need for persistence, and define an interface for it (e.g. a repository interface). 2. Provide an implementation that knows how to talk to your particular database.
  • 34. Application service Repository interface Web controller calls uses Repository implementation implements
  • 35. So far ● We've separated domain logic from infrastructure ● We can replace the infrastructure "layer"; domain logic is independent of it ● We can test a complete use case scenarios without invoking infrastructure code
  • 36. Application service Repository interface Test driver calls uses Repository stub implements
  • 38. Hexagonal architecture, or: Ports & adapters Port: an intention of a dialog Adapter: supporting implementation for the dialog Hexagon: the application without its adapters
  • 39. Hexagonal architecture, or: Ports & adapters Port: "For saving entities" (represented by a repository interface with a save() method) Adapter: "Save entities by sending SQL insert/update statements to a MySQL database" (implemented in a repository class).
  • 45. What does this bring us? Domain logic is decoupled from infrastructure, meaning that:
  • 46. What does this bring us? The domain logic can survive the replacement of port adapters
  • 47. What does this bring us? We can create new adapters for existing ports and swap them
  • 48. What does this bring us? We can switch frameworks
  • 49. But, I'll never switch frameworks... You will
  • 50. But, I'll never switch frameworks... Even a minor framework (or library) upgrade can sometimes feel like a complete switch
  • 51. But, I'll never switch frameworks... Your favorite framework today will stop being maintained some day (just like the earth itself)
  • 52. But, I'll never switch frameworks... What's modern and cool now, won't be in just two years
  • 53. What does this bring us? We can test every part in isolation (domain logic, adapters)
  • 54. But, I don't write tests... You have to
  • 55. Why do developers not write tests? Because it involves a learning process on top of the process of learning to write code.
  • 56. Why do developers not write tests? Because it seems to be possible to skip the extra effort needed to write tests and do something easier: write production code.
  • 57. Why do developers not write tests? The feedback loop is very big: you'll only learn later that having a test suite is absolutely required to keep the software in a presentable state in the long run.
  • 58. So please write your tests Start learning today; Reduce the extra effort it takes And finally: enjoy the increase in development speed
  • 59. "What if my project is short-lived?"
  • 60. The advice doesn't apply (But don't decide to quickly)
  • 61. What's a good framework? A framework that doesn't get in the way
  • 62. A good framework allows me to split: Infrastructure and Domain logic The intention and the implementation of communication
  • 63. Questions? Matthias Noback Training & Consultancy matthiasnoback.nl