SlideShare a Scribd company logo
1 of 41
Download to read offline
Ruling dependencies in big
projects
Mykola Palamarchuk
Upwork
lividgreen@gmail.com
https://github.com/lividgreen
twitter: @lividgreen
1.
Growing projects
Strategy of successful owning
Growing projects
“
“Divide and conquer” is gaining
and maintaining power by
breaking up larger concentrations
of power into pieces that
individually have less power than
the one implementing the strategy.
Growing projects: divide and conquer concept
In politics and sociology, divide and conquer
concept refers to a strategy that breaks up
existing power structures and prevents
smaller power groups from linking up.
This concept is either useful in project
management.
➔ divide per persons
➔ divide per teams
Growing projects: dependencies
Project parts have
dependencies on
each other.
How should we rule
them all to prevent
our parts from
collapsing into
monolithic one?
“
Dependency hell is a colloquial
term for the frustration of some
software users who have installed
software packages which have
dependencies on specific versions
of other software packages.
Wikipedia
2.
Static PHP code
dependencies
Reaching a successful compilation
of all the project code parts
PHP code dependencies: retrospective
1. svn externals, git modules etc.
2. pear
3. custom solutions (like Symfony1 plugins)
4. composer
Composer
helps us to manage
dependencies of our
PHP code
Composer
◎ Written in PHP, portable
◎ A lot of features, configurable
◎ Based on semver.org specification
Semver
MAJOR.MINOR.PATCH
◎ Declare public API as precise as possible
○ precise and unambiguous
○ concise
○ complete
◎ Use only features from public API of other
libraries
○ public methods
○ documentation!
Semver and common mistakes
Dependencies of your dependencies are
not your own dependencies (may
disappear!)
Add all dependencies you use to your
composer.json
Breaking changes in minor/patch release
Release new patch with rollback
changes
Composer and dependency hell
◎ Composer doesn’t allow different versions
of packages installed together
◎ Composer resolves your dependencies very
well (with clear error messages)
Composer depends on few Symfony
Components itself.
Composer and dependency hell: solutions?
◎ Avoid dependencies?
We must explore the nature of code
dependencies before making a conclusion
Composer and Big Projects: HOWTO
★ Profess semver.org everywhere
★ Use Composer aliases
○ test your contributions to open-source libraries in
integration
○ test feature branches of your libraries in
integration
★ Use Satis/Toran Proxy
3.
Dynamic
dependencies
Managing your runtime
components
Components
Framework
Common
functionality to run
your application
parts
Module
(plugin/bundle/...)
Named and
separated part of
your application
functionality/resourc
es.
Service
Single named
instance (object,
function, ...) that can
do something useful.
Components: Examples
Framework Modularity Services
Symfony 2 Bundles +
Yii 2 Extensions components
Laravel Packages +
Zend Framework 2 Modules +
Components: Problems
◎ Decomposition to modules
◎ Dependencies between modules
◎ Configuration
OOP
Can we use it here?
Module as object
Module is an object!
◎ bundle initialization = bundle constructor
◎ configuration = constructor parameters
◎ provided services = getter methods
◎ dependencies = dependencies
○ services may be passed to “constructor”
○ setter injection (good or evil?)
○ global services (evil?)
S.O.L.I.D.
Dependency Inversion Principle
Modules should not depend on each other
explicitly (in code). Use common interfaces to
connect modules.
Dependency inversion
Module 1 Module 2Service Constructor
Interface
DI
Module, DIP and code
◎ Separate repository for interface
psr-3 (logging), psr-7 (http messaging)
◎ Separate repository for provider module
○ depends on interface repository
◎ Separate repository for consumer module
○ depends on interface repository
○ no code dependencies between modules
Remember composer dependency hell
problem? Here is the solution!
Module configuration
◎ Semantic configuration API
○ configuration is a part of module API
○ no global dependencies in module
◎ Configure them all in your application
configuration
○ pass parameters to bundles
○ resolve dependencies
Example: Symfony
# app/config/config.yml
services:
sms_sender:
class: HelloSmsSender
arguments:
- "localhost:1234" # gateway
contacts:
class: HelloContactManager
arguments:
- @sms_sender
- "/var/contacts/db.txt"
<?php
namespace HelloContact;
use HelloSmsSender;
class Manager {
//...
public function __construct(Sender $smsSender, $dbPath) {
$this->smsSender = $smsSender;
$this->dbPath = $dbPath;
}
// ...
}
Example: Symfony (2)
<?php
namespace HelloSms;
interface SenderInterface {
public function send($number, $message);
}
Let’s create interface in separate code
repository
Example: Symfony (3)
<?php
namespace HelloBundleContact;
use HelloSmsSenderInterface;
class Manager {
//...
public function __construct(SenderInterface $smsSender, $dbPath) {
$this->smsSender = $smsSender;
$this->dbPath = $dbPath;
}
// ...
}
<?php
namespace SmsBundleSms;
use HelloSmsSenderInterface;
class Sender implements SenderInterface {
//...
}
move class Manager to
HelloBundle
move class Sender to
SmsBundle
Example: Symfony (4)
# app/config/config.yml
sms: # SmsBundle configuration
gateway: "localhost:1234"
hello: # HelloBundle configuration
sms_sender_id: "sms_sender"
file: "/var/contacts/db.txt"
# SmsBundleResourcesconfigconfig.yml
services:
sms_sender:
class: SmsBundleSmsSender
arguments:
- %sms.gateway%
# HelloBundleResourcesconfigconfig.yml
services:
contacts:
class: HelloBundleContactManager
arguments:
- @hello.sms_sender
- %hello.file_path%
◎ main configuration doesn’t depend on
bundles specific
◎ main configuration is clear
◎ raw bundle dependencies are eliminated
Some work have to be done in bundles
configuration handlers (so called “extensions”
in Symfony)
Example: Laravel
<?php
namespace MyCompanySms;
use IlluminateSupportServiceProvider;
class SmsServiceProvider extends ServiceProvider
{
public function register()
{
$this->app['sms.sender'] = $this->app->share(function($app) {
$gateway = $app['config']['mycompany/sms::gateway'];
return new Sender($gateway);
});
}
}
Example: Laravel (2)
<?php
namespace MyCompanyContact;
use IlluminateSupportServiceProvider;
class ContactsServiceProvider extends ServiceProvider
{
public function register()
{
$this->app['contacts'] = $this->app->share(function($app) {
$senderId = $app['config']['mycompany/contact::sms_sender_id'];
$file = $app['config']['mycompany/contact::file'];
return new Manager($app[$senderId], $file);
});
}
}
Is there any specification for component models?
The OSGi specification describes a modular
system and a service platform for the Java
programming language that implements a
complete and dynamic component model.
This one is for Java, but you should read it to
improve your understanding.
Eclipse IDE is built over OSGi.
Advantage of OSGi: dynamic module loading.
4.
Microservices
Separation of responsibilities
Microservice architecture
Balancer
Application 1
http://myapp.com/personal
Application 2
http://myapp.com/enterprise
Microservice dependencies
Rules are the same:
◎ depend on API instead of service itself
◎ use semver.org
○ Apache Thrift for data transfer and versioning
○ Docs
◎ service discovery
○ Consul
Microservice configuration
Problem: change configuration
simultaneously for every service
Solution: use Consul (or similar solution)
Consul KV - key-value storage with REST API
Consul-Template - agent that regenerates
config files (may run “cache clear”)
5.
The end?
Uncovered problems
Advanced topics
◎ Affecting services lifecycle
◎ Dependencies of listeners/middleware
◎ Configuration origins and environments
◎ Configuration policies
◎ Cross-language dependencies (php + js)
◎ Module hierarchy
◎ Lazy service initialization (Symfony
session)
◎ Dependencies in testing
◎ ...
Thanks!
Any questions?
Credits
Special thanks to all the people who made and released
these awesome resources for free:
◎ Presentation template by SlidesCarnival

