Enviar pesquisa
Carregar
Migration Concepts For Enterprise PHP Applications
•
1 gostou
•
1,627 visualizações
Mayflower GmbH
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 30
Baixar agora
Baixar para ler offline
Recomendados
Javascript Konsole für Entwicklung und Administration
Javascript Konsole für Entwicklung und Administration
Alfresco by fme AG
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
GovCloud Network
Migrating Legacy Code
Migrating Legacy Code
Siddhi
IBM-Kelley Smith -05- 2016
IBM-Kelley Smith -05- 2016
Kelley Smith
DELL cert
DELL cert
Renato Car
Reducing deployment time with Dell Chassis Management Controller
Reducing deployment time with Dell Chassis Management Controller
Principled Technologies
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
andrew.macleod
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
Fraser Chadburn
Recomendados
Javascript Konsole für Entwicklung und Administration
Javascript Konsole für Entwicklung und Administration
Alfresco by fme AG
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
GovCloud Network
Migrating Legacy Code
Migrating Legacy Code
Siddhi
IBM-Kelley Smith -05- 2016
IBM-Kelley Smith -05- 2016
Kelley Smith
DELL cert
DELL cert
Renato Car
Reducing deployment time with Dell Chassis Management Controller
Reducing deployment time with Dell Chassis Management Controller
Principled Technologies
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
andrew.macleod
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
Fraser Chadburn
Exploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMC
RSD
Quality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond Unittests
Mayflower GmbH
Quality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdf
guestf62d67
Avantage Enterprise Architecture
Avantage Enterprise Architecture
Geoffrey Long
MySQL Aquarium Paris
MySQL Aquarium Paris
Alexis Moussine-Pouchkine
XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
The Linux Foundation
VMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applications
Vincent Kwon
Avantage BPM Key Features
Avantage BPM Key Features
Geoffrey Long
PHP in the Enterprise connecting to SAP
PHP in the Enterprise connecting to SAP
webhostingguy
L'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in Action
NetApp
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
IoRobot
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
360|Conferences
Emc solutions for sap_overview
Emc solutions for sap_overview
Cenk Ersoy
Bugtracking 101 Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010
Michelangelo van Dam
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
Ivo Jansch
Stateful SOAP Webservices
Stateful SOAP Webservices
Mayflower GmbH
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
Ivo Jansch
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
Jonas Rosland
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the Computer
Robert Sutor
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
ZendCon
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mayflower GmbH
Why and what is go
Why and what is go
Mayflower GmbH
Mais conteúdo relacionado
Semelhante a Migration Concepts For Enterprise PHP Applications
Exploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMC
RSD
Quality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond Unittests
Mayflower GmbH
Quality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdf
guestf62d67
Avantage Enterprise Architecture
Avantage Enterprise Architecture
Geoffrey Long
MySQL Aquarium Paris
MySQL Aquarium Paris
Alexis Moussine-Pouchkine
XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
The Linux Foundation
VMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applications
Vincent Kwon
Avantage BPM Key Features
Avantage BPM Key Features
Geoffrey Long
PHP in the Enterprise connecting to SAP
PHP in the Enterprise connecting to SAP
webhostingguy
L'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in Action
NetApp
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
IoRobot
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
360|Conferences
Emc solutions for sap_overview
Emc solutions for sap_overview
Cenk Ersoy
Bugtracking 101 Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010
Michelangelo van Dam
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
Ivo Jansch
Stateful SOAP Webservices
Stateful SOAP Webservices
Mayflower GmbH
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
Ivo Jansch
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
Jonas Rosland
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the Computer
Robert Sutor
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
ZendCon
Semelhante a Migration Concepts For Enterprise PHP Applications
(20)
Exploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMC
Quality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond Unittests
Quality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdf
Avantage Enterprise Architecture
Avantage Enterprise Architecture
MySQL Aquarium Paris
MySQL Aquarium Paris
XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
VMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applications
Avantage BPM Key Features
Avantage BPM Key Features
PHP in the Enterprise connecting to SAP
PHP in the Enterprise connecting to SAP
L'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in Action
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
Emc solutions for sap_overview
Emc solutions for sap_overview
Bugtracking 101 Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
Stateful SOAP Webservices
Stateful SOAP Webservices
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the Computer
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
Mais de Mayflower GmbH
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mayflower GmbH
Why and what is go
Why and what is go
Mayflower GmbH
Agile Anti-Patterns
Agile Anti-Patterns
Mayflower GmbH
JavaScript Days 2015: Security
JavaScript Days 2015: Security
Mayflower GmbH
Vom Entwickler zur Führungskraft
Vom Entwickler zur Führungskraft
Mayflower GmbH
Produktive teams
Produktive teams
Mayflower GmbH
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
Mayflower GmbH
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debugging
Mayflower GmbH
Usability im web
Usability im web
Mayflower GmbH
Rewrites überleben
Rewrites überleben
Mayflower GmbH
JavaScript Security
JavaScript Security
Mayflower GmbH
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
Mayflower GmbH
Responsive Webdesign
Responsive Webdesign
Mayflower GmbH
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Mayflower GmbH
Pair Programming Mythbusters
Pair Programming Mythbusters
Mayflower GmbH
Shoeism - Frau im Glück
Shoeism - Frau im Glück
Mayflower GmbH
Bessere Software schneller liefern
Bessere Software schneller liefern
Mayflower GmbH
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 Sprints
Mayflower GmbH
Piwik anpassen und skalieren
Piwik anpassen und skalieren
Mayflower GmbH
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce Breakfast
Mayflower GmbH
Mais de Mayflower GmbH
(20)
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Why and what is go
Why and what is go
Agile Anti-Patterns
Agile Anti-Patterns
JavaScript Days 2015: Security
JavaScript Days 2015: Security
Vom Entwickler zur Führungskraft
Vom Entwickler zur Führungskraft
Produktive teams
Produktive teams
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debugging
Usability im web
Usability im web
Rewrites überleben
Rewrites überleben
JavaScript Security
JavaScript Security
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
Responsive Webdesign
Responsive Webdesign
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Pair Programming Mythbusters
Pair Programming Mythbusters
Shoeism - Frau im Glück
Shoeism - Frau im Glück
Bessere Software schneller liefern
Bessere Software schneller liefern
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 Sprints
Piwik anpassen und skalieren
Piwik anpassen und skalieren
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce Breakfast
Último
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
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
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
SynarionITSolutions
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Último
(20)
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
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...
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Migration Concepts For Enterprise PHP Applications
1.
Migration concepts for
enterprise PHP applications International PHP Conference 2008 – Spring Edition Thorsten Rinne
2.
Introduction ❙ Thorsten Rinne ❙
31 years old ❙ Graduated in computer science ❙ Project manager at Mayflower GmbH, Munich ❙ Reporting applications ❙ Critical bank applications ❙ PHP Consulting ❙ PHP software development since 1999 ❙ Founder and main developer of Open Source FAQ- management software phpMyFAQ since 2001 ❙ Zend Certified Engineer (PHP 5) „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 2
3.
Summary ❙ Introduction ❙ Why
upgrade? ❙ Process model ❙ MySQL upgrade process ❙ PHP upgrade process ❙ Migration ❙ Conclusion ❙ Questions and answers „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 3
4.
Introduction: Why upgrade? ❙
MySQL 4 support will end ❙ Active support already ended by the end of 2006 ❙ Only extended support until 2008 for MySQL 4.0 and 2009 for MySQL 4.1 ❙ MySQL 5 has more and advanced features like stored procedures, trigger, better SQL support ❙ PHP 4 support will end ❙ PHP 4 is dead, dead, dead ❙ Only security relevant fixes until 2008-08-08 ❙ PHP 5.2 is faster and more stable than every PHP 4 version „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 4
5.
Introduction: Requirements ❙ No
qualitative changes like new features ❙ No technical changes like ❙ new database layer ❙ new template engine ❙ Using new PHP 5 features ❙ No influences for productive services like ❙ External systems ❙ End user frontends ❙ Minimization of time and effort „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 5
6.
Introduction: What is
porting? Innovation potential ❙ Reasons ❙ Most simple form of migration ive sit Rewrite ❙ Manageble risks po ❙ Small complexity because of the lack of qualitive and Reengineering technical changes e tiv ❙ Requirement ga ne ❙ Minor differences between Porting current and future application platform complexity „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 6
7.
Process model ❙ Reducing
of complexity with a planned procedure ❙ Coverage of the complete porting ❙ Methodical description of the process ❙ Tool support „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 7
8.
Process model: Preparations ❙
Targets ❙ Porting without any technical or qualitative changes ❙ Recovery of support (MySQL/PHP) ❙ Minimizing the interferences of services and reduction of change times ❙ Interferences ❙ Porting problems between MySQL and PHP versions ❙ Application complexity ❙ missing documentation and missing contact persons ❙ Communication between all team members „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 8
9.
Process modell: Upgrading
MySQL ❙ Upgrade in two steps ❙ MySQL 4.0 to MySQL 4.1 ❙ MySQL 4.1 to MySQL 5.0 ❙ Why two steps? ❙ Big changes between 4.0 and 4.1 ❙ Password changes ❙ Character sets ❙ Collations ❙ Many minor BC breaks „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 9
10.
Upgrade path for
MySQL ❙ First dump your current database, if it‘s InnoDB. If you use MyISAM, just backup everything. ❙ upgrade your development machine ❙ Reload your tables ❙ Test, test, test with MySQL 5.0 ❙ Fix your queries and application if you have problems ❙ Use the STRICT MODE in MySQL 5.0 ❙ Test, test, test with MySQL 5.0 ❙ Upgrade your production machine ❙ Reload your production database „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 10
11.
How to dump
MySQL? ❙ Use the MySQL 4.1 mysqldump binary! shell> mysqldump –uroot -p –-database mydatabase --single-transaction --default-character-set=utf-8 --disable-keys --extended-insert | bzip2 –c > backup.sql.bz2 Warning: This can lock all tables! ❙ Fix the password column in the MySQL user table shell> mysql_fix_privilege_tables --password=root_password „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 11
12.
MySQL Pitfalls ❙ Rebuild
your TIMESTAMPs, check this also in your application ❙ TIMESTAMP now has the format 'YYYY-MM-DD HH:MM:SS' ❙ DECIMAL(14,2) in MySQL 4.0 is not the same as DECIMAL(14,2) in MySQL 4.1/5.0 ❙ using DECIMAL(10,5): 100000 will be 99999.99999 ❙ using DECIMAL(11,5): 100000 will be 100000.00000 ❙ New reserved words ❙ SQL2003 standard for your SQL queries with natural JOINs and JOINs with USING may produce different results ❙ http://dev.mysql.com/doc/refman/5.0/en/upgrading-from- 4-1.html „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 12
13.
After MySQL upgrade ❙
Release the current combination ❙ PHP 4 / MySQL 5 ❙ Why? ❙ You never find all problems during your tests ❙ PHP porting may took longer than the MySQL porting ❙ Increase your experience with MySQL 5 ❙ Prepare the PHP 5 update „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 13
14.
Process model: Upgrading
PHP ❙ Which PHP version? ❙ Latest PHP 5.2 release for production, if you build by yourself or current PHP 5.2 package from your Linux/Unix/*BSD/Solaris distribution ❙ Testing with PHP 5.3-dev if you have time and money ❙ Please don‘t use ❙ PHP 5.0.x ❙ PHP 5.1.x ❙ PHP 6.0.0-dev „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 14
15.
Upgrade path for
PHP ❙ upgrade your development machine to latest PHP 5.2 release ❙ Test, test, test ❙ Fix your code if you have problems ❙ register_globals = off ❙ error_reporting = E_ALL & E_STRICT ❙ display_errors = on ❙ log_errors = on ❙ Test, test, test ❙ Upgrade your production machine ❙ Release your ported application „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 15
16.
Migrate configuration files ❙
httpd.conf ❙ change this line: LoadModule php4_module php/sapi/php4apache2.dll ❙ with this one: LoadModule php5_module /php/php5apache2.dll ❙ php.ini ❙ You should use the php.ini-recommended file, but check, if you need magic quotes on…. Otherwise your application could be insecure! „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 16
17.
PHP 5 Pitfalls: New
reserved keyords ❙ abstract ❙ public ❙ catch ❙ throw ❙ clone ❙ try ❙ extends ❙ use ❙ final ❙ namespace ❙ implements ❙ instanceof ❙ interface ❙ goto ❙ private ❙ protected „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 17
18.
PHP 5 Pitfalls Constructor
/ Destructor ❙ PHP 4 ❙ construct method has the name of the class ❙ No destruct method ❙ PHP 5 ❙ construct method: __construct() ❙ If not available, fallback to PHP4 handling ❙ destruct method: __destruct() ❙ Executed at the end of the request „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 18
19.
PHP 5 Pitfalls Magic
methods ❙ __autoload() ❙ __call(), __callStatic() (only PHP 5.3) ❙ __construct() ❙ __destruct() ❙ __get() ❙ __isset() ❙ __set() ❙ __set_state() ❙ __sleep() ❙ __toString() ❙ __unset() ❙ __wakeup() „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 19
20.
PHP 5 Pitfalls ❙
get_class(), get_parent_class() and get_class_methods() now case-sensitive ❙ __CLASS__, __METHOD__, and __FUNCTION__ are also case-sensitive ❙ Objects are referenced by handle, and not by value ❙ Objects aren’t primitive types like in PHP 4 ❙ If you need a copy of a object, use __clone() ❙ Re-declaration of $this isn’t allowed anymore ❙ === operator is more strict than it was in PHP 4 ❙ __call()/__set()/__get() are different in PHP 4 ❙ Don’t use zend.ze1.compatibility_mode! ❙ Use instanceof instead of is_a() „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 20
21.
Migration strategies ❙ After
the release of the PHP 5 ported application REFACTORING! ❙ Strategies for ❙ „Spaghetti code“ ❙ Half procedural – half object-orientated ❙ PHP 4 OOP ❙ Please don‘t try a complete rewrite ❙ Too expensive ❙ Takes too long ❙ Joel on software: „Things You Should Never Do “ „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 21
22.
Migration „Spaghetti Code“ ❙ Very
old code, maybe developed in the last PHP 3 century ❙ No or just minor separation of code and layout ❙ No use of libraries like PEAR, Zend Framework or eZ components ❙ No documentation ❙ No tests „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 22
23.
Migration „Spaghetti Code“: Strategy ❙
Identify recurring code parts and implement classes ❙ Use of standard libraries like Zend Framework, eZ components or PEAR ❙ Add inline documentation ❙ Fix your coding styles ❙ Add unittests for the new, refactored backend ❙ Add Selenium tests for the frontend „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 23
24.
Migration „Half procedual –
halb object-orientated“ ❙ Code with differend quality ❙ Just a few documentation ❙ Maybe some tests ❙ „the typical current PHP 4 project“ ☺ „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 24
25.
Migration „ Half procedual
– halb object-orientated“: Strategy ❙ Add inline documentation for all classes and methods ❙ Improve the re-using of duplicate code ❙ Add unittests and Selenium tests ❙ Improve every code part with PHP 5 functions, for example using file_put_contents() instead of fopen(), fwrite(), and fclose(). „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 25
26.
Migration PHP 4 OOP ❙
Application was developed object-orientated in PHP 4 ❙ Using of ❙ PHP 4 references ❙ Re-declaration of $this „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 26
27.
Migration PHP 4 OOP:
Strategy ❙ Maybe you‘re lucky and there are no problems. Maybe. ❙ If you see problems, they are fatal errors like ❙ Objects are referenced by value ❙ $foo =& new Foo(); ❙ Solution: ❙ Implement unittests ❙ Use standard APIs ❙ Fix the PHP 5 problems „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 27
28.
Conclusion ❙ Migration is
always possible ❙ Migration can be hard, but usually it isn‘t! ☺ ❙ Don‘t shoot yourself in the foot with the migration ❙ First upgrade MySQL ❙ Then upgrade PHP and fix your application ❙ Then do the cleanup for a better future ☺ ❙ Stay current in the future and do always small steps ❙ Keep PHP 5.3 and PHP 5.4 in mind! „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 28
29.
Questions and answers
„Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 29
30.
Thank you very
much! Thorsten Rinne, Dipl.-Inf. (FH) Mayflower GmbH Mannhardtstraße 6 D-80538 München Germany +49 (89) 24 20 54 – 31 thorsten.rinne@mayflower.de
Baixar agora