Presentation made at the second Miłośnicy Ruby Warsaw Meetup hosted in Visuality office on August 25th, 2022.
Paweł Strzałkowski introduces listeners to Domain-Driven Design and shows how it can be used to model business domain in Ruby on Rails framework on the tactical level.
QCon 2014 - How Shutl delivers even faster with Neo4jVolker Pacher
QCon London 2014 use case about implementing Neo4j at Shutl
In this talk, we touch on the key differences between relational databases and graph databases (which, ironically, are much more relational!), and discuss in detail how we utilise this technology both to model our complex domain but also to gain insights into our data and continually improve our offering.
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And WhenDavid Peyruc
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
Massimo Brignoli, MongoDB Inc
The presentation will illustrate what MongoDB is, the advantages of the document based approach and some of the use cases where MongoDB is a perfect fit.
This webinar focuses on how to use graph databases for Identity & Access Management. This webinar is designed for people who work with entitlements, access management, and tracking origins and associations of assets.
Managing and monitoring multiple user authorizations and asset provenance across your enterprise organization is a challenging task. We’ll explore how an interconnected view of your data, gives you better real-time insights and controls than ever before. Neo4j connects your data along intuitive relationships so identity and access management happens quickly and effectively.
In this webinar we’ll start with an overview of Neo4j and Graph-thinking, and continue with exploring some of the use cases showing how Neo4j’s versatile property graph model makes it easier for organizations to evolve identity and access management models.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1uRYaAR.
Volker Pacher, Sam Phillips present key differences between relational databases and graph databases, and how they use the later to model a complex domain and to gain insights into their data. Filmed at qconlondon.com.
Sam Phillips is Head of Engineering for eBay's Local Delivery team, bringing super fast delivery to customers in the UK and US. Volker Pacher is a Senior Developer at eBay Local Delivery. Before its acquisition by eBay, he was a member of the core team at Shutl helping to transition from a monolithic application to SOA and introducing new technologies, among them Neo4j.
QCon 2014 - How Shutl delivers even faster with Neo4jVolker Pacher
QCon London 2014 use case about implementing Neo4j at Shutl
In this talk, we touch on the key differences between relational databases and graph databases (which, ironically, are much more relational!), and discuss in detail how we utilise this technology both to model our complex domain but also to gain insights into our data and continually improve our offering.
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And WhenDavid Peyruc
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
Massimo Brignoli, MongoDB Inc
The presentation will illustrate what MongoDB is, the advantages of the document based approach and some of the use cases where MongoDB is a perfect fit.
This webinar focuses on how to use graph databases for Identity & Access Management. This webinar is designed for people who work with entitlements, access management, and tracking origins and associations of assets.
Managing and monitoring multiple user authorizations and asset provenance across your enterprise organization is a challenging task. We’ll explore how an interconnected view of your data, gives you better real-time insights and controls than ever before. Neo4j connects your data along intuitive relationships so identity and access management happens quickly and effectively.
In this webinar we’ll start with an overview of Neo4j and Graph-thinking, and continue with exploring some of the use cases showing how Neo4j’s versatile property graph model makes it easier for organizations to evolve identity and access management models.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1uRYaAR.
Volker Pacher, Sam Phillips present key differences between relational databases and graph databases, and how they use the later to model a complex domain and to gain insights into their data. Filmed at qconlondon.com.
Sam Phillips is Head of Engineering for eBay's Local Delivery team, bringing super fast delivery to customers in the UK and US. Volker Pacher is a Senior Developer at eBay Local Delivery. Before its acquisition by eBay, he was a member of the core team at Shutl helping to transition from a monolithic application to SOA and introducing new technologies, among them Neo4j.
E Commerce Web Design Service Proposal PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a E Commerce Web Design Service Proposal PowerPoint Presentation Slides look no further. Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response. https://bit.ly/2URwO14
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...Databricks
In the customer age, being able to extract relevant communications information in real-time and cross reference it with context is key. Learn how Salesforce Inbox is using data science and engineering to enable salespeople to monitor their emails in real-time and surface insights and recommendations.
Salesforce is developing Einstein, an artificial intelligence capability built into the core of the Salesforce Platform. Einstein helps power the world’s smartest CRM to deliver advanced AI capabilities to sales, services, and marketing teams – allowing them to discover new insights, predict likely outcomes to power smarter decision making, recommend next steps, and automate workflows so users can focus on building meaningful relationships with every customer.
Find out how Salesforce Einstein Inbox combines activity data, such as emails, with contextual and CRM data to provide real-time insights and recommended actions. Learn about use cases, architecture, and how a variety of technologies including data engineering, data science, graph processing, NLP, machine learning and deep learning are combined together to support the application.
This session will include an interactive demo where you’ll get to see the associated code using notebooks running Spark.
Explores common patterns in microservice architectures and how these are addressed in the gilmour library.
Discusses async signal-slot as well as synchronous request-response architectures.
Introduces unix inspired composition of microservices for more modular and flexible design.
Online Store Website Design Proposal PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a Online Store Website Design Proposal PowerPoint Presentation Slides look no further. Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response.
How to Price Recurring Revenue Services in Your Mobile App BusinessKumulos
This presentation explorex pricing options that lets you right-size services to the individual needs of your clients and build in healthy profit margins for you.
Business Owners will learn:
How to make sure you’re not leaving money on the table and selling yourself cheap, while giving scope for upselling in the future.
Commercial Managers will learn:
How to position and sell recurring revenue services to differentiate your company so you win more mobile app projects and lock in recurring revenue services from day one.
Learn how to build apps using Angular JS with Firebase(backend-as-a-service)!!
Room 6 (2nd Floor Conference Room)
In this presentation, we'll be using Angular JS and Firebase to create a simple web application from scratch and explore the awesome real-time syncing features provided by firebase. Combining Bootstrap, Angular JS with Firebase and Azure, we can build and deploy cross-platform HTML5 apps.
E commerce Proposal Template PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a E commerce Proposal Template PowerPoint Presentation Slides look no further.Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response.
Identifying Pricing Request Emails Using Apache Spark and Machine LearningDatabricks
In this presentation, we will explain how we process users' communication data (such as emails) to provide real time insights and recommended actions. Sammy will specifically discuss how we use spark to build a machine learning model for identifying pricing-related emails from CRM customers.
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
Schema design in MongoDB can be an art. Different trade offs should be considered when designing how to store your data. In this presentation we are going to cover some common scenarios, recommended practices and don'ts to avoid based on previous experiences
Preliminary investment required before refactoring your monolith into microservices, and a series of steps, recipes and patterns to help you succeed when refactoring your application & your data into a microservices-style architecture.
Webinar: Realizing Omni-Channel Retailing with MongoDB - One Step at a TimeMongoDB
Let’s face it – the consumer is in control. Retailers, this means – you need to be constantly prepared to listen, speak relevantly and act personally. To meet modern demands and expanding selling channels, retailers need to deploy seamless product information with endless aisle, empowered associates turned sales agents – whenever, to whatever medium they want, however the customer wants.
Knowing today’s realities, most databases systems are rigid and difficult to change, making it a challenge to provide personalized information to customers, wherever they want - right now.
MongoDB is an agile, game-changing technology that provides a real-time view of business with based upon consumer requirements. In this webinar you will learn how leading global retailers create unique business value using MongoDB such as:
1. Real-time view of product information
2. Relevant view of the customer from whichever channel they engage
3. Smart mobile applications that understands the customer's most recent activities
Once in place, retailers continue to leverage the data views to extend their business information across other business areas.
Learn about retailers embracing this approach to meet today’s business needs with MongoDB. As part of a mini-series, led by Rebecca Bucnis, global business architect @MongoDB, we will share how you can get started on your way to Omni-Channel retailing, one step at a time.
Force.com can automatically generate user interfaces, but in some cases you might want to build a more custom UI. Join us to learn about Visualforce, the component-based UI framework that lets you build attractive, dynamic, reusable user interfaces. We'll cover code walk-throughs, common use cases, leveraging Apex on the server side, debugging techniques, and how to utilize the component framework to make your code portable and maintainable.
3 issues that made 30 test workers take 40 minutesVisuality
Patryk Ptasiński discusses 3 issues he encountered in the Ruby on Rails project with long-running tests. He presents solutions for improving test performance, followed by benchmarks and examples. Finally, he lists recommendations for writing fast tests for large Ruby on Rails projects.
Presentation made at the Miłośnicy Ruby Warsaw Meetup hosted in Visuality office on October 20th, 2022.
Stanisław Zawadzki shows what to avoid when writing tests for Ruby on Rails applications. Then, he presents some good practices.
More Related Content
Similar to Introduction to Domain-Driven Design in Ruby on Rails
E Commerce Web Design Service Proposal PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a E Commerce Web Design Service Proposal PowerPoint Presentation Slides look no further. Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response. https://bit.ly/2URwO14
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...Databricks
In the customer age, being able to extract relevant communications information in real-time and cross reference it with context is key. Learn how Salesforce Inbox is using data science and engineering to enable salespeople to monitor their emails in real-time and surface insights and recommendations.
Salesforce is developing Einstein, an artificial intelligence capability built into the core of the Salesforce Platform. Einstein helps power the world’s smartest CRM to deliver advanced AI capabilities to sales, services, and marketing teams – allowing them to discover new insights, predict likely outcomes to power smarter decision making, recommend next steps, and automate workflows so users can focus on building meaningful relationships with every customer.
Find out how Salesforce Einstein Inbox combines activity data, such as emails, with contextual and CRM data to provide real-time insights and recommended actions. Learn about use cases, architecture, and how a variety of technologies including data engineering, data science, graph processing, NLP, machine learning and deep learning are combined together to support the application.
This session will include an interactive demo where you’ll get to see the associated code using notebooks running Spark.
Explores common patterns in microservice architectures and how these are addressed in the gilmour library.
Discusses async signal-slot as well as synchronous request-response architectures.
Introduces unix inspired composition of microservices for more modular and flexible design.
Online Store Website Design Proposal PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a Online Store Website Design Proposal PowerPoint Presentation Slides look no further. Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response.
How to Price Recurring Revenue Services in Your Mobile App BusinessKumulos
This presentation explorex pricing options that lets you right-size services to the individual needs of your clients and build in healthy profit margins for you.
Business Owners will learn:
How to make sure you’re not leaving money on the table and selling yourself cheap, while giving scope for upselling in the future.
Commercial Managers will learn:
How to position and sell recurring revenue services to differentiate your company so you win more mobile app projects and lock in recurring revenue services from day one.
Learn how to build apps using Angular JS with Firebase(backend-as-a-service)!!
Room 6 (2nd Floor Conference Room)
In this presentation, we'll be using Angular JS and Firebase to create a simple web application from scratch and explore the awesome real-time syncing features provided by firebase. Combining Bootstrap, Angular JS with Firebase and Azure, we can build and deploy cross-platform HTML5 apps.
E commerce Proposal Template PowerPoint Presentation SlidesSlideTeam
If your company needs to submit a E commerce Proposal Template PowerPoint Presentation Slides look no further.Our researchers have analyzed thousands of proposals on this topic for effectiveness and conversion. Just download our template, add your company data and submit to your client for a positive response.
Identifying Pricing Request Emails Using Apache Spark and Machine LearningDatabricks
In this presentation, we will explain how we process users' communication data (such as emails) to provide real time insights and recommended actions. Sammy will specifically discuss how we use spark to build a machine learning model for identifying pricing-related emails from CRM customers.
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
Schema design in MongoDB can be an art. Different trade offs should be considered when designing how to store your data. In this presentation we are going to cover some common scenarios, recommended practices and don'ts to avoid based on previous experiences
Preliminary investment required before refactoring your monolith into microservices, and a series of steps, recipes and patterns to help you succeed when refactoring your application & your data into a microservices-style architecture.
Webinar: Realizing Omni-Channel Retailing with MongoDB - One Step at a TimeMongoDB
Let’s face it – the consumer is in control. Retailers, this means – you need to be constantly prepared to listen, speak relevantly and act personally. To meet modern demands and expanding selling channels, retailers need to deploy seamless product information with endless aisle, empowered associates turned sales agents – whenever, to whatever medium they want, however the customer wants.
Knowing today’s realities, most databases systems are rigid and difficult to change, making it a challenge to provide personalized information to customers, wherever they want - right now.
MongoDB is an agile, game-changing technology that provides a real-time view of business with based upon consumer requirements. In this webinar you will learn how leading global retailers create unique business value using MongoDB such as:
1. Real-time view of product information
2. Relevant view of the customer from whichever channel they engage
3. Smart mobile applications that understands the customer's most recent activities
Once in place, retailers continue to leverage the data views to extend their business information across other business areas.
Learn about retailers embracing this approach to meet today’s business needs with MongoDB. As part of a mini-series, led by Rebecca Bucnis, global business architect @MongoDB, we will share how you can get started on your way to Omni-Channel retailing, one step at a time.
Force.com can automatically generate user interfaces, but in some cases you might want to build a more custom UI. Join us to learn about Visualforce, the component-based UI framework that lets you build attractive, dynamic, reusable user interfaces. We'll cover code walk-throughs, common use cases, leveraging Apex on the server side, debugging techniques, and how to utilize the component framework to make your code portable and maintainable.
3 issues that made 30 test workers take 40 minutesVisuality
Patryk Ptasiński discusses 3 issues he encountered in the Ruby on Rails project with long-running tests. He presents solutions for improving test performance, followed by benchmarks and examples. Finally, he lists recommendations for writing fast tests for large Ruby on Rails projects.
Presentation made at the Miłośnicy Ruby Warsaw Meetup hosted in Visuality office on October 20th, 2022.
Stanisław Zawadzki shows what to avoid when writing tests for Ruby on Rails applications. Then, he presents some good practices.
Active Record .includes - do you use it consciously?Visuality
Example of the wrong usage of ".includes` method in Active Record and ways to prevent it. Description of Arel library and how it can be used to make more optimal queries within Active Record.
Presentation made by Alexander Repnikov.
Description of Big Picture and Process Level Event Storming. Example of a workshop that could happen in one of many startups to design new feature or find most important problems.
SVG Overview - How To Draw, Use and AnimateVisuality
A general overview of SVG with examples. Bartosz describes how to easily draw basic shapes, how to use them on your website, and animation possibilities.
https://youtu.be/0HlKp48rY3c
How To Migrate a Rails App From a Dedicated Server Into Cloud Environment? - ...Visuality
A general look at the process of moving Ruby on Rails application from a dedicated server into a cloud environment. Marcin presents the details about the old solution: its architecture, drawbacks, and challenges.
https://youtu.be/OZcL53JnxMQ
How to use AWS SES with Lambda in Ruby on Rails application - Michał ŁęcickiVisuality
The second part of story about moving Ruby on Rails application from dedicated server into cloud environment. This presentation focuses on one main feature: email importing. Michał describes details of the new architecture build with AWS Simple Email Service and AWS Lambda and its integration with Ruby on Rails app.
What is NOT machine learning - Burak AybarVisuality
What is NOT machine learning?
Burak Aybar describes the basics of artificial intelligence, machine learning, deep learning and the differences between them.
When using Redux we are trying to keep data models in different reducers which are independent from each other. However, sometimes changing data in one model causes changes in another one which usually only backend is aware about. In this talk, I want to show how to synchronise data between multiple reducers on frontend in order to keep it up to date with the best user experience.
How to check valid email? Find using regex(p?)Visuality
Presentation is about regex in IT projects. It’s about creating regular expressions for matching, finding (and replacing) against some text. The full presentation can be found on our Youtube channel - https://youtu.be/Z_1bPwZdLwA . It was conducted in Visuality by Piotr Wasiak - Software Engineer.
Fantastic stresses and where to find themVisuality
Presentation is about stress management in IT projects. It describes basic concepts and approaches when it comes to assessing and identifying stress factors and ways of dealing with them and with stress itself. The full presentation can be found on our youtube channel - https://youtu.be/ZHKyHcJ5HIQ . It was conducted in Visuality by Wiktor De Witte - Project Manager.
Presentation is about risk management in IT projects. It describes basic concepts and approaches when it comes to assessing and identifying risks. The full presentation can be found on our youtube channel - https://www.youtube.com/watch?v=SR6CwTj_qz0. It was conducted in Visuality by Wiktor De Witte - Project Manager.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
24. Tactical DDD
• How to express a model of a domain
• Embrace object oriented programming
25. Tactical DDD Elements
• Entity
• Value Object
• Aggregate
• Repository
• Factory
• Service
• Domain Event
26. Tactical DDD Elements: Entity
An object de
fi
ned primarily by its identity is called an ENTITY.
- Eric Evans
• Identity
• Behavior
27. Tactical DDD Elements: Entity - Identity strategies
• user driven
• application generated
• persistence store generated
• outside
28. Tactical DDD Elements: Entity - Indispensable behavior
• domain objects have behavior essential to the context
• setter or getter for every primitive do not express behaviour
customer.change_phone_number("+48 123 555 123")
invoice.void(reason: "Client changed his mind")
account.activate
29. Tactical DDD Elements: Value Object
An object that represents a descriptive aspect of the domain with no
conceptual identity is called a VALUE OBJECT
- Eric Evans
• Represents value
• Immutable
• Comparable
• No identity
30. Tactical DDD Elements: Aggregate
An AGGREGATE is a cluster of associated objects that we treat as a unit
for the purpose of data changes.
- Eric Evans
• Aggregate Root
• Boundary
• Invariants
Aggregate Root
* invariants
Value Object
Entity
Value Object
33. Tactical DDD Elements: Value Object - IRL Example
class TrackEvent
def initialize(user_id:, event:)
self.user_id = user_id
self.event = event
end
def call
return false unless Configuration.enabled?
Client.track(
user_id: user_id,
event: event,
properties: properties
)
end
private
# ...
end
34. Tactical DDD Elements: Value Object - IRL Example
class TrackEvent
def initialize(user_id:, noun: nil, verb: nil)
self.user_id = user_id
self.event = "#{noun} #{verb}"
end
def call
return false unless Configuration.enabled?
Client.track(
user_id: user_id,
event: event,
properties: properties
)
end
private
# ...
end
35. Tactical DDD Elements: Value Object - IRL Example
class TrackEvent
def initialize(user_id:, noun: nil, verb: nil, event: nil)
self.user_id = user_id
self.event = event.presence || "#{noun} #{verb}"
end
def call
return false unless Configuration.enabled?
Client.track(
user_id: user_id,
event: event,
properties: properties
)
end
private
# ...
end
36. Tactical DDD Elements: Value Object - IRL Example
class Event
attr_reader :name
def initialize(name:)
@name = name.to_s
end
def self.combination_of(noun:, verb:)
new(name: "#{noun} #{verb}")
end
def ==(other)
name == other.name
end
end
Event.new(name: 'Job Created')
Event.combination_of(noun: 'Job', verb: 'Started')
37. Tactical DDD Elements: Value Object - IRL Example
class TrackEvent
def initialize(user_id:, event:)
self.user_id = user_id
self.event = event.name
end
def call
return false unless Configuration.enabled?
Client.track(
user_id: user_id,
event: event,
properties: properties
)
end
private
# ...
end
38. Tactical DDD Elements: Value Object - RoR Example
class Place < ApplicationRecord
# name, latitude, longitude
end
39. Tactical DDD Elements: Value Object - RoR Example
class Place < ApplicationRecord
# name, latitude, longitude
composed_of :coordinates
end
40. Tactical DDD Elements: Value Object - RoR Example
class Place < ApplicationRecord
# name, latitude, longitude
composed_of :coordinates,
class_name: 'Coordinates'
mapping: [%w[latitude latitude], %w[longitude longitude]]
end
class Coordinates
attr_reader :latitude, :longitude
def initialize(latitude, longitude)
@latitude = latitude
@longitude = longitude
end
def ==(other)
latitude == other.latitude && longitude == other.longitude
end
end
43. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
44. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
• When a customer contacts us, we use their phone numbers to
fi
nd
the records in our books
45. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
• When a customer contacts us, we use their phone numbers to
fi
nd
the records in our books
• Each customer has to have a name and a physical address
46. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
• When a customer contacts us, we use their phone numbers to
fi
nd
the records in our books
• Each customer has to have a name and a physical address
• Birthdays are very important, we use them for marketing
47. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
• When a customer contacts us, we use their phone numbers to
fi
nd
the records in our books
• Each customer has to have a name and a physical address
• Birthdays are very important, we use them for marketing
• We have a loyalty program based on the amount of time customer is
with us, we need to know when a customer was added
48. Domain Modeling in Ruby on Rails - Excercise
• Customers may be contacted through an email or a phone
• When a customer contacts us, we use their phone numbers to
fi
nd
the records in our books
• Each customer has to have a name and a physical address
• Birthdays are very important, we use them for marketing
• We have a loyalty program based on the amount of time customer is
with us, we need to know when a customer was added
• Customers get into interactions; they can rate others with a positive,
neutral or a negative mark, there can be one rate for one customer
52. Excercise - With value objects
class Address
attr_reader :city, :street
def initialize(city, street)
@city = city
@street = street
end
end
class PersonalInformation
attr_reader :name, :birthday
def initialize(name, birthday)
@name = name
@birthday = birthday
end
end
class Rate < ApplicationRecord
belongs_to :customer
belongs_to :rated_customer,
class_name: 'Customer'
end
class Customer < ApplicationRecord
composed_of :address,
class_name: 'Address',
mapping: [%w[city city], %w[street street]]
validates_with AddressValidator
composed_of :personal_information,
class_name: 'PersonalInformation',
mapping: [
%w[name name], %w[birthday birthday]
]
validates_with PersonalInformationValidator
validates_with PhoneSyntaxValidator
validates :phone, uniqueness: true
validates_with EmailSyntaxValidator
validates :email, uniqueness: true
has_many :rates
end
53. Excercise - Highlighting identity
class Address
attr_reader :city, :street
def initialize(city, street)
@city = city
@street = street
end
end
class PersonalInformation
attr_reader :name, :birthday, :email
def initialize(name, birthday, email)
@name = name
@birthday = birthday
@email = email
end
end
class Rate < ApplicationRecord
belongs_to :customer
belongs_to :rated_customer,
class_name: 'Customer'
end
class Customer < ApplicationRecord
composed_of :address,
class_name: 'Address',
mapping: [%w[city city], %w[street street]]
validates_with AddressValidator
composed_of :personal_information,
class_name: 'PersonalInformation',
mapping: [
%w[name name], %w[birthday birthday], %[email email]
]
validates_with PersonalInformationValidator
validates_with PhoneSyntaxValidator
validates :phone, uniqueness: true
has_many :rates
end
54. Excercise - Adding behavior
class Customer < ApplicationRecord
AlreadyRated = Class.new(StandardError)
CannotRateSelf = Class.new(StandardError)
# ...
has_many :rates
def give_negative_rate(other) = give_rate(other, -1)
def give_neutral_rate(other) = give_rate(other, 0)
def give_positive_rate(other) = give_rate(other, 1)
private
def give_rate(other, mark)
raise CannotRateSelf if other == self
raise AlreadyRated if rates.any? { |rate| rate.rated_customer == other }
rates.build(rated_customer: other, mark: mark)
end
end
55. Excercise - Ugly service
module Customers
class RateService
MarkOutOfBounds = Class.new(StandardError)
AlreadyMarked = Class.new(StandardError)
CannotRateSelf = Class.new(StandardError)
def initialize(customer_id, rated_customer_id, mark)
@customer_id = customer_id
@rated_customer_id = rated_customer_id
@mark = mark
end
def call
raise CannotRateSelf if customer_id == rated_customer_id
customer = Customer.find(@customer_id)
rated_customer_id = Customer.find(@rated_customer_id)
raise MarkOutOfBounds unless [-1, 0, 1].include?(mark)
alread_rated = customer.rates.any? { |rate| rate.rated_customer == rated_customer }
raise AlreadyMarked if alread_rated
customer.rates.build(marked: other, mark: mark)
customer.save
end
end
end
56. Excercise - Intention revealing service
module Customers
class GivePositiveRateService
def initialize(customer_id, rated_customer_id)
@customer_id = customer_id
@rated_customer_id = rated_customer_id
end
def call
customer = Customer.find(@customer_id)
rated_customer = Customer.find(@rated_customer_id)
customer.give_positive_mark(rated_customer)
customer.save
end
end
end
57. Excercise - aggregate implementation
module Customers
class GivePositiveRateService
def initialize(customer_id, rated_customer_id)
@customer_id = customer_id
@rated_customer_id = rated_customer_id
end
def call
customer = Customer.find(@customer_id)
rated_customer = Customer.find(@rated_customer_id)
customer.give_positive_mark(rated_customer)
customer.save
end
end
end
58. Excercise - aggregate implementation
module Customers
class GivePositiveRateService
def initialize(customer_id, rated_customer_id)
@customer_id = customer_id
@rated_customer_id = rated_customer_id
end
def call
customer = Customer.find(@customer_id)
rated_customer = Customer.find(@rated_customer_id)
customer.give_positive_mark(rated_customer)
customer.save
end
end
end
Add optimistic locking
add_column :customers, :lock_version, :integer
59. We did it!
• Modelled the domain according to knowledge of a domain expert
• Created expressive and intention revealing code
• Guaranteed safety in concurrent operations
How?
• Avoided ORM-based design
• Listened to the domain expert
• Spent minimal time thinking
60. The job is not done
• Customer model is responsible for handling:
• address used for package delivery
• birthdays used for marketing actions
• email used for transactional email
61. The job is not done
• Customer model is responsible for handling:
• address used for package delivery
• birthdays used for marketing actions
• email used for transactional email
But that's a story for another time...
62. References
• Introduction to DDD in Ruby on Rails
• https://www.visuality.pl/posts/introduction-to-ddd-in-ruby-on-rails
• GitHub Repository with used examples
• https://github.com/pstrzalk/ddd-in-ruby-on-rails