SlideShare a Scribd company logo
1 of 14
Why should we use SIMPLE FACTORY pattern
even when we have one class only?
Based on DateTime (PHP) and PHPUnit
by Rafal Ksiazek, IT Leader
https://github.com/harpcio
Real example (or maybe not):
Application for an airline company
based in Europe
Requirements:
…
User should be able to create a flight route
...
Without SF With SF
public function createFlightRoute(User $user, $startTime, ...)
{
$route = new FlightRoute();
$route->setCreateTime(new DateTime());
$route->setStartTime(new DateTime($startTime));
$route->setEndTime(new DateTime($endTime));
$route->setStartPlace($startPlace);
$route->setEndPlace($endPlace);
$route->setCargo($cargo);
$route->setCreatedBy($user);
...
return $route;
}
class DateTimeFactory implements DateTimeFactoryInterface
{
public function create(
$time = 'now', DateTimeZone $timeZone = null
) {
return new DateTime($time, $timeZone);
}
}
…
public function __construct(..., DateTimeFactoryInterface $dateTimeFactory)
{
….
$this->dateTimeFactory = $dateTimeFactory;
}
public function createFlightRoute(User $user, $startTime, ...)
{
$route = new FlightRoute();
$route->setCreateTime($this->dateTimeFactory->create());
$route->setStartTime($this->dateTimeFactory->create($startTime));
$route->setEndTime($this->dateTimeFactory->create($endTime));
$route->setStartPlace($startPlace);
$route->setEndPlace($endPlace);
$route->setCargo($cargo);
$route->setCreatedBy($user);
...
return $route;
}
There is one thing we can be sure of:
CHANGE
So be prepared!
New client requirement!
Move our application to the new
powerful dedicated server
in US (Detroit)
The programmer copies the code and databases,
checks that everything works (twice!)
… but he forgets about timezones
A few hours later, first unhappy customers began to call the company
The blocker task!
The programmer changes the timezone on Detroit's server to European
timezone in one minute!
But we got
new client requirement!
For security, application should be independent of
the server's timezone
Without SF With SF
… somewhere in configuration
define('APP_TIME_ZONE', 'Europe/NoExistingCity')
… in „n” classes:
public function createFlightRoute(User $user, $startTime, ...)
{
$route = new FlightRoute();
$route->setCreateTime(
new DateTime('now', new DateTimeZone(APP_TIME_ZONE))
);
$route->setStartTime(
new DateTime($startTime, DateTimeZone(APP_TIME_ZONE))
);
$route->setEndTime(
new DateTime($endTime, DateTimeZone(APP_TIME_ZONE))
);
$route->setStartPlace($startPlace);
$route->setEndPlace($endPlace);
$route->setCargo($cargo);
$route->setCreatedBy($user);
...
return $route;
}
… somewhere in configuration
define('APP_TIME_ZONE', 'Europe/NoExistingCity')
… in only ONE class:
class DateTimeFactory implements DateTimeFactoryInterface
{
public function create($time = 'now', DateTimeZone $timeZone = null) {
if (null === $timeZone) {
$timeZone = new DateTimeZone(APP_TIME_ZONE);
}
return new DateTime($time, $timeZone);
}
}
… after hours of discussion and calculation of the cost of the failure, we got:
New client requirement!
All functionalities based on dates
should be fully tested
Without SF With SF
… in the test class:
public function setUp() {
$this->testedObject = ...
}
public function testCreateFlightRoute() {
$createTime = new DateTime('now', DateTimeZone(APP_TIME_ZONE));
$result = $this->testedObject->createFlightRoute($user, $startTime, ...);
$this->assertSame(
$result->getCreateTime()->format('Y-m-d H:i:s'),
$createTime->format('Y-m-d H:i:s')
);
}
But sometimes our tests are FAILED!
Someone know why?
… in the test class:
public function setUp() {
$this->testedObject = ...
}
public function testCreateFlightRoute() {
$this->dateTimeFactoryMock = $this->getMock(...)
$createTime = new DateTime('now', APP_TIME_ZONE);
$this->dateTimeFactoryMock->expects($this->at(0))
->method('create')
->willReturn($createTime);
$result = $this->testedObject->createFlightRoute($user, $startTime, ...);
$this->assertSame($result->getCreateTime(), $createTime);
}
Always PASSED!
Without SF With SF
Pros:
● We'll build our application „faster”*
(initially, anyway)
* yes, couple of minutes less per class is really an irrefutable fact
Cons:
● Each change will cost us a lot:
– time for implementation & bugs fixing
– customer confidence
– money
● When we'll start writing tests - we'll have to use
simple factory
– otherwise we will have broken builds from time to
time
Pros:
● We're saving (days|hours|minutes) of our time,
but also our client’s time (bugs)
– Do you remember the "n" classes we had to
change?
– In how many places can we potentially make
mistakes that way? How much time will we spend on
manual testing of all classes that we've changed?
● We can write tests for our classes in a proper
way - we will not have any failed builds ever
Cons:
● We need 1-3 minutes to create simply factory
class and inject it into our class
But what about creating not breakable tests?
class DateTimeFactoryMock() implements DataTimeFactoryInterface
{
public function __construct(array $nowTimes)
{
$this->nowTimes = $nowTimes;
}
public function create($time = 'now', DateTimeZone $timeZone = null)
{
if (null === $timeZone) {
$timeZone = new DateTimeZone(APP_TIME_ZONE);
}
if ('now' === $time) {
$time = array_shift($this->nowTimes);
}
return new DateTime($time, $timeZone);
}
}
... in test class
public function setUp()
{
$this->nowTime1 = '2012-01-01 12:00:00';
$dateTimeFactory = new DateTimeFactoryMock([$this->nowTime1]);
$this->testedObject = new AirRouteManager($dateTimeFactory);
}
public function testCreateFlightRoute()
{
$result = $this->testedObject->createFlightRoute($user, $startTime, ...);
...
$this->assertSame($result->getCreateTime()->format('Y-m-d H:i:s'), $this->nowTime1);
}
What about KISS
Simple Factory classes are very simple and stupid,
but I can obviously come up with an even simpler
and stupider class..
class A() {
public function doNothing() {
// yeah, this method really does nothing!
}
}
...but I'm afraid, that this class won't do us much good
What about YAGNI
Yes, YAGNI is about functionalities.. and we'll use
this functionality everywhere!
Yes! Everywhere, where we want the new
instances..
Thank you very much
for waching!