More Related Content

Viewers also liked

"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий ЛитвиненкоFwdays
 
"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий МантулаFwdays
 
Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Fwdays
 
"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр БаглайFwdays
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений БобровFwdays
 
Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Fwdays
 
Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Fwdays
 
"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan JongboomFwdays
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем ТритякFwdays
 
"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий МантулаFwdays
 
Михаил Чалый "Serverless Architectures using .NET and Azure"
Михаил Чалый "Serverless Architectures using .NET and Azure"Михаил Чалый "Serverless Architectures using .NET and Azure"
Михаил Чалый "Serverless Architectures using .NET and Azure"Fwdays
 
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир ЦукурFwdays
 
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей МоренецFwdays
 
Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Fwdays
 
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Fwdays
 
Антон Бойко "Azure Web Apps deep dive"
Антон Бойко "Azure Web Apps deep dive"Антон Бойко "Azure Web Apps deep dive"
Антон Бойко "Azure Web Apps deep dive"Fwdays
 
"Война типов: сильные против слабых" Виктор Полищук
"Война типов: сильные против слабых" Виктор Полищук"Война типов: сильные против слабых" Виктор Полищук
"Война типов: сильные против слабых" Виктор ПолищукFwdays
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис ЖучинскийFwdays
 
"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован"Reducers in Action" Антон Молдован
"Reducers in Action" Антон МолдованFwdays
 
Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"
 Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?" Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"
Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"Fwdays
 

