49
WPS - Workplace Solutions GmbH //// Hans-Henny-Jahnn-Weg 29 //// 22085 HAMBURG Reducing technical debts in PHP Dr. Carola Lilienthal [email protected], @cairolali www.wps.de Wolfgang Strunk [email protected] Sixt Leasing AG

Reducing technical debt in php

Embed Size (px)

Citation preview

WPS - Workplace Solutions GmbH //// Hans-Henny-Jahnn-Weg 29 //// 22085 HAMBURG

Reducing technical debts in PHP

Dr. Carola Lilienthal

[email protected], @cairolali

www.wps.de

Wolfgang Strunk

[email protected]

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 ManagementLeasing / Vario Financing

+ Services Key products

~50k(2) ~31k ~16k(2)# of contracts 2014Total: ~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 2Tender &

Implementation

Vehicle

Order

Vehicle

Logistics

Vehicle

Handover

Final

InvoicesQuotes

Vehicle

ReturnInvoices

Vehicle

DisposalCustomer 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

ArchitectureReconstruction

Source-

Code

Planned

Architecture

Architecture

AlternativesViolations

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

SotoReposi-

tory

C#Parser

Code-

Checker

C/C++Parser

Sotoweb

Sotoarc

Sotograph

Sotoreport

ABAPParser

PHPParser

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

ModularityHierarchical

Layerng

26.04.2016 //// Seite 25WPS - Workplace Solutions GmbH

26.04.2016 //// Seite 26WPS - Workplace Solutions GmbH

26.04.2016 //// Seite 27WPS - Workplace Solutions GmbH

Säumer Schema

@ Daniel Rihs

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

ModularityHierarchical

Layerng

Pattern

Consistency

30

Hierarchies on the architectural level: layers and modulesTechnic

al Layeri

ng

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

ModularityHierarchical

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

ModularityHierarchical

Layerng

Pattern

Consistency

26.04.2016 //// Seite 48WPS - Workplace Solutions GmbH

Pattern on the architectural level: four modules

Module

green

Module

purpleModule

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

ViewControl

ValueObject

Service

BusinessObject

Sch

ich

tun

g d

urc

h M

ust

er

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

ModularityHierarchical

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 LilienthalMitglied der

Geschäftsleitung

[email protected]

www.wps.de

+49 170 184 77 11

Diplom-Informatikerin

@cairolali