More Related Content

What's hot

Real world scala
Real world scalaReal world scala
Real world scala
lunfu zhong
 
Distributed work with Gearman
Distributed work with GearmanDistributed work with Gearman
Distributed work with Gearman
Dominik Jungowski
 

What's hot (20)

Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
Ps installedsoftware
Ps installedsoftwarePs installedsoftware
Ps installedsoftware
 
Cappuccino @ JSConf 2009
Cappuccino @ JSConf 2009Cappuccino @ JSConf 2009
Cappuccino @ JSConf 2009
 
week-2x
week-2xweek-2x
week-2x
 
What's new in iOS9
What's new in iOS9What's new in iOS9
What's new in iOS9
 
Oop in java script
Oop in java scriptOop in java script
Oop in java script
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
Real world scala
Real world scalaReal world scala
Real world scala
 
Wakanday JS201 Best Practices
Wakanday JS201 Best PracticesWakanday JS201 Best Practices
Wakanday JS201 Best Practices
 
Debugging JavaScript with Chrome
Debugging JavaScript with ChromeDebugging JavaScript with Chrome
Debugging JavaScript with Chrome
 
GCD in Action
GCD in ActionGCD in Action
GCD in Action
 
ZIO Queue
ZIO QueueZIO Queue
ZIO Queue
 
Distributed work with Gearman
Distributed work with GearmanDistributed work with Gearman
Distributed work with Gearman
 
week-1x
week-1xweek-1x
week-1x
 
week-10x
week-10xweek-10x
week-10x
 
Monads in javascript
Monads in javascriptMonads in javascript
Monads in javascript
 
Why MacRuby Matters
Why MacRuby MattersWhy MacRuby Matters
Why MacRuby Matters
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
Lecture05
Lecture05Lecture05
Lecture05
 
4Developers 2015: Clean JavaScript code - only dream or reality - Sebastian Ł...
4Developers 2015: Clean JavaScript code - only dream or reality - Sebastian Ł...4Developers 2015: Clean JavaScript code - only dream or reality - Sebastian Ł...
4Developers 2015: Clean JavaScript code - only dream or reality - Sebastian Ł...
 