Viewers also liked (20)

"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко
 
"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула
 
Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"
 
"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров
 
Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"
 
Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"
 
"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк
 
"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула
 
Михаил Чалый "Serverless Architectures using .NET and Azure"
Михаил Чалый "Serverless Architectures using .NET and Azure"Михаил Чалый "Serverless Architectures using .NET and Azure"
Михаил Чалый "Serverless Architectures using .NET and Azure"
 
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
 
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
 
Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"
 
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
 
Антон Бойко "Azure Web Apps deep dive"
Антон Бойко "Azure Web Apps deep dive"Антон Бойко "Azure Web Apps deep dive"
Антон Бойко "Azure Web Apps deep dive"
 
"Война типов: сильные против слабых" Виктор Полищук
"Война типов: сильные против слабых" Виктор Полищук"Война типов: сильные против слабых" Виктор Полищук
"Война типов: сильные против слабых" Виктор Полищук
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский
 
"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован
 
Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"
 Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?" Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"
Роман Сахаров "Stakeholders and expectations, или когда проекты успешны?"
 

Similar to Николай Паламарчук "Управление зависимостями в больших проектах"

"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsJuan Lopez
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desaijinaldesailive
 
Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Greg Szczotka
 
Tech challenges in a large scale agile project
Tech challenges in a large scale agile projectTech challenges in a large scale agile project
Tech challenges in a large scale agile projectHarald Soevik
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"GlobalLogic Ukraine
 
Drupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonDrupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonMediacurrent
 
Refreshing Domain Driven Design
Refreshing Domain Driven DesignRefreshing Domain Driven Design
Refreshing Domain Driven DesignAndré Borgonovo
 
Android coding guide lines
Android coding guide linesAndroid coding guide lines
Android coding guide lineslokeshG38
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_pptagnes_crepet
 
DTS s03e02 Handling the code
DTS s03e02 Handling the codeDTS s03e02 Handling the code
DTS s03e02 Handling the codeTuenti
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cfloraaluoch3
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSimon Gould
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMuhammad Ali
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patternsiasaglobal
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinDataArt
 

Similar to Николай Паламарчук "Управление зависимостями в больших проектах" (20)

"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and Patterns
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desai
 
Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014
 
Tech challenges in a large scale agile project
Tech challenges in a large scale agile projectTech challenges in a large scale agile project
Tech challenges in a large scale agile project
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
Drupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonDrupal 8 Vocabulary Lesson
Drupal 8 Vocabulary Lesson
 
Refreshing Domain Driven Design
Refreshing Domain Driven DesignRefreshing Domain Driven Design
Refreshing Domain Driven Design
 
Android coding guide lines
Android coding guide linesAndroid coding guide lines
Android coding guide lines
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_ppt
 
DTS s03e02 Handling the code
DTS s03e02 Handling the codeDTS s03e02 Handling the code
DTS s03e02 Handling the code
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile development
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Solid
SolidSolid
Solid
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
 

More from Fwdays

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...Fwdays
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil TopchiiFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro SpodaretsFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym KindritskyiFwdays
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...Fwdays
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...Fwdays
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...Fwdays
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...Fwdays
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...Fwdays
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...Fwdays
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...Fwdays
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...Fwdays
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra MyronovaFwdays
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...Fwdays
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...Fwdays
 

More from Fwdays (20)

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Николай Паламарчук "Управление зависимостями в больших проектах"

  • 1. Ruling dependencies in big projects Mykola Palamarchuk Upwork lividgreen@gmail.com https://github.com/lividgreen twitter: @lividgreen
  • 4. “ “Divide and conquer” is gaining and maintaining power by breaking up larger concentrations of power into pieces that individually have less power than the one implementing the strategy.
  • 5. Growing projects: divide and conquer concept In politics and sociology, divide and conquer concept refers to a strategy that breaks up existing power structures and prevents smaller power groups from linking up. This concept is either useful in project management. ➔ divide per persons ➔ divide per teams
  • 6. Growing projects: dependencies Project parts have dependencies on each other. How should we rule them all to prevent our parts from collapsing into monolithic one?
  • 7. “ Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages. Wikipedia
  • 8. 2. Static PHP code dependencies Reaching a successful compilation of all the project code parts
  • 9. PHP code dependencies: retrospective 1. svn externals, git modules etc. 2. pear 3. custom solutions (like Symfony1 plugins) 4. composer
  • 10. Composer helps us to manage dependencies of our PHP code
  • 11. Composer ◎ Written in PHP, portable ◎ A lot of features, configurable ◎ Based on semver.org specification
  • 12. Semver MAJOR.MINOR.PATCH ◎ Declare public API as precise as possible ○ precise and unambiguous ○ concise ○ complete ◎ Use only features from public API of other libraries ○ public methods ○ documentation!
  • 13. Semver and common mistakes Dependencies of your dependencies are not your own dependencies (may disappear!) Add all dependencies you use to your composer.json Breaking changes in minor/patch release Release new patch with rollback changes
  • 14. Composer and dependency hell ◎ Composer doesn’t allow different versions of packages installed together ◎ Composer resolves your dependencies very well (with clear error messages) Composer depends on few Symfony Components itself.
  • 15. Composer and dependency hell: solutions? ◎ Avoid dependencies? We must explore the nature of code dependencies before making a conclusion
  • 16. Composer and Big Projects: HOWTO ★ Profess semver.org everywhere ★ Use Composer aliases ○ test your contributions to open-source libraries in integration ○ test feature branches of your libraries in integration ★ Use Satis/Toran Proxy
  • 18. Components Framework Common functionality to run your application parts Module (plugin/bundle/...) Named and separated part of your application functionality/resourc es. Service Single named instance (object, function, ...) that can do something useful.
  • 19. Components: Examples Framework Modularity Services Symfony 2 Bundles + Yii 2 Extensions components Laravel Packages + Zend Framework 2 Modules +
  • 20. Components: Problems ◎ Decomposition to modules ◎ Dependencies between modules ◎ Configuration
  • 21. OOP Can we use it here?
  • 22. Module as object Module is an object! ◎ bundle initialization = bundle constructor ◎ configuration = constructor parameters ◎ provided services = getter methods ◎ dependencies = dependencies ○ services may be passed to “constructor” ○ setter injection (good or evil?) ○ global services (evil?)
  • 23. S.O.L.I.D. Dependency Inversion Principle Modules should not depend on each other explicitly (in code). Use common interfaces to connect modules.
  • 24. Dependency inversion Module 1 Module 2Service Constructor Interface DI
  • 25. Module, DIP and code ◎ Separate repository for interface psr-3 (logging), psr-7 (http messaging) ◎ Separate repository for provider module ○ depends on interface repository ◎ Separate repository for consumer module ○ depends on interface repository ○ no code dependencies between modules Remember composer dependency hell problem? Here is the solution!
  • 26. Module configuration ◎ Semantic configuration API ○ configuration is a part of module API ○ no global dependencies in module ◎ Configure them all in your application configuration ○ pass parameters to bundles ○ resolve dependencies
  • 27. Example: Symfony # app/config/config.yml services: sms_sender: class: HelloSmsSender arguments: - "localhost:1234" # gateway contacts: class: HelloContactManager arguments: - @sms_sender - "/var/contacts/db.txt" <?php namespace HelloContact; use HelloSmsSender; class Manager { //... public function __construct(Sender $smsSender, $dbPath) { $this->smsSender = $smsSender; $this->dbPath = $dbPath; } // ... }
  • 28. Example: Symfony (2) <?php namespace HelloSms; interface SenderInterface { public function send($number, $message); } Let’s create interface in separate code repository
  • 29. Example: Symfony (3) <?php namespace HelloBundleContact; use HelloSmsSenderInterface; class Manager { //... public function __construct(SenderInterface $smsSender, $dbPath) { $this->smsSender = $smsSender; $this->dbPath = $dbPath; } // ... } <?php namespace SmsBundleSms; use HelloSmsSenderInterface; class Sender implements SenderInterface { //... } move class Manager to HelloBundle move class Sender to SmsBundle
  • 30. Example: Symfony (4) # app/config/config.yml sms: # SmsBundle configuration gateway: "localhost:1234" hello: # HelloBundle configuration sms_sender_id: "sms_sender" file: "/var/contacts/db.txt" # SmsBundleResourcesconfigconfig.yml services: sms_sender: class: SmsBundleSmsSender arguments: - %sms.gateway% # HelloBundleResourcesconfigconfig.yml services: contacts: class: HelloBundleContactManager arguments: - @hello.sms_sender - %hello.file_path% ◎ main configuration doesn’t depend on bundles specific ◎ main configuration is clear ◎ raw bundle dependencies are eliminated Some work have to be done in bundles configuration handlers (so called “extensions” in Symfony)
  • 31. Example: Laravel <?php namespace MyCompanySms; use IlluminateSupportServiceProvider; class SmsServiceProvider extends ServiceProvider { public function register() { $this->app['sms.sender'] = $this->app->share(function($app) { $gateway = $app['config']['mycompany/sms::gateway']; return new Sender($gateway); }); } }
  • 32. Example: Laravel (2) <?php namespace MyCompanyContact; use IlluminateSupportServiceProvider; class ContactsServiceProvider extends ServiceProvider { public function register() { $this->app['contacts'] = $this->app->share(function($app) { $senderId = $app['config']['mycompany/contact::sms_sender_id']; $file = $app['config']['mycompany/contact::file']; return new Manager($app[$senderId], $file); }); } }
  • 33. Is there any specification for component models? The OSGi specification describes a modular system and a service platform for the Java programming language that implements a complete and dynamic component model. This one is for Java, but you should read it to improve your understanding. Eclipse IDE is built over OSGi. Advantage of OSGi: dynamic module loading.
  • 36. Microservice dependencies Rules are the same: ◎ depend on API instead of service itself ◎ use semver.org ○ Apache Thrift for data transfer and versioning ○ Docs ◎ service discovery ○ Consul
  • 37. Microservice configuration Problem: change configuration simultaneously for every service Solution: use Consul (or similar solution) Consul KV - key-value storage with REST API Consul-Template - agent that regenerates config files (may run “cache clear”)
  • 39. Advanced topics ◎ Affecting services lifecycle ◎ Dependencies of listeners/middleware ◎ Configuration origins and environments ◎ Configuration policies ◎ Cross-language dependencies (php + js) ◎ Module hierarchy ◎ Lazy service initialization (Symfony session) ◎ Dependencies in testing ◎ ...
  • 41. Credits Special thanks to all the people who made and released these awesome resources for free: ◎ Presentation template by SlidesCarnival