The document discusses different software architectural patterns for managing complexity in web applications. It begins by explaining model-view-controller (MVC) and some of its limitations. It then introduces Action Domain Responder (ADR) as a refinement of MVC that maps more closely to the lifecycle of a web request. Next, it covers hexagonal architecture, also known as ports and adapters, which isolates an application from its inputs and outputs. Finally, it provides an overview of domain-driven design (DDD), including architectural patterns like bounded contexts and object patterns like entities, value objects, domain services, aggregates, and repositories.
The quest for global design principles - PHP Benelux 2016Matthias Noback
If you’re a programmer you make design decisions every second. Statements, functions, classes, packages, applications, even entire systems: you need to think, and often think hard, about everything. Luckily there are many useful design principles, patterns and best practices that you can apply. But some of them merely expose code smells. Others only help you design your classes. And some are applicable to packages only. Wouldn’t it be nice to have some more general, always useful, invariably applicable, foundational design principles?
In this talk we’ll look at software from many different perspectives, and while we’re zooming in and out, we’ll discover some of the deeper principles that lie beneath proper object-oriented design. They are the foundation of many of the well-known design patterns and they may even serve as an explanation for code smells.
The document discusses internationalization (i18n) in Ruby on Rails applications. It covers the current state of Rails i18n including key-value lookup, ActiveRecord support, interpolation, pluralization, localized formats and views. It also discusses difficulties with the current approach and plugins that can help like Globalize2. The document then discusses building custom i18n backends and improving Rails' inflection rules to support multiple languages.
Pursuing practices of Domain-Driven Design in PHPGiorgio Sironi
This document discusses pursuing practices of Domain-Driven Design in PHP. It introduces Domain-Driven Design concepts like the domain model, entities, value objects, aggregates, repositories, factories and services. It provides examples of how these concepts can be implemented in PHP, including using annotations and relationships with the Doctrine ORM framework. The document emphasizes building the domain model independently of frameworks and focusing on closely modeling the problem domain.
StepTalk is a framework that aims to create a common environment for applications by presenting them as cooperating objects, hiding the underlying programs. It uses a Smalltalk-like approach to allow applications to communicate through a scripting language and framework interfaces, providing a consistent user experience across different applications. The framework handles mapping scripts to Objective-C messages to integrate applications while maintaining an illusion that users are interacting directly with objects.
- Pebble was founded in 2011 and launched its first smartwatch in 2013 through a record breaking Kickstarter campaign. It has since launched additional models.
- There are two types of Pebble apps: PebbleFace apps developed using C SDK and PebbleApp apps developed using JavaScript. CloudPebble is an online IDE for developing PebbleFace apps without installing any software.
- Pebble apps utilize services like Bluetooth, battery, and time to respond to device events and update their UI. Common elements include windows, layers, and text layers. Buttons can be configured to handle click events.
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
Presentación sobre arquitectura hexagonal sobre Android y Symfony presentada en la jornada de #OpenBiko por 540. Se analiza la arquitectura y se describe de que manera nos está ayudando en el desarrollo de nuestros proyectos.
This document discusses server-side scripting and provides examples using PHP. It introduces server-side scripting languages like PHP, ASP, and JSP that generate dynamic web pages using scripts interpreted by applications on the web server. It also describes basic PHP syntax including variables, conditional statements, loops and communicating with databases to store and retrieve information.
The quest for global design principles - PHP Benelux 2016Matthias Noback
If you’re a programmer you make design decisions every second. Statements, functions, classes, packages, applications, even entire systems: you need to think, and often think hard, about everything. Luckily there are many useful design principles, patterns and best practices that you can apply. But some of them merely expose code smells. Others only help you design your classes. And some are applicable to packages only. Wouldn’t it be nice to have some more general, always useful, invariably applicable, foundational design principles?
In this talk we’ll look at software from many different perspectives, and while we’re zooming in and out, we’ll discover some of the deeper principles that lie beneath proper object-oriented design. They are the foundation of many of the well-known design patterns and they may even serve as an explanation for code smells.
The document discusses internationalization (i18n) in Ruby on Rails applications. It covers the current state of Rails i18n including key-value lookup, ActiveRecord support, interpolation, pluralization, localized formats and views. It also discusses difficulties with the current approach and plugins that can help like Globalize2. The document then discusses building custom i18n backends and improving Rails' inflection rules to support multiple languages.
Pursuing practices of Domain-Driven Design in PHPGiorgio Sironi
This document discusses pursuing practices of Domain-Driven Design in PHP. It introduces Domain-Driven Design concepts like the domain model, entities, value objects, aggregates, repositories, factories and services. It provides examples of how these concepts can be implemented in PHP, including using annotations and relationships with the Doctrine ORM framework. The document emphasizes building the domain model independently of frameworks and focusing on closely modeling the problem domain.
StepTalk is a framework that aims to create a common environment for applications by presenting them as cooperating objects, hiding the underlying programs. It uses a Smalltalk-like approach to allow applications to communicate through a scripting language and framework interfaces, providing a consistent user experience across different applications. The framework handles mapping scripts to Objective-C messages to integrate applications while maintaining an illusion that users are interacting directly with objects.
- Pebble was founded in 2011 and launched its first smartwatch in 2013 through a record breaking Kickstarter campaign. It has since launched additional models.
- There are two types of Pebble apps: PebbleFace apps developed using C SDK and PebbleApp apps developed using JavaScript. CloudPebble is an online IDE for developing PebbleFace apps without installing any software.
- Pebble apps utilize services like Bluetooth, battery, and time to respond to device events and update their UI. Common elements include windows, layers, and text layers. Buttons can be configured to handle click events.
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
Presentación sobre arquitectura hexagonal sobre Android y Symfony presentada en la jornada de #OpenBiko por 540. Se analiza la arquitectura y se describe de que manera nos está ayudando en el desarrollo de nuestros proyectos.
This document discusses server-side scripting and provides examples using PHP. It introduces server-side scripting languages like PHP, ASP, and JSP that generate dynamic web pages using scripts interpreted by applications on the web server. It also describes basic PHP syntax including variables, conditional statements, loops and communicating with databases to store and retrieve information.
Given at TrueNorthPHP 2014:
"MVC presents a great way to divide responsibilities in your application but it offers no help in building the most critical part: the model or domain. This talk will introduce ways that can help you to encapsulate the richness of your domain. We'll look at Action Domain Response as a new way of thinking about the concepts presented in MVC before examining Hexagonal Architecture, allowing you to easily reuse your domain across multiple delivery mechanisms. We'll then finish with an introduction to Domain Driven Design, a technique that allows you to closely align your domain with the business problems it is solving while helping keep things well designed and easily maintainable. By the end of this talk you should have the knowledge needed to begin modelling your domains more powerfully while keeping them aligned to the real world problems they solve."
The document discusses hexagonal architecture and its advantages for building maintainable software. It explains that hexagonal architecture divides a system into loosely coupled components like the application core and interfaces. This decouples the code and allows changes in one part to affect few other places. Ports act as contracts between components, with input and output ports. Adapters provide implementations for the ports. Benefits include increased testability, ability to update frameworks without impacting the domain, and postponing technical decisions. The document provides an example of applying hexagonal architecture with Symfony. It recommends starting with decoupling legacy code using interfaces, dependency injection, and other best practices when refactoring.
Dicoding Developer Coaching merupakan webinar, yang membahas tuntas kendala maupun pertanyaan yang sering ditanyakan di Academy Dicoding.
Tema kali ini adalah "Menerapkan Clean Architecture di Android"
Clean Architecture merupakan salah satu arsitektur dalam pengembangan software engineering yang memiliki tujuan separation of concern, alias pemisahan konsentrasi. Sehingga kita bisa membaca kode yang ada di dalam project menjadi lebih mudah. Selain itu ide utama penggunaan Clean Architecture yaitu untuk menghasilkan sistem yang Independent of Framework, Testable, Independent of UI, Independent of Database, dan Independent of External.
The document discusses hexagonal architecture and how it can be applied to PHP applications. It begins by defining software architecture and its importance. It then explains hexagonal architecture, which separates an application into distinct layers including domain, application, and infrastructure layers. The layers are decoupled via defined boundaries and interfaces. Commands are used to communicate between layers and are handled by command buses and handlers. Examples are given of implementing repositories, commands and handlers to follow this pattern in a PHP application.
This document introduces Interaction-Driven Design (IDD) and discusses best practices for application structure and testing strategies when using this approach. It recommends starting the design process from the user interactions or actions needed, which will help define domain concepts and emerging entities. The core domain model should be separated from infrastructure implementations. Testing strategies covered include user journey tests at the application level, acceptance tests at the action level, integration tests at boundaries, and unit tests at the class level. Dependencies should be mocked or stubbed at different test levels.
This document summarizes a presentation about dependency injection in Drupal 8. It discusses why dependency injection is important for managing dependencies between objects and making code reusable, testable and flexible to change. It provides examples of dependency injection in Drupal 8, such as core services that are injected through the service container. It also discusses how the service container works and how services are defined to configure object relationships and dependencies.
Angular: Go Mobile!
How could you develop a mobile app across iOS, Android or windows devices? We’ll show how Apache Cordova opens the world of mobile app development to web developers. In the session, a “To Do” app using Angular will be explored and then it will be demonstrated step by step on how to turn it into a mobile app, with access to native device capabilities. Along the way, you'll also learn what kind of apps are best-suited for the hybrid architecture and when to make the switch from web app to mobile app.
Crafted Design - LJC World Tour Mash Up 2014Sandro Mancuso
This document introduces Interaction-Driven Design (IDD) and discusses concepts related to application architecture and testing strategies. It describes how IDD uses an outside-in approach where the design starts from actions and behaviors rather than data structures. Classes closer to user inputs focus on flow control and delegation, while those closer to outputs focus on specific behaviors with less delegation. The document also covers domain-driven design concepts like entities, aggregates, and repositories, and discusses strategies for unit, integration, acceptance, and end-to-end testing.
Code decoupling from Symfony (and others frameworks) - PHP Conference Brasil ...Miguel Gallardo
Frameworks are very helpful to solve common problems when developing an application. But what happens when we have to move to another framework? In this talk I will show how my company tries to keep independent of any framework, decoupling our business logic from symfony.
(IMPROVED VERSION FROM GEECON)
How can we quickly tell what an application is about? How can we quickly tell what it does? How can we distinguish business concepts from architecture clutter? How can we quickly find the code we want to change? How can we instinctively know where to add code for new features? Purely looking at unit tests is either not possible or too painful. Looking at higher-level tests can take a long time and still not give us the answers we need. For years, we have all struggled to design and structure projects that reflect the business domain.
In this talk Sandro will be sharing how he designed the last application he worked on, twisting a few concepts from Domain-Driven Design, properly applying MVC, borrowing concepts from CQRS, and structuring packages in non-conventional ways. Sandro will also be touching on SOLID principles, Agile incremental design, modularisation, and testing. By iteratively modifying the project structure to better model the application requirements, he has come up with a design style that helps developers create maintainable and domain-oriented software.
How can we quickly tell what an application is about? How can we quickly tell what it does? How can we distinguish business concepts from architecture clutter? How can we quickly find the code we want to change? How can we instinctively know where to add code for new features? Purely looking at unit tests is either not possible or too painful. Looking at higher-level tests can take a long time and still not give us the answers we need. For years, we have all struggled to design and structure projects that reflect the business domain.
In this talk Sandro will be sharing how he designed the last application he worked on, twisting a few concepts from Domain-Driven Design, properly applying MVC, borrowing concepts from CQRS, and structuring packages in non-conventional ways. Sandro will also be touching on SOLID principles, Agile incremental design, modularisation, and testing. By iteratively modifying the project structure to better model the product requirements, he has come up with a design style that helps developers create maintainable and domain-oriented software.
Through this presentation you will gain a good understanding of how the clean architecture pattern is implemented at Taxibeat. What issues the Android Taxibeat team has faced so far and what solutions we came up with. Of course, the benefits of clean architecture will also be discussed along with the way we managed to build two fast paced iterative apps that share functionality.
From Backbone to Ember and Back(bone) Againjonknapp
As a software consultant, I get to see a lot of interesting code. In this particular instance a client was in the process of transforming their web application to a rich, interactive interface with the help of another company.
The project kicked off using Backbone and things were great. Until they were not great. Pages starting getting more and more involved and blame started being thrown at the technology choice.
A move to Ember.js ensued and the app was rewritten. But architecturally bad decisions don't hide long, and soon the rewrite was preforming even worse. That's when I stepped in, with the help of another consultant, to solve the performance issues once and for all. Our solution used Backbone.js and it was fast. This is that journey.
Wojciech Sznapka presents key principles for achieving wise architecture with Symfony2:
1. Follow SOLID principles - each component should have a single responsibility and dependencies should be injected through interfaces.
2. Prioritize maintainability - thoroughly test code and implement logging.
3. Design for scalability - avoid dependencies on local storage, scale the database, and optimize for horizontal scaling.
Wise architecture is achieved by following best practices, leveraging existing bundles, and ensuring the application can be easily maintained and scaled over time.
An Introduction to Domain Driven Design in PHPChris Renner
We use PHP to solve problems. But as software projects grow and the business needs increase, how do we manage the complexity and still produce readable and maintainable code? Domain Driven Design is a set of concepts and practices that, when applied appropriately, help us manage complexity in large scale projects. In this talk, we will explore the broad points of DDD. I’ll also share tips, patterns and lessons-learned gained from my experiences building PHP software for complicated business processes.
This document discusses object-oriented programming concepts like classes, inheritance, and polymorphism.
It begins with an overview of classes, explaining that classes contain instance variables and methods. Classes can extend other classes through inheritance, allowing subclasses to override or add new functionality. References can point to objects of a class or any superclass.
The document then discusses polymorphism, where the decision of which method to call is determined at runtime based on the actual object type. This allows subclasses to be used through their parent class references. The summary cautions that direct concrete inheritance can cause issues if not used carefully, such as violating the Liskov substitution principle.
Framework design involves balancing many considerations, such as:
- Managing dependencies between components to allow for flexibility and evolution over time. Techniques like dependency injection and layering help achieve this.
- Designing APIs by first writing code samples for key scenarios and defining object models to support these samples to ensure usability.
- Treating simplicity as a feature by removing unnecessary requirements and reusing existing concepts where possible.
Rails simplifies the software development process through conventions over configuration and by embracing agile practices. Rails uses simple naming conventions and reflection so that developers can focus on business logic rather than configuration. This allows features like MVC, DRY principles and database mapping to work automatically without extensive setup. The combination of Ruby's elegance and Rails' conventions makes building applications faster and easier for developers.
Commands, events, queries - three types of messages that travel through your application. Some originate from the web, some from the command-line. Your application sends some of them to a database, or a message queue. What is the ideal infrastructure for an application to support this on-going stream of messages? What kind of architectural design fits best?
This talk provides answers to these questions: we take the *hexagonal* approach to software architecture. We look at messages, how they cross boundaries and how you can make steady communication lines between your application and other systems, like web browsers, terminals, databases and message queues. You will learn how to separate the technical aspects of these connections from the core behavior of your application by implementing design patterns like the *command bus*, and design principles like *dependency inversion*.
Unit test your java architecture with ArchUnitJeremy Cook
From Confoo 2021.
Software architecture tends to be esoteric and intangible. The result of this is architectural drift, with the architecture losing the qualities it was promoting as the code evolves. This talk will introduce ArchUnit, a library that allows you to test your Java architecture. You'll see how to write unit tests that protect architectural characteristics in your code while making your architecture easier to understand for everyone in your team.
Tracking your data across the fourth dimensionJeremy Cook
The document discusses temporal databases and how they handle data involving time. It explains the key temporal aspects of decision time, valid time, and transaction time. Decision time records when a decision was made, valid time defines the time period when a fact was true, and transaction time tracks when a fact was considered true in the database. The document also provides examples of implementing these temporal aspects and discusses challenges around temporal primary keys, foreign keys, and querying temporal data. Finally, it discusses current database vendor support for the SQL:2011 standard for representing temporal data.
Given at TrueNorthPHP 2014:
"MVC presents a great way to divide responsibilities in your application but it offers no help in building the most critical part: the model or domain. This talk will introduce ways that can help you to encapsulate the richness of your domain. We'll look at Action Domain Response as a new way of thinking about the concepts presented in MVC before examining Hexagonal Architecture, allowing you to easily reuse your domain across multiple delivery mechanisms. We'll then finish with an introduction to Domain Driven Design, a technique that allows you to closely align your domain with the business problems it is solving while helping keep things well designed and easily maintainable. By the end of this talk you should have the knowledge needed to begin modelling your domains more powerfully while keeping them aligned to the real world problems they solve."
The document discusses hexagonal architecture and its advantages for building maintainable software. It explains that hexagonal architecture divides a system into loosely coupled components like the application core and interfaces. This decouples the code and allows changes in one part to affect few other places. Ports act as contracts between components, with input and output ports. Adapters provide implementations for the ports. Benefits include increased testability, ability to update frameworks without impacting the domain, and postponing technical decisions. The document provides an example of applying hexagonal architecture with Symfony. It recommends starting with decoupling legacy code using interfaces, dependency injection, and other best practices when refactoring.
Dicoding Developer Coaching merupakan webinar, yang membahas tuntas kendala maupun pertanyaan yang sering ditanyakan di Academy Dicoding.
Tema kali ini adalah "Menerapkan Clean Architecture di Android"
Clean Architecture merupakan salah satu arsitektur dalam pengembangan software engineering yang memiliki tujuan separation of concern, alias pemisahan konsentrasi. Sehingga kita bisa membaca kode yang ada di dalam project menjadi lebih mudah. Selain itu ide utama penggunaan Clean Architecture yaitu untuk menghasilkan sistem yang Independent of Framework, Testable, Independent of UI, Independent of Database, dan Independent of External.
The document discusses hexagonal architecture and how it can be applied to PHP applications. It begins by defining software architecture and its importance. It then explains hexagonal architecture, which separates an application into distinct layers including domain, application, and infrastructure layers. The layers are decoupled via defined boundaries and interfaces. Commands are used to communicate between layers and are handled by command buses and handlers. Examples are given of implementing repositories, commands and handlers to follow this pattern in a PHP application.
This document introduces Interaction-Driven Design (IDD) and discusses best practices for application structure and testing strategies when using this approach. It recommends starting the design process from the user interactions or actions needed, which will help define domain concepts and emerging entities. The core domain model should be separated from infrastructure implementations. Testing strategies covered include user journey tests at the application level, acceptance tests at the action level, integration tests at boundaries, and unit tests at the class level. Dependencies should be mocked or stubbed at different test levels.
This document summarizes a presentation about dependency injection in Drupal 8. It discusses why dependency injection is important for managing dependencies between objects and making code reusable, testable and flexible to change. It provides examples of dependency injection in Drupal 8, such as core services that are injected through the service container. It also discusses how the service container works and how services are defined to configure object relationships and dependencies.
Angular: Go Mobile!
How could you develop a mobile app across iOS, Android or windows devices? We’ll show how Apache Cordova opens the world of mobile app development to web developers. In the session, a “To Do” app using Angular will be explored and then it will be demonstrated step by step on how to turn it into a mobile app, with access to native device capabilities. Along the way, you'll also learn what kind of apps are best-suited for the hybrid architecture and when to make the switch from web app to mobile app.
Crafted Design - LJC World Tour Mash Up 2014Sandro Mancuso
This document introduces Interaction-Driven Design (IDD) and discusses concepts related to application architecture and testing strategies. It describes how IDD uses an outside-in approach where the design starts from actions and behaviors rather than data structures. Classes closer to user inputs focus on flow control and delegation, while those closer to outputs focus on specific behaviors with less delegation. The document also covers domain-driven design concepts like entities, aggregates, and repositories, and discusses strategies for unit, integration, acceptance, and end-to-end testing.
Code decoupling from Symfony (and others frameworks) - PHP Conference Brasil ...Miguel Gallardo
Frameworks are very helpful to solve common problems when developing an application. But what happens when we have to move to another framework? In this talk I will show how my company tries to keep independent of any framework, decoupling our business logic from symfony.
(IMPROVED VERSION FROM GEECON)
How can we quickly tell what an application is about? How can we quickly tell what it does? How can we distinguish business concepts from architecture clutter? How can we quickly find the code we want to change? How can we instinctively know where to add code for new features? Purely looking at unit tests is either not possible or too painful. Looking at higher-level tests can take a long time and still not give us the answers we need. For years, we have all struggled to design and structure projects that reflect the business domain.
In this talk Sandro will be sharing how he designed the last application he worked on, twisting a few concepts from Domain-Driven Design, properly applying MVC, borrowing concepts from CQRS, and structuring packages in non-conventional ways. Sandro will also be touching on SOLID principles, Agile incremental design, modularisation, and testing. By iteratively modifying the project structure to better model the application requirements, he has come up with a design style that helps developers create maintainable and domain-oriented software.
How can we quickly tell what an application is about? How can we quickly tell what it does? How can we distinguish business concepts from architecture clutter? How can we quickly find the code we want to change? How can we instinctively know where to add code for new features? Purely looking at unit tests is either not possible or too painful. Looking at higher-level tests can take a long time and still not give us the answers we need. For years, we have all struggled to design and structure projects that reflect the business domain.
In this talk Sandro will be sharing how he designed the last application he worked on, twisting a few concepts from Domain-Driven Design, properly applying MVC, borrowing concepts from CQRS, and structuring packages in non-conventional ways. Sandro will also be touching on SOLID principles, Agile incremental design, modularisation, and testing. By iteratively modifying the project structure to better model the product requirements, he has come up with a design style that helps developers create maintainable and domain-oriented software.
Through this presentation you will gain a good understanding of how the clean architecture pattern is implemented at Taxibeat. What issues the Android Taxibeat team has faced so far and what solutions we came up with. Of course, the benefits of clean architecture will also be discussed along with the way we managed to build two fast paced iterative apps that share functionality.
From Backbone to Ember and Back(bone) Againjonknapp
As a software consultant, I get to see a lot of interesting code. In this particular instance a client was in the process of transforming their web application to a rich, interactive interface with the help of another company.
The project kicked off using Backbone and things were great. Until they were not great. Pages starting getting more and more involved and blame started being thrown at the technology choice.
A move to Ember.js ensued and the app was rewritten. But architecturally bad decisions don't hide long, and soon the rewrite was preforming even worse. That's when I stepped in, with the help of another consultant, to solve the performance issues once and for all. Our solution used Backbone.js and it was fast. This is that journey.
Wojciech Sznapka presents key principles for achieving wise architecture with Symfony2:
1. Follow SOLID principles - each component should have a single responsibility and dependencies should be injected through interfaces.
2. Prioritize maintainability - thoroughly test code and implement logging.
3. Design for scalability - avoid dependencies on local storage, scale the database, and optimize for horizontal scaling.
Wise architecture is achieved by following best practices, leveraging existing bundles, and ensuring the application can be easily maintained and scaled over time.
An Introduction to Domain Driven Design in PHPChris Renner
We use PHP to solve problems. But as software projects grow and the business needs increase, how do we manage the complexity and still produce readable and maintainable code? Domain Driven Design is a set of concepts and practices that, when applied appropriately, help us manage complexity in large scale projects. In this talk, we will explore the broad points of DDD. I’ll also share tips, patterns and lessons-learned gained from my experiences building PHP software for complicated business processes.
This document discusses object-oriented programming concepts like classes, inheritance, and polymorphism.
It begins with an overview of classes, explaining that classes contain instance variables and methods. Classes can extend other classes through inheritance, allowing subclasses to override or add new functionality. References can point to objects of a class or any superclass.
The document then discusses polymorphism, where the decision of which method to call is determined at runtime based on the actual object type. This allows subclasses to be used through their parent class references. The summary cautions that direct concrete inheritance can cause issues if not used carefully, such as violating the Liskov substitution principle.
Framework design involves balancing many considerations, such as:
- Managing dependencies between components to allow for flexibility and evolution over time. Techniques like dependency injection and layering help achieve this.
- Designing APIs by first writing code samples for key scenarios and defining object models to support these samples to ensure usability.
- Treating simplicity as a feature by removing unnecessary requirements and reusing existing concepts where possible.
Rails simplifies the software development process through conventions over configuration and by embracing agile practices. Rails uses simple naming conventions and reflection so that developers can focus on business logic rather than configuration. This allows features like MVC, DRY principles and database mapping to work automatically without extensive setup. The combination of Ruby's elegance and Rails' conventions makes building applications faster and easier for developers.
Commands, events, queries - three types of messages that travel through your application. Some originate from the web, some from the command-line. Your application sends some of them to a database, or a message queue. What is the ideal infrastructure for an application to support this on-going stream of messages? What kind of architectural design fits best?
This talk provides answers to these questions: we take the *hexagonal* approach to software architecture. We look at messages, how they cross boundaries and how you can make steady communication lines between your application and other systems, like web browsers, terminals, databases and message queues. You will learn how to separate the technical aspects of these connections from the core behavior of your application by implementing design patterns like the *command bus*, and design principles like *dependency inversion*.
Unit test your java architecture with ArchUnitJeremy Cook
From Confoo 2021.
Software architecture tends to be esoteric and intangible. The result of this is architectural drift, with the architecture losing the qualities it was promoting as the code evolves. This talk will introduce ArchUnit, a library that allows you to test your Java architecture. You'll see how to write unit tests that protect architectural characteristics in your code while making your architecture easier to understand for everyone in your team.
Tracking your data across the fourth dimensionJeremy Cook
The document discusses temporal databases and how they handle data involving time. It explains the key temporal aspects of decision time, valid time, and transaction time. Decision time records when a decision was made, valid time defines the time period when a fact was true, and transaction time tracks when a fact was considered true in the database. The document also provides examples of implementing these temporal aspects and discusses challenges around temporal primary keys, foreign keys, and querying temporal data. Finally, it discusses current database vendor support for the SQL:2011 standard for representing temporal data.
Tracking your data across the fourth dimensionJeremy Cook
How can you track all changes to your data across time? This talk will introduce you to the techniques you need to do that. We’ll examine the theory behind temporal database tables as well as the changes in the SQL:2011 standard that support them. We’ll also look at how you can implement temporal tables, both for DBMS that support SQL:2011 and those that don't. By the end of this talk you should be able to take your data to the fourth dimension.
Track your data across the fourth dimensionJeremy Cook
The document discusses tracking temporal data across time dimensions in databases. It describes how databases are good at capturing data at a single point in time but not across time. The document then covers the SQL:2011 standard for representing valid time, transaction time and bi-temporal data through the use of time periods and timestamps. Examples are provided of how to model temporal data and write queries involving time in a SQL database.
Accelerate your web app with a layer of VarnishJeremy Cook
This document provides an overview of Varnish, an open source caching reverse proxy that can accelerate web applications. It discusses what Varnish is, how it works, basic and advanced configuration options like backends, VCL, caching strategies, and Edge Side Includes. Installation and usage is demonstrated on common operating systems. The presentation aims to help attendees understand when and how to use Varnish to improve application performance.
This document discusses ways to optimize logging by centralizing and proactively using log data. It recommends using Monolog to log from application code in a standardized format. Rsyslog can then collect logs centrally from applications and systems. Logstash can further process logs with filters and output them to destinations like Elasticsearch. Graylog2 provides a web interface for powerful log searching, analytics, and alerting. Centralizing, standardizing, and proactively analyzing logs with these open source tools allows for improved monitoring and troubleshooting.
This document discusses logging best practices and tools for log centralization and analysis. It recommends:
1. Using Monolog for PHP logging to centralize logs from application code in a standardized format. Monolog supports multiple handlers for storage and alerts.
2. Leveraging Rsyslog to also centrally collect logs from software, services and the operating system. Rsyslog can scale across servers.
3. Ingesting logs into Logstash for filtering, parsing and forwarding. Logstash supports many input sources and output targets.
4. Storing logs long-term in Graylog2 for powerful searching, analytics, dashboards and alerting. Graylog2 is highly scalable and easy to use.
The document discusses unit testing and the PHPUnit testing framework. It provides an overview of what unit testing is, why it is useful, and how to get started with PHPUnit. Key points include that unit testing finds bugs early, encourages good coding practices, and makes codebases easier to change and deploy. PHPUnit is introduced as the most popular PHP testing framework. Instructions are given for installing PHPUnit via PEAR and writing basic tests, including test fixtures, assertions, and annotations. More advanced topics like mock objects, data providers, and exception testing are also covered.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfflufftailshop
When it comes to unit testing in the .NET ecosystem, developers have a wide range of options available. Among the most popular choices are NUnit, XUnit, and MSTest. These unit testing frameworks provide essential tools and features to help ensure the quality and reliability of code. However, understanding the differences between these frameworks is crucial for selecting the most suitable one for your projects.
8. Problems with ‘web’ MVC
❖ Use of the term ‘Model’ is an issue…
❖ Easy to muddy responsibilities in the controller
❖ Offers no guidance in modelling the most critical part of
our apps: the model or domain
12. What is Action Domain Responder?
❖ Created by Paul M Jones
❖ Web specific refinement of MVC
❖ Designed to map more closely to what actually happens
in the lifecycle of a web request
13. What is Action Domain Responder?
❖ Model
❖ View
❖ Controller
14. What is Action Domain Responder?
❖ Controller
❖ Model
❖ View
15. What is Action Domain Responder?
❖ Controller Action
❖ Model Domain
❖ View Responder
16. Action
❖ In ADR an action is mapped to a single class or closure
❖ Creates a single place for all code dealing with an action
❖ Does not directly create a view or HTTP response
17. Responder
❖ ADR recognizes that a web response is more than a
view
❖ Action instantiates a responder object and injects
domain data in it
❖ Responder is responsible for generating all aspects of
the response
18. Domain
❖ ADR offers no help on modelling a domain…
❖ …but at least Paul calls it a domain!
❖ Other patterns later will offer more help here
20. ADR Example
<?php
class FooAction implements ActionInterface {
protected $responderFactory;
public function __construct(ResponderFactoryInterface $factory) {
$this->responderFactory = $factory;
}
public function __invoke(RequestInterface $request) {
//Domain logic here
$responder = $this->responderFactory->generateForRequest($request);
return $responder();
}
}
24. What’s wrong with ‘Hexagonal Architecture’?
❖ Has nothing to do with hexagons
❖ Has nothing to do with the number 6
❖ Ports and adapters describes what this actually does
25. What are Ports and Adapters?
❖ Invented by Alistair Cockburn
❖ Architectural pattern for isolating an application from
its inputs.
26. –Alistair Cockburn
“Allow an application to equally be driven by
users, programs, automated test or batch scripts,
and to be developed and tested in isolation from
its eventual run-time devices and databases.”
27. –Alistair Cockburn
“Allow an application to equally be driven by
users, programs, automated test or batch scripts,
and to be developed and tested in isolation from
its eventual run-time devices and databases.”
32. HTTP Adapter
<?php
class FooAction implements ActionInterface {
protected $responderFactory;
protected $service;
public function __construct(ResponderFactoryInterface $factory,
ApplicationServiceInterface $service) {
$this->responderFactory = $factory;
$this->service = $service;
}
public function __invoke(RequestInterface $request) {
$result = $this->service->__invoke($request->getParamsArray());
$responder = $this->responderFactory->generateForRequest($request);
return $responder($result);
}
}
33. AMQP Adapter
<?php
class FooConsumer implements AMQPConsumer {
protected $service;
public function __construct(ApplicationServiceInterface $service) {
$this->service = $service;
}
public function __invoke(AMQPMessage $msg) {
$data = json_decode($msg->body, true);
$result = $this->service->__invoke($data);
if ($result->isStatusOk()) {
$msg->delivery_info['channel']
->basic_ack($msg->delivery_info['delivery_tag']);
}
}
}
34. Advantages of Ports and Adapters
❖ Encapsulation of the domain
❖ Allows development of the domain and adapters to
be independent
❖ Allows better end to end testability of the domain
❖ Makes it simple to add new entry points to an app
35. Further information on Ports and Adapters
❖ The original article introducing ports and adapters:
http://alistair.cockburn.us/Hexagonal+architecture
37. What is Domain Driven Design?
❖ Concept coined by Eric Evans
❖ Ideas can be grouped into two related areas:
❖ Architectural patterns
❖ Object patterns
42. Ubiquitous language
❖ Develop a shared language to describe each domain
and model the software after it
❖ The domain should be an expression of the ubiquitous
language in code
❖ Aim is to unite all members of a product team, from
developers to product managers
43. Bounded contexts
❖ Represents the boundary around a domain
❖ All code within a domain is completely encapsulated
with specific entry points
❖ Code and concepts are unique per domain
44. Context map
❖ Describes relationships between domains
❖ Outlines all points of contact between domains
❖ Can also include existing systems
46. Entities
❖ Represents a concept in your domain
❖ Each instance of a entity should be considered unique
❖ Houses logic and operation on the concept
47. Value Objects
❖ Used when you only care about the attributes and logic
of the concept
❖ Immutable
❖ All methods must be side effect free
❖ Mutator methods must return a new instance of the
value object
❖ Prefer value objects over simple types
48. Value Objects
<?php
class Employee {
public function __construct($firstName, $lastName) {
//Code here
}
}
$person = new Employee('Cook', 'Jeremy'); //WHOOPS!
49. Value Objects
<?php
class Firstname {
protected $firstname;
public function __construct($firstname) {
if (! is_string($firstname)) {
throw new InvalidArgumentException(/**ErrorMessage**/);
}
$this->firstname = $firstname;
}
public function __toString() {
return $this->firstname;
}
}
50. Value Objects
<?php
class Employee {
public function __construct(Firstname $firstName, Lastname $lastName) {
//Code here
}
}
//This will now cause an error
$person = new Employee(new Lastname('Cook'), new Firstname('Jeremy'));
51. Entities vs Value Objects
!==
Bank Account
Owner: Jeremy
Balance: $1,000,000
Account #: 12345
===
Currency
Name: Canadian Dollar
Abbr: CAD
Symbol: $
Currency
Name: Canadian Dollar
Abbr: CAD
Symbol: $
Bank Account
Owner: Jeremy
Balance: $1,000,000
Account #: 12346
52. Domain Services
❖ Encapsulates an operation that is not owned by another
part of the domain model
❖ A good service has three properties:
❖ Models a domain concept that does not conceptually
belong to an entity or value object
❖ Stateless
❖ Defined in terms of the domain model
53. Domain Services
<?php
class MoneyTransfer {
public static function transferBetweenAccounts(Account $from, Account
$to, Money $amount) {
$from->debitForTransfer($money, $to);
$to->creditFromTransfer($money, $from);
}
}
//In the application service...
$from = $accountRepository->findByAccNumber('123456');
$to = $accountRepository->findByAccNumber('123457');
$money = new Money('100', new Currency('CAD'));
MoneyTransfer::transferBetweenAccounts($from, $to, $money);
54. Aggregates
❖ A collection of entities contained by another entity
❖ The containing entity is the aggregate root
❖ Individual aggregate instances can only be accessed
through the aggregate root
55. Repositories
❖ A specialised adapter that maps entities to and from the
persistence layer
❖ Provides methods to retrieve entities and save them
❖ Abstracts the details of the persistence layer away from
the domain
56. Domain Events
❖ Allows a domain to signal that something as happened
❖ Full part of the domain and a representation of
something that has happened
❖ Used to signal something that might trigger a state
change in another domain
57. Domain Events
$event = EventFactory::createEventForSuccessfulAccountTransfer($from, $to,
$money);
$eventType = EventTypes::SUCCESSFUL_MONEY_TRANSFER;
$eventDispatcher->raiseEvent($eventType, $event);
<?php
class MoneyTransfer {
public static function transferBetweenAccounts(Account $from, Account
$to, Money $amount) {
$from->debitForTransfer($money, $to);
$to->creditFromTransfer($money, $from);
}
}
//In the application service...
$from = $accountRepository->findByAccNumber('123456');
$to = $accountRepository->findByAccNumber('123457');
$money = new Money('100', new Currency('CAD'));
MoneyTransfer::transferBetweenAccounts($from, $to, $money);
58. Further Information on DDD
❖ Eric Evans
❖ “Domain Driven Design” book
❖ Short introduction: https://domainlanguage.com/
ddd/patterns/DDD_Reference_2011-01-31.pdf
❖ Implementing Domain Driven Design by Vaughn
Vernon
60. Thanks for listening!
❖ Any questions?
❖ I’d love some feedback
❖ Feel free to contact me
❖ jeremycook0@icloud.com
❖ @JCook21
Editor's Notes
This as an introductory talk.
I’m going to introduce a number of architectural and structural patterns that can help you model your business domains better.
There is no single bullet solution…
Begin with some level setting
Dictionary definition
Domain include all code needed to model a particular business problem.
Domain layer in an app can imply encapsulation.
I’m going to argue that encapsulating a domain is something we should strive for…
I want to talk about what MVC historically was, why it was adapted for the web and what the compromises are when using it.
MVC for the web is a corrupted pattern…
MVC first developed in the 70’s and 80’s by Trygve Reenskaug, Jim Althoff and others
MVC as it’s generally used on the web.
MVC is about separation of concerns. Without care domain and view logic leaks into controllers, which breaks SOC.
We tend to think of a model (singular). Controller often becomes the place where data is marshalled between models.
View is also controlled by the controller.
Modern web apps are about far more than just user interfaces.
Throws the focus on the UI when mostly now it’s about the data that’s stored. Apps are as much about the data and how it is represented than the UI itself.
All of the solutions today can increase the complexity of your codebase. This should set your alarm bells ringing!!
It’s about exchanging unmanageable complexity for managed complexity.
As requirements grow and change code can easily become unmanageable. This is when you need to move beyond MVC.
Straight up: ADR is not a solution to the problem I’m looking at but a different way of looking at the problem.
ADR helps us to get back to more easily separating concerns.
Each of the three concepts implies a subtle shift in thinking.
We’re used to controllers with many actions.
Additional wrapper logic could be pre or post action hooks.
Allows the action to assume all responsibility for a single action.
Web response is more than a view!
Many MVC frameworks have controller manipulating elements of the response.
Responder is responsible for deciding the HTTP status code, setting headers, etc as well as generating the response body
Could wrap this in a decorator if want before/after hooks
Hopefully ADR has whetted your appetite.
If I say hexagonal architecture what do you think of?
Nevertheless, I will use hexagons and maybe the term hexagonal architecture in this talk!
This quote describes the intent of the pattern.
Database is an implementation detail.
Don’t build your objects to simply ‘sit on top of’ database tables but allow them to be mapped onto a persistence medium.
Think firstly in terms of object relationships.
This is a core tenant of DDD will be elaborated on later…
Move to next slide!
Adapters sit inside the application boundary but not inside the domain boundary
Adapter shuffles data between the input type and the domain, also dealing with a response.
Adapters and domain are only lightly coupled.
The domain has no idea about the types of input and output. Adapters have no idea how the domain is implemented.
If a domain is properly encapsulated then a controller/action is an adapter…
DDD places the design of the domain at the heart of the application development.
Nothing new but codifies best practices.
I can only scratch the surface of this today…
I’ll try to introduce some of the most important concepts.
Blue book: theoretical.
Red book: practical
Really architectural best practices
Talk about core and supporting domains.
Introduce idea of a domain model, the concept of the code model of the domain.
Using different language between dev’s and domain experts leads to misunderstanding and communication failures.
Intention revealing interface
A change in the ubiquitous language is a change to the model.
Ubiquitous language is unique to a bounded context/domain.
Bounded contexts allow the app to be split up.
Code is (almost) never shared between domains
No domain exists in isolation
Upstream and downstream domains, mutually dependent domains.
2 instances of the same entity with the same attributes are not the same!
Avoid anemic domain entities.
Can include data from more than one table!
Also represents a concept in your domain…
Value objects should be as common as entities, if not more so, in your domain.
Mutator/side effect free method example: DateTimeImmutable::modify()
Equality of value objects must be calculated based on their attributes, not identity
Side effect free function produces output without modifying its own state.
Entities can have value objects as properties
It’s all about identity.
Different from application service…
Name of the service should be part of the ubiquitous language
Example of moving money between two bank accounts (entities). Transfer is not owned by either account.
Give an example of aggregate roots and aggregates, e.g. leagues -> seasons -> games -> game events
Rationale: database access code can overwhelm domain model. Leads to dumbed down model, the opposite of what we want.
Just querying for individual fields does not express anything about the domain model, again watering this down.
Repository presents a very simple interface for an incredibly complex operation!
Look at patterns such as: data mapper, unit of work, query object
Mention overhead in dealing with multiple domains
Mention synchronous and asynchronous events
Need to consider the question of what information needs to be consistent immediately across domains and what can wait.