Similar to Why should we use SIMPLE FACTORY pattern even when we have one class only?

Similar to Why should we use SIMPLE FACTORY pattern even when we have one class only? (20)

Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
How to write not breakable unit tests
How to write not breakable unit testsHow to write not breakable unit tests
How to write not breakable unit tests
 
Why should we use an INTERFACE even when we only have one concrete class?
Why should we use an INTERFACE even when we only have one concrete class?Why should we use an INTERFACE even when we only have one concrete class?
Why should we use an INTERFACE even when we only have one concrete class?
 
PHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodePHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better Code
 
4Developers 2015: Be pragmatic, be SOLID - Krzysztof Menżyk
4Developers 2015: Be pragmatic, be SOLID - Krzysztof Menżyk4Developers 2015: Be pragmatic, be SOLID - Krzysztof Menżyk
4Developers 2015: Be pragmatic, be SOLID - Krzysztof Menżyk
 
Be pragmatic, be SOLID
Be pragmatic, be SOLIDBe pragmatic, be SOLID
Be pragmatic, be SOLID
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13
 
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenariosWhy is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenarios
 
Time-driven applications
Time-driven applicationsTime-driven applications
Time-driven applications
 
Применение паттерна Page Object для автоматизации веб сервисов
Применение паттерна Page Object для автоматизации веб сервисовПрименение паттерна Page Object для автоматизации веб сервисов
Применение паттерна Page Object для автоматизации веб сервисов
 
Symfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with easeSymfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with ease
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
 
Zend framework service
Zend framework serviceZend framework service
Zend framework service
 
Zend framework service
Zend framework serviceZend framework service
Zend framework service
 
Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)
 
Easy rest service using PHP reflection api
Easy rest service using PHP reflection apiEasy rest service using PHP reflection api
Easy rest service using PHP reflection api
 
WordPress REST API hacking
WordPress REST API hackingWordPress REST API hacking
WordPress REST API hacking
 
Pragmatic Functional Refactoring with Java 8
Pragmatic Functional Refactoring with Java 8Pragmatic Functional Refactoring with Java 8
Pragmatic Functional Refactoring with Java 8
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 

