際際滷

際際滷Share a Scribd company logo
Service
Objects
Evolution
by @andriymosin
1
01
Service Objects benefits
What we trying to solve
04 Existing realizations
Gems, best practices and
ideas
03 What we want
Unification, Validation,
Combinations, etc.
02 What we had
Pretty basic object
05 What we have for now
Our current realization
01
next
Why use
Service
Objects?
2
next3
1. Atomic operations only
2. Encapsulate all logic
4. Easy to test
3. Easy to manage
5. Best place to put business logic
0. MVC is not enough
02
next
What we had
at the
beginning
4
next5
Basic implementation
next6
Usage
next
Service
Unification
7
1. Same action method name in all service objects
2. Only one public method in object
3. Result should always be true || false
4. No returns inside Service Objects
next
And we start our first big refactoring
8
03
next
What we want
to have in our
Service
Objects
9
next
Our needs
10
1. Data Creating
2. Data Updating
3. Combination
4. Validation
5. Callbacks(success, error)
next
Data
create
&
update
11
next
Combi
nation
12
next
Validations
13
1. Input
1. Required
2. Optional
2. Output
1. Required
2. Optional
04
next
Existing
realizations
14
next15
1. Interactor
2. Light Service
3. ActiveInteraction
4. Mutations
05
next
What we have
for now
16
next
Own implementation
17
with Black Jack and unicorns
https://github.com/rubakas/cater
next18
First step was to make
architecture and main
decisions about it
1. Modularity
2. Callbacks(success, error)
next19
next20
next21
next22
next23
next24
next
120!!!!!
25
30
60
90
120
150
Jul Sep Jan May
Services Refactoring
next
More services == More refactoring
Refactoring
time
increase
26
next27
Now we have callbacks and
platform for next
experiments
So its time for better
error handler and
validations
next
Errors
28
next
Plan to throw one
(implementation)
away; you will,
anyhow.
- Fred Brooks
29
next30
Validations
next
Modular implementation with
custom rules
31
next32
next33
next34
next
Virtus
35
next36
next37
Next
Milestone
next38
next39
close
Thank
YouPresenter: Andriy Mosin
http://moxa.io/
@andriymosin

More Related Content

Similar to Service Objects Evolution (20)

Machine learning pipeline
Machine learning pipelineMachine learning pipeline
Machine learning pipeline
Vadym Kuzmenko
06 the pipeline-deeper
06  the pipeline-deeper06  the pipeline-deeper
06 the pipeline-deeper
Shubham Atkare
Test driven development
Test driven developmentTest driven development
Test driven development
namkha87
Grails Services
Grails ServicesGrails Services
Grails Services
NexThoughts Technologies
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey Shannahan
QA or the Highway
Learn SoapUI
Learn SoapUILearn SoapUI
Learn SoapUI
David Ionut
03 setting up database server sample
03   setting up database server sample03   setting up database server sample
03 setting up database server sample
Sarath Chandra Aravapalli
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
Mike Martin
Presentation 1.pptx
Presentation 1.pptxPresentation 1.pptx
Presentation 1.pptx
Rich Alex
Top SharePoint Issues SPS Event New Hampshire 2014
Top SharePoint Issues SPS Event New Hampshire 2014Top SharePoint Issues SPS Event New Hampshire 2014
Top SharePoint Issues SPS Event New Hampshire 2014
Serge Tremblay
Less18 Patching oracle dba 11g
Less18 Patching oracle dba 11gLess18 Patching oracle dba 11g
Less18 Patching oracle dba 11g
vivaankumar
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-osDt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
CERTyou Formation
Secure mvc application saineshwar
Secure mvc application   saineshwarSecure mvc application   saineshwar
Secure mvc application saineshwar
Saineshwar bageri
Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
Project Server 2010 and Sharepoint 2010 integration with BI
Project Server 2010 and Sharepoint 2010 integration with BIProject Server 2010 and Sharepoint 2010 integration with BI
Project Server 2010 and Sharepoint 2010 integration with BI
parallelminder
Mailing Website
Mailing WebsiteMailing Website
Mailing Website
Mohammed Sajid
Geek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
Geek Sync | Kick Start SQL Server 2016 Performance Tips and TricksGeek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
Geek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
IDERA Software
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineer
Sadaaki Emura
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, PakistanTraining on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Naz Ish
Top 7 Mistakes in Performance Testing
Top 7 Mistakes in Performance TestingTop 7 Mistakes in Performance Testing
Top 7 Mistakes in Performance Testing
stuartmoncrieff
Machine learning pipeline
Machine learning pipelineMachine learning pipeline
Machine learning pipeline
Vadym Kuzmenko
06 the pipeline-deeper
06  the pipeline-deeper06  the pipeline-deeper
06 the pipeline-deeper
Shubham Atkare
Test driven development
Test driven developmentTest driven development
Test driven development
namkha87
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey Shannahan
QA or the Highway
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
TechORama : The Toolshed: Inside Windows Azure Tools : Monaco and other tooli...
Mike Martin
Presentation 1.pptx
Presentation 1.pptxPresentation 1.pptx
Presentation 1.pptx
Rich Alex
Top SharePoint Issues SPS Event New Hampshire 2014
Top SharePoint Issues SPS Event New Hampshire 2014Top SharePoint Issues SPS Event New Hampshire 2014
Top SharePoint Issues SPS Event New Hampshire 2014
Serge Tremblay
Less18 Patching oracle dba 11g
Less18 Patching oracle dba 11gLess18 Patching oracle dba 11g
Less18 Patching oracle dba 11g
vivaankumar
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-osDt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
Dt812 g formation-infosphere-optim-test-data-management-and-data-masking-on-z-os
CERTyou Formation
Secure mvc application saineshwar
Secure mvc application   saineshwarSecure mvc application   saineshwar
Secure mvc application saineshwar
Saineshwar bageri
Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)Angular Hydration Presentation (FrontEnd)
Angular Hydration Presentation (FrontEnd)
Knoldus Inc.
Project Server 2010 and Sharepoint 2010 integration with BI
Project Server 2010 and Sharepoint 2010 integration with BIProject Server 2010 and Sharepoint 2010 integration with BI
Project Server 2010 and Sharepoint 2010 integration with BI
parallelminder
Geek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
Geek Sync | Kick Start SQL Server 2016 Performance Tips and TricksGeek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
Geek Sync | Kick Start SQL Server 2016 Performance Tips and Tricks
IDERA Software
Test automation engineer
Test automation engineerTest automation engineer
Test automation engineer
Sadaaki Emura
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, PakistanTraining on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Naz Ish
Top 7 Mistakes in Performance Testing
Top 7 Mistakes in Performance TestingTop 7 Mistakes in Performance Testing
Top 7 Mistakes in Performance Testing
stuartmoncrieff

