Refactoring in PHP While Going Open Source. A Case Study
-
Upload
erik-kort -
Category
Technology
-
view
2.043 -
download
5
description
Transcript of Refactoring in PHP While Going Open Source. A Case Study
![Page 1: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/1.jpg)
© 2009 OXID eSales
Refactoring in PHP While Going Open Source
A Case Study ..
OXID eSales AGBerlin, 26. June 2009
Erik KortChief Software Architect
![Page 2: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/2.jpg)
© 2009 OXID eSales
OXID eSales AG
eCommerce Software… nothing else!
Located in Freiburg, Halle and Kaunas (Lithuania)
50+ employees… more than half PHP-Developers
![Page 3: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/3.jpg)
© 2009 OXID eSales
About Me
Key facts
OXID eSales AG Chief Software Architect
15+ Years of experience in Software Development
Wide field:
– from Petrochemical industries to eCommerce– From mobile devices to large servers
Passion: Architecture and Object Oriented Design
![Page 4: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/4.jpg)
© 2009 OXID eSales
OXID eShop 4 Open Source
what does this exactly mean?
OXID eShop Professional Edition is available also as OXID eShop Community Edition
Licensed under GPLv3
![Page 5: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/5.jpg)
© 2009 OXID eSales
The Past
![Page 6: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/6.jpg)
© 2009 OXID eSales
![Page 7: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/7.jpg)
© 2009 OXID eSales
![Page 8: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/8.jpg)
© 2009 OXID eSales
Module snap in
Multiple inheritance possible
Best prepared for extension due to small and atomic functions
Prepared for multilanguage usage
eShop Extensions
ES
EN
DE
![Page 9: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/9.jpg)
© 2009 OXID eSales
Connecting OXID eShop
Various connectors to ERP already exist
– Microsoft Dynamics NAV– Büroware– SAP– Generic SOAP interface– Generic CSV interface– and many more
Also connectors to various CRM systems exist
– Drupal– Typo3– and many more
350+ third party extensions in existence
![Page 10: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/10.jpg)
© 2009 OXID eSales
Time to change
![Page 11: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/11.jpg)
© 2009 OXID eSales
XP – eXtreme Programming
![Page 12: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/12.jpg)
© 2009 OXID eSales
eXtreme Programming in OXID
Iteration length: 1 week
Only useful elements of XP are taken (e.g. pair programming only if needed/wanted)
Iteration planning at the beginning of each week
Change of plans possible every time – even late in development process
Monitoring release by using burndown charts
Team velocity is constant
Leads to predictable schedules
– Release dates are fixed in advance and kept
![Page 13: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/13.jpg)
© 2009 OXID eSales
Doing the XP - Goals
Porting to PHP 5
Common code base
Significantly improve quality of source code
Remove „Big Ball of Mudd“ elements
Reduce release efforts
Automatic build system
Measure code quality (code metrics)
![Page 14: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/14.jpg)
© 2009 OXID eSales
Tools
![Page 15: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/15.jpg)
© 2009 OXID eSales
Risks …
![Page 16: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/16.jpg)
© 2009 OXID eSales
Lessons learned
![Page 17: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/17.jpg)
© 2009 OXID eSales
Psychology ! – „the Gap“
![Page 18: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/18.jpg)
© 2009 OXID eSales
Narural Cleaner Architecture
Model-View-Controller pattern (MVC)
![Page 19: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/19.jpg)
© 2009 OXID eSales
Results
![Page 20: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/20.jpg)
© 2009 OXID eSales
Memory consumption CE/PE
![Page 21: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/21.jpg)
© 2009 OXID eSales
Memory consumption EE
![Page 22: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/22.jpg)
© 2009 OXID eSales
Response Time CE/PE
![Page 23: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/23.jpg)
© 2009 OXID eSales
Load
Scales well under high load
![Page 24: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/24.jpg)
© 2009 OXID eSales
Performance under load
![Page 25: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/25.jpg)
© 2009 OXID eSales
Unit tests
![Page 26: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/26.jpg)
© 2009 OXID eSales
Source Code dispersion
![Page 27: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/27.jpg)
© 2009 OXID eSales
Code coverage
![Page 28: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/28.jpg)
© 2009 OXID eSales
Cyclomatic Complexity
![Page 29: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/29.jpg)
© 2009 OXID eSales
If you are not developing with an agile methodology today, be warned.
It is not about deciding if you want it or not, only about when
Conclusion
![Page 30: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/30.jpg)
© 2009 OXID eSales
Questions?
![Page 31: Refactoring in PHP While Going Open Source. A Case Study](https://reader033.fdocuments.net/reader033/viewer/2022042813/547feaecb4af9f6b6d8b45d8/html5/thumbnails/31.jpg)
© 2009 OXID eSales
Press comments
„Der eShop überzeugt durch seinen schlanken Aufbau mit sehr guter Performance, ohne diese mit zu wenig Out-Of-The-Box-Funktionen oder mangelnder Erweiterbarkeit kompensieren zu müssen.“ t3n, 12/ 2008
Die Software überzeugt v.a. durch Usability auf Shop-nutzerseite.ix, 01/2009
„Der OXID eShop bringt von Haus aus alle für einen Online-Shop wichtigen Features mit: SEO URLs, Crossselling, Produktvarianten, beliebig verschachtelbare Kategorien, Mehrsprachigkeit, Web 2.0 Features etc.“„Wer ein flexibles Shop-System für höchste Ansprüche sucht, sollte sich den OXID eShop genauer ansehen.“PHP Journal 1/2009