Why should we use SIMPLE FACTORY pattern even when we have one class only?

  • 1. Why should we use SIMPLE FACTORY pattern even when we have one class only? Based on DateTime (PHP) and PHPUnit by Rafal Ksiazek, IT Leader https://github.com/harpcio
  • 2. Real example (or maybe not): Application for an airline company based in Europe Requirements: … User should be able to create a flight route ...
  • 3. Without SF With SF public function createFlightRoute(User $user, $startTime, ...) { $route = new FlightRoute(); $route->setCreateTime(new DateTime()); $route->setStartTime(new DateTime($startTime)); $route->setEndTime(new DateTime($endTime)); $route->setStartPlace($startPlace); $route->setEndPlace($endPlace); $route->setCargo($cargo); $route->setCreatedBy($user); ... return $route; } class DateTimeFactory implements DateTimeFactoryInterface { public function create( $time = 'now', DateTimeZone $timeZone = null ) { return new DateTime($time, $timeZone); } } … public function __construct(..., DateTimeFactoryInterface $dateTimeFactory) { …. $this->dateTimeFactory = $dateTimeFactory; } public function createFlightRoute(User $user, $startTime, ...) { $route = new FlightRoute(); $route->setCreateTime($this->dateTimeFactory->create()); $route->setStartTime($this->dateTimeFactory->create($startTime)); $route->setEndTime($this->dateTimeFactory->create($endTime)); $route->setStartPlace($startPlace); $route->setEndPlace($endPlace); $route->setCargo($cargo); $route->setCreatedBy($user); ... return $route; }
  • 4. There is one thing we can be sure of: CHANGE So be prepared!
  • 5. New client requirement! Move our application to the new powerful dedicated server in US (Detroit) The programmer copies the code and databases, checks that everything works (twice!) … but he forgets about timezones A few hours later, first unhappy customers began to call the company
  • 6. The blocker task! The programmer changes the timezone on Detroit's server to European timezone in one minute! But we got new client requirement! For security, application should be independent of the server's timezone
  • 7. Without SF With SF … somewhere in configuration define('APP_TIME_ZONE', 'Europe/NoExistingCity') … in „n” classes: public function createFlightRoute(User $user, $startTime, ...) { $route = new FlightRoute(); $route->setCreateTime( new DateTime('now', new DateTimeZone(APP_TIME_ZONE)) ); $route->setStartTime( new DateTime($startTime, DateTimeZone(APP_TIME_ZONE)) ); $route->setEndTime( new DateTime($endTime, DateTimeZone(APP_TIME_ZONE)) ); $route->setStartPlace($startPlace); $route->setEndPlace($endPlace); $route->setCargo($cargo); $route->setCreatedBy($user); ... return $route; } … somewhere in configuration define('APP_TIME_ZONE', 'Europe/NoExistingCity') … in only ONE class: class DateTimeFactory implements DateTimeFactoryInterface { public function create($time = 'now', DateTimeZone $timeZone = null) { if (null === $timeZone) { $timeZone = new DateTimeZone(APP_TIME_ZONE); } return new DateTime($time, $timeZone); } }
  • 8. … after hours of discussion and calculation of the cost of the failure, we got: New client requirement! All functionalities based on dates should be fully tested
  • 9. Without SF With SF … in the test class: public function setUp() { $this->testedObject = ... } public function testCreateFlightRoute() { $createTime = new DateTime('now', DateTimeZone(APP_TIME_ZONE)); $result = $this->testedObject->createFlightRoute($user, $startTime, ...); $this->assertSame( $result->getCreateTime()->format('Y-m-d H:i:s'), $createTime->format('Y-m-d H:i:s') ); } But sometimes our tests are FAILED! Someone know why? … in the test class: public function setUp() { $this->testedObject = ... } public function testCreateFlightRoute() { $this->dateTimeFactoryMock = $this->getMock(...) $createTime = new DateTime('now', APP_TIME_ZONE); $this->dateTimeFactoryMock->expects($this->at(0)) ->method('create') ->willReturn($createTime); $result = $this->testedObject->createFlightRoute($user, $startTime, ...); $this->assertSame($result->getCreateTime(), $createTime); } Always PASSED!
  • 10. Without SF With SF Pros: ● We'll build our application „faster”* (initially, anyway) * yes, couple of minutes less per class is really an irrefutable fact Cons: ● Each change will cost us a lot: – time for implementation & bugs fixing – customer confidence – money ● When we'll start writing tests - we'll have to use simple factory – otherwise we will have broken builds from time to time Pros: ● We're saving (days|hours|minutes) of our time, but also our client’s time (bugs) – Do you remember the "n" classes we had to change? – In how many places can we potentially make mistakes that way? How much time will we spend on manual testing of all classes that we've changed? ● We can write tests for our classes in a proper way - we will not have any failed builds ever Cons: ● We need 1-3 minutes to create simply factory class and inject it into our class
  • 11. But what about creating not breakable tests? class DateTimeFactoryMock() implements DataTimeFactoryInterface { public function __construct(array $nowTimes) { $this->nowTimes = $nowTimes; } public function create($time = 'now', DateTimeZone $timeZone = null) { if (null === $timeZone) { $timeZone = new DateTimeZone(APP_TIME_ZONE); } if ('now' === $time) { $time = array_shift($this->nowTimes); } return new DateTime($time, $timeZone); } } ... in test class public function setUp() { $this->nowTime1 = '2012-01-01 12:00:00'; $dateTimeFactory = new DateTimeFactoryMock([$this->nowTime1]); $this->testedObject = new AirRouteManager($dateTimeFactory); } public function testCreateFlightRoute() { $result = $this->testedObject->createFlightRoute($user, $startTime, ...); ... $this->assertSame($result->getCreateTime()->format('Y-m-d H:i:s'), $this->nowTime1); }
  • 12. What about KISS Simple Factory classes are very simple and stupid, but I can obviously come up with an even simpler and stupider class.. class A() { public function doNothing() { // yeah, this method really does nothing! } } ...but I'm afraid, that this class won't do us much good
  • 13. What about YAGNI Yes, YAGNI is about functionalities.. and we'll use this functionality everywhere! Yes! Everywhere, where we want the new instances..
  • 14. Thank you very much for waching!