Recently uploaded (20)

Agentic AI: The 2025 Next-Gen Automation Guide
Agentic AI: The 2025 Next-Gen Automation GuideAgentic AI: The 2025 Next-Gen Automation Guide
Agentic AI: The 2025 Next-Gen Automation Guide
Thoughtminds
Artificial Intelligence Quick Research Guide by Arthur Morgan
Artificial Intelligence Quick Research Guide by Arthur MorganArtificial Intelligence Quick Research Guide by Arthur Morgan
Artificial Intelligence Quick Research Guide by Arthur Morgan
Arthur Morgan
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional RenownedWilliam Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
katalinjordans1
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
2025-02-24 - AWS meetup - Zilliz presentation.pdf
2025-02-24 - AWS meetup - Zilliz presentation.pdf2025-02-24 - AWS meetup - Zilliz presentation.pdf
2025-02-24 - AWS meetup - Zilliz presentation.pdf
Ivan Tang
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
IT Industry
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
BookNet Canada
Supercharge Your Career with UiPath Certifications
Supercharge Your Career with UiPath CertificationsSupercharge Your Career with UiPath Certifications
Supercharge Your Career with UiPath Certifications
DianaGray10
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdfSECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
spub1985
Caching for Performance Masterclass: Caching Strategies
Caching for Performance Masterclass: Caching StrategiesCaching for Performance Masterclass: Caching Strategies
Caching for Performance Masterclass: Caching Strategies
ScyllaDB
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data ProcessingBedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Zilliz
Blockchain for Businesses Practical Use Cases & Benefits.pdf
Blockchain for Businesses Practical Use Cases & Benefits.pdfBlockchain for Businesses Practical Use Cases & Benefits.pdf
Blockchain for Businesses Practical Use Cases & Benefits.pdf
Yodaplus Technologies Private Limited
SB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure ServicesSB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure Services
Reuben Jasper
AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
5 Must-Use AI Tools to Supercharge Your Productivity
5 Must-Use AI Tools to Supercharge Your Productivity5 Must-Use AI Tools to Supercharge Your Productivity
5 Must-Use AI Tools to Supercharge Your Productivity
cryptouniversityoffi
Temporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptxTemporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptx
Samir Sharma
Agentic AI: The 2025 Next-Gen Automation Guide
Agentic AI: The 2025 Next-Gen Automation GuideAgentic AI: The 2025 Next-Gen Automation Guide
Agentic AI: The 2025 Next-Gen Automation Guide
Thoughtminds
Artificial Intelligence Quick Research Guide by Arthur Morgan
Artificial Intelligence Quick Research Guide by Arthur MorganArtificial Intelligence Quick Research Guide by Arthur Morgan
Artificial Intelligence Quick Research Guide by Arthur Morgan
Arthur Morgan
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional RenownedWilliam Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
2025-02-27 Tech & Play_ Fun, UX, and Community.pdf
katalinjordans1
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
2025-02-24 - AWS meetup - Zilliz presentation.pdf
2025-02-24 - AWS meetup - Zilliz presentation.pdf2025-02-24 - AWS meetup - Zilliz presentation.pdf
2025-02-24 - AWS meetup - Zilliz presentation.pdf
Ivan Tang
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU鏝媜ご垂鏝乞 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
IT Industry
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
BookNet Canada
Supercharge Your Career with UiPath Certifications
Supercharge Your Career with UiPath CertificationsSupercharge Your Career with UiPath Certifications
Supercharge Your Career with UiPath Certifications
DianaGray10
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdfSECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
SECURE BLOCKCHAIN FOR ADMISSION PROCESSING IN EDUCATIONAL INSTITUTIONS.pdf
spub1985
Caching for Performance Masterclass: Caching Strategies
Caching for Performance Masterclass: Caching StrategiesCaching for Performance Masterclass: Caching Strategies
Caching for Performance Masterclass: Caching Strategies
ScyllaDB
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data ProcessingBedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Zilliz
SB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure ServicesSB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure Services
Reuben Jasper
AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
5 Must-Use AI Tools to Supercharge Your Productivity
5 Must-Use AI Tools to Supercharge Your Productivity5 Must-Use AI Tools to Supercharge Your Productivity
5 Must-Use AI Tools to Supercharge Your Productivity
cryptouniversityoffi
Temporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptxTemporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptx
Samir Sharma

Service Objects Evolution