WPS - Workplace Solutions GmbH //// Hans-Henny-Jahnn-Weg 29 //// 22085 HAMBURG
Reducing technical debts in PHP
Dr. Carola Lilienthal
Carola.Lilienthal@wps.de, @cairolali
www.wps.de
Wolfgang Strunk
Wolfgang.Strunk@sixt.com
Sixt Leasing AG
2
Mobility services provider with highly attractive and
customer centric product offering
Mid-sized and large corporates Private and business customersCustomer focus
Full Service Leasing Fleet Management
Leasing / Vario Financing
+ Services
Key products
~50k(2) ~31k ~16k(2)# of contracts 2014
Total: ~97k(1)
Value proposition
One-Stop-Online-Shop for >30 OEMs
• Price
• Transparency
• Convenience
OEM independent optimization of Total Cost of Ownership (TCO)
• Know-how
• Buying power
• Outsourcing
Sixt Leasing AG
(1) Each Sixt Leasing vehicle is linked to one contract. However, not all contracts refer to a Sixt Leasing vehicle (e.g. Fleet Management). Hence, the total number
of vehicles (~54k in 2014) is typically lower than the total number of contracts
(2) The contracts include new contracts (order book) for which the leased vehicle has not yet been delivered to the customer and pure service contracts
Contract CAGR
2012-2014
2% 111% 54%
Fleet Leasing Fleet Management Online Retail
26.04.2016 //// Seite 3WPS - Workplace Solutions GmbH
Software
Architecture
Requirement
Engineering
Control Room
and Interaction
Software
Development
Business software,
for joyfull work!
WPS – Workplace Solutions GmbH
4
Proprietary data and software development across the
value chain as key competitive advantage
Quote Procurement Contract Length ReturnProcess Level 1
Process Level 2
Tender &
Implementation
Vehicle
Order
Vehicle
Logistics
Vehicle
Handover
Final
Invoices
Quotes
Vehicle
Return
Invoices
Vehicle
Disposal
Customer Service
User
Service
Order configuration Vehicle transport
Delivery station
Registration Fuel invoicing
Lease- & full service invoiceParking ticket management
Driver license check
Contract adjustment
Early return
Order management Handover to the station
Validity check
Customer/ User change
Delivery date coordination
Order changes
Reference calculation Cancellation
Incoming invoices (Check & enter, debit)
Pricing
Quotation negotiations
Breakdown service Return to retailer
Self-marketingAppraisalHandover to the retailer
Delivery
Collective invoicing
Return logistics
Return damage invoice
Final invoicing
Vehicle invoices
Fuel card service
Contract changes
Maintenance& attrition
Damage processing
Tire change & replacement
Residual value factors Order checks Work shop routing
Preliminary rental vehicle
Implementation
Damage invoicingActivation of contract
Return letter
Leasing request & contract check
Web portal & parameter keeping Reports & analyses (Customer demands)
Resignation from contract Cancellation by customerPurchasing
Software Modules
Customer facing
Internal
Source: Company information
26.04.2016 //// Seite 5WPS - Workplace Solutions GmbH
26.04.2016 //// Seite 6WPS - Workplace Solutions GmbH
Technical Debts ≠ Long-living
26.04.2016 //// Seite 7WPS - Workplace Solutions GmbH
Measures against technical debts
Regular architecture discussions
Qualification for developers and architects
Automated tests and continuously refactoring
Regular architecture analysis and renovation
26.04.2016 //// Seite 8WPS - Workplace Solutions GmbH
Architektur analysis: What is this?
26.04.2016 //// Seite 9WPS - Workplace Solutions GmbH
Architecture renovation: how do we do that?
Refactorings
Analysis
+
Discussion
Determination
f measures
Implemented
Architecture
Reconstruction
Source-
Code
Planned
Architecture
Architecture
Alternatives
Violations
26.04.2016 //// Seite 10WPS - Workplace Solutions GmbH
Sotograph
Plattform for Architecture
Renovation
Commercial product since 2002
Many customers, e.g.
Siemens, Lufthansa, HHLA,
Kühne&Nagel, Daimler,
Infineon
Analyses Java, C++, C#, ABAP,
PHP and offers an open
interface for other parsers
www.hello2morrow.de
26.04.2016 //// Seite 11WPS - Workplace Solutions GmbH
Components of sotograph
Java
Parser
Soto
Reposi-
tory
C#
Parser
Code-
Checker
C/C++
Parser
Sotoweb
Sotoarc
Sotograph
Sotoreport
ABAP
Parser
PHP
Parser
26.04.2016 //// Seite 12WPS - Workplace Solutions GmbH
Two goals for long-livingness
1) Maintainability
• Finding bugs quickly
• Make quick changes
• Understand and analyses quickly
• Reduction of complexity
2) Flexibility
• Variants of business processes
• Changing requirements
• Service orientation and scalability
• Modularity (Baukastenprinzip)
26.04.2016 //// Seite 13WPS - Workplace Solutions GmbH
70%
20%
10%
Code verstehen
Problem lösen
Code schreiben
How do we spend our time when programming?
Code comprehension
Problem solving
Writing code
@ www.tomfreudenthal.de
26.04.2016 //// Seite 15WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
26.04.2016 //// Seite 16WPS - Workplace Solutions GmbH
@ naturfotographen-forum.de
Marion Meixner
Zusammenhängende Einheiten
@ www.fotocommunity.de
Jan Schwensweger
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
26.04.2016 //// Seite 20WPS - Workplace Solutions GmbH
Modularity
High Cohesion and lose Coupling
Responsibility Driven Design
Separation of Concerns
Single Responsibility Principle
26.04.2016 //// Seite 21WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
26.04.2016 //// Seite 22WPS - Workplace Solutions GmbH
Hierarchies
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
Hierarchical
Layerng
26.04.2016 //// Seite 25WPS - Workplace Solutions GmbH
26.04.2016 //// Seite 26WPS - Workplace Solutions GmbH
26.04.2016 //// Seite 3WPS - Workplace Solutions GmbH
Software
Architecture
Requirement
Engineering
Control Room
and Interaction
Software
Development
Business software,
for joyfull work!
WPS – Workplace Solutions GmbH
26.04.2016 //// Seite 28WPS - Workplace Solutions GmbH
26.04.2016 //// Seite 29WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
Hierarchical
Layerng
Pattern
Consistency
30
Hierarchies on the architectural level: layers and modules
TechnicalLayering
Domain Layering
Presentation
BP & Activity
Domain
Data
26.04.2016 //// Seite 31WPS - Workplace Solutions GmbH
Two dimensions in on architecture
Technical layering Domain layering
Tree violations
that are easy to
resolve
Difficult
violations
One component
cuasing several
problems
One component
causing a
problem
26.04.2016 //// Seite 32WPS - Workplace Solutions GmbH
Domain layering is missing
Technical layering No domain layering
Some violations
of the technical
layering
Allmost all
domain
components
need each other
26.04.2016 //// Seite 33WPS - Workplace Solutions GmbH
Hierarchies on class level
Influences:
maintainability
reusability
testability
modularisation
Pattern conformity
26.04.2016 //// Seite 38WPS - Workplace Solutions GmbH
119 classes from 4 components
+ 28 other classes
26.04.2016 //// Seite 39WPS - Workplace Solutions GmbH
327 classes from 8 components
That all need each other
26.04.2016 //// Seite 40WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
Hierarchical
Layerng
Pattern
Consistency
26.04.2016 //// Seite 41WPS - Workplace Solutions GmbH
Uneven Modules
One big Monolith with several little satellites
950.860 LOC
84.808 LOC
26.04.2016 //// Seite 42WPS - Workplace Solutions GmbH
Uneven Modules
9 Components = 17 Subsystems
26.04.2016 //// Seite 47WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Well-formed
architecture
Modularity
Hierarchical
Layerng
Pattern
Consistency
26.04.2016 //// Seite 48WPS - Workplace Solutions GmbH
Pattern on the architectural level: four modules
Module
green
Module
purple
Module
orange
Module
blue
26.04.2016 //// Seite 49WPS - Workplace Solutions GmbH
Pattern conformity: Bad example
26.04.2016 //// Seite 50WPS - Workplace Solutions GmbH
Pattern conformity: Good example
26.04.2016 //// Seite 51WPS - Workplace Solutions GmbH
Pattern on class level: design pattern and pattern languages
User Interface
Domain
Application
Domain ModuleDomain Module
Window
GUI
Model
View
C
o
n
t
r
o
l
ValueObject
Service
BusinessObject
SchichtungdurchMuster
26.04.2016 //// Seite 52WPS - Workplace Solutions GmbH
Pattern conformity: Good example
☺ 90% of the source code can be assigned to pattern
☺ 0,1% violations between the pattern
26.04.2016 //// Seite 53WPS - Workplace Solutions GmbH
Pattern conformity: the discovery of a pattern language
☺ 80% of the source code can be assigned to 23 pattern
☺ 4% violations between the pattern
26.04.2016 //// Seite 54WPS - Workplace Solutions GmbH
Well-formed complex structures = saving time!
Cognitive Mechanisms
HierarchiesChunking Schemata
Modularity
Hierarchical
Layerng
Pattern
Consistency
Consistent and
integrated pattern
Use a pattern
language
No cycles neither
on architectural
level nor on class
level
responsibility
coupling
size
interfaces
26.04.2016 //// Seite 55WPS - Workplace Solutions GmbH
Process of analyses and renovation of architecture
Thank you for your attention!
www.langlebige-softwarearchitektur.de
Dr. Carola Lilienthal
Mitglied der
Geschäftsleitung
cl@wps.de
www.wps.de
+49 170 184 77 11
Diplom-Informatikerin
@cairolali

Reducing technical debt in php

  • 1.
    WPS - WorkplaceSolutions GmbH //// Hans-Henny-Jahnn-Weg 29 //// 22085 HAMBURG Reducing technical debts in PHP Dr. Carola Lilienthal Carola.Lilienthal@wps.de, @cairolali www.wps.de Wolfgang Strunk Wolfgang.Strunk@sixt.com Sixt Leasing AG
  • 2.
    2 Mobility services providerwith highly attractive and customer centric product offering Mid-sized and large corporates Private and business customersCustomer focus Full Service Leasing Fleet Management Leasing / Vario Financing + Services Key products ~50k(2) ~31k ~16k(2)# of contracts 2014 Total: ~97k(1) Value proposition One-Stop-Online-Shop for >30 OEMs • Price • Transparency • Convenience OEM independent optimization of Total Cost of Ownership (TCO) • Know-how • Buying power • Outsourcing Sixt Leasing AG (1) Each Sixt Leasing vehicle is linked to one contract. However, not all contracts refer to a Sixt Leasing vehicle (e.g. Fleet Management). Hence, the total number of vehicles (~54k in 2014) is typically lower than the total number of contracts (2) The contracts include new contracts (order book) for which the leased vehicle has not yet been delivered to the customer and pure service contracts Contract CAGR 2012-2014 2% 111% 54% Fleet Leasing Fleet Management Online Retail
  • 3.
    26.04.2016 //// Seite3WPS - Workplace Solutions GmbH Software Architecture Requirement Engineering Control Room and Interaction Software Development Business software, for joyfull work! WPS – Workplace Solutions GmbH
  • 4.
    4 Proprietary data andsoftware development across the value chain as key competitive advantage Quote Procurement Contract Length ReturnProcess Level 1 Process Level 2 Tender & Implementation Vehicle Order Vehicle Logistics Vehicle Handover Final Invoices Quotes Vehicle Return Invoices Vehicle Disposal Customer Service User Service Order configuration Vehicle transport Delivery station Registration Fuel invoicing Lease- & full service invoiceParking ticket management Driver license check Contract adjustment Early return Order management Handover to the station Validity check Customer/ User change Delivery date coordination Order changes Reference calculation Cancellation Incoming invoices (Check & enter, debit) Pricing Quotation negotiations Breakdown service Return to retailer Self-marketingAppraisalHandover to the retailer Delivery Collective invoicing Return logistics Return damage invoice Final invoicing Vehicle invoices Fuel card service Contract changes Maintenance& attrition Damage processing Tire change & replacement Residual value factors Order checks Work shop routing Preliminary rental vehicle Implementation Damage invoicingActivation of contract Return letter Leasing request & contract check Web portal & parameter keeping Reports & analyses (Customer demands) Resignation from contract Cancellation by customerPurchasing Software Modules Customer facing Internal Source: Company information
  • 5.
    26.04.2016 //// Seite5WPS - Workplace Solutions GmbH
  • 6.
    26.04.2016 //// Seite6WPS - Workplace Solutions GmbH Technical Debts ≠ Long-living
  • 7.
    26.04.2016 //// Seite7WPS - Workplace Solutions GmbH Measures against technical debts Regular architecture discussions Qualification for developers and architects Automated tests and continuously refactoring Regular architecture analysis and renovation
  • 8.
    26.04.2016 //// Seite8WPS - Workplace Solutions GmbH Architektur analysis: What is this?
  • 9.
    26.04.2016 //// Seite9WPS - Workplace Solutions GmbH Architecture renovation: how do we do that? Refactorings Analysis + Discussion Determination f measures Implemented Architecture Reconstruction Source- Code Planned Architecture Architecture Alternatives Violations
  • 10.
    26.04.2016 //// Seite10WPS - Workplace Solutions GmbH Sotograph Plattform for Architecture Renovation Commercial product since 2002 Many customers, e.g. Siemens, Lufthansa, HHLA, Kühne&Nagel, Daimler, Infineon Analyses Java, C++, C#, ABAP, PHP and offers an open interface for other parsers www.hello2morrow.de
  • 11.
    26.04.2016 //// Seite11WPS - Workplace Solutions GmbH Components of sotograph Java Parser Soto Reposi- tory C# Parser Code- Checker C/C++ Parser Sotoweb Sotoarc Sotograph Sotoreport ABAP Parser PHP Parser
  • 12.
    26.04.2016 //// Seite12WPS - Workplace Solutions GmbH Two goals for long-livingness 1) Maintainability • Finding bugs quickly • Make quick changes • Understand and analyses quickly • Reduction of complexity 2) Flexibility • Variants of business processes • Changing requirements • Service orientation and scalability • Modularity (Baukastenprinzip)
  • 13.
    26.04.2016 //// Seite13WPS - Workplace Solutions GmbH 70% 20% 10% Code verstehen Problem lösen Code schreiben How do we spend our time when programming? Code comprehension Problem solving Writing code
  • 14.
  • 15.
    26.04.2016 //// Seite15WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata
  • 16.
    26.04.2016 //// Seite16WPS - Workplace Solutions GmbH
  • 17.
  • 18.
  • 19.
    Well-formed complex structures= saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity
  • 20.
    26.04.2016 //// Seite20WPS - Workplace Solutions GmbH Modularity High Cohesion and lose Coupling Responsibility Driven Design Separation of Concerns Single Responsibility Principle
  • 21.
    26.04.2016 //// Seite21WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity
  • 22.
    26.04.2016 //// Seite22WPS - Workplace Solutions GmbH Hierarchies
  • 24.
    Well-formed complex structures= saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity Hierarchical Layerng
  • 25.
    26.04.2016 //// Seite25WPS - Workplace Solutions GmbH
  • 26.
    26.04.2016 //// Seite26WPS - Workplace Solutions GmbH
  • 27.
    26.04.2016 //// Seite3WPS - Workplace Solutions GmbH Software Architecture Requirement Engineering Control Room and Interaction Software Development Business software, for joyfull work! WPS – Workplace Solutions GmbH
  • 28.
    26.04.2016 //// Seite28WPS - Workplace Solutions GmbH
  • 29.
    26.04.2016 //// Seite29WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity Hierarchical Layerng Pattern Consistency
  • 30.
    30 Hierarchies on thearchitectural level: layers and modules TechnicalLayering Domain Layering Presentation BP & Activity Domain Data
  • 31.
    26.04.2016 //// Seite31WPS - Workplace Solutions GmbH Two dimensions in on architecture Technical layering Domain layering Tree violations that are easy to resolve Difficult violations One component cuasing several problems One component causing a problem
  • 32.
    26.04.2016 //// Seite32WPS - Workplace Solutions GmbH Domain layering is missing Technical layering No domain layering Some violations of the technical layering Allmost all domain components need each other
  • 33.
    26.04.2016 //// Seite33WPS - Workplace Solutions GmbH Hierarchies on class level Influences: maintainability reusability testability modularisation Pattern conformity
  • 34.
    26.04.2016 //// Seite38WPS - Workplace Solutions GmbH 119 classes from 4 components + 28 other classes
  • 35.
    26.04.2016 //// Seite39WPS - Workplace Solutions GmbH 327 classes from 8 components That all need each other
  • 36.
    26.04.2016 //// Seite40WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity Hierarchical Layerng Pattern Consistency
  • 37.
    26.04.2016 //// Seite41WPS - Workplace Solutions GmbH Uneven Modules One big Monolith with several little satellites 950.860 LOC 84.808 LOC
  • 38.
    26.04.2016 //// Seite42WPS - Workplace Solutions GmbH Uneven Modules 9 Components = 17 Subsystems
  • 39.
    26.04.2016 //// Seite47WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata Well-formed architecture Modularity Hierarchical Layerng Pattern Consistency
  • 40.
    26.04.2016 //// Seite48WPS - Workplace Solutions GmbH Pattern on the architectural level: four modules Module green Module purple Module orange Module blue
  • 41.
    26.04.2016 //// Seite49WPS - Workplace Solutions GmbH Pattern conformity: Bad example
  • 42.
    26.04.2016 //// Seite50WPS - Workplace Solutions GmbH Pattern conformity: Good example
  • 43.
    26.04.2016 //// Seite51WPS - Workplace Solutions GmbH Pattern on class level: design pattern and pattern languages User Interface Domain Application Domain ModuleDomain Module Window GUI Model View C o n t r o l ValueObject Service BusinessObject SchichtungdurchMuster
  • 44.
    26.04.2016 //// Seite52WPS - Workplace Solutions GmbH Pattern conformity: Good example ☺ 90% of the source code can be assigned to pattern ☺ 0,1% violations between the pattern
  • 45.
    26.04.2016 //// Seite53WPS - Workplace Solutions GmbH Pattern conformity: the discovery of a pattern language ☺ 80% of the source code can be assigned to 23 pattern ☺ 4% violations between the pattern
  • 46.
    26.04.2016 //// Seite54WPS - Workplace Solutions GmbH Well-formed complex structures = saving time! Cognitive Mechanisms HierarchiesChunking Schemata Modularity Hierarchical Layerng Pattern Consistency Consistent and integrated pattern Use a pattern language No cycles neither on architectural level nor on class level responsibility coupling size interfaces
  • 47.
    26.04.2016 //// Seite55WPS - Workplace Solutions GmbH Process of analyses and renovation of architecture
  • 49.
    Thank you foryour attention! www.langlebige-softwarearchitektur.de Dr. Carola Lilienthal Mitglied der Geschäftsleitung cl@wps.de www.wps.de +49 170 184 77 11 Diplom-Informatikerin @